lqr.h revision 32439
1104349Sphk/*
2104349Sphk *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3104349Sphk *
4104349Sphk *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5104349Sphk *
6104349Sphk * Redistribution and use in source and binary forms are permitted
7104349Sphk * provided that the above copyright notice and this paragraph are
8104349Sphk * duplicated in all such forms and that any documentation,
9104349Sphk * advertising materials, and other materials related to such
10104349Sphk * distribution and use acknowledge that the software was developed
11104349Sphk * by the Internet Initiative Japan.  The name of the
12104349Sphk * IIJ may not be used to endorse or promote products derived
13104349Sphk * from this software without specific prior written permission.
14104349Sphk * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15104349Sphk * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16104349Sphk * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17104349Sphk *
18104349Sphk * $Id: lqr.h,v 1.10 1997/11/22 03:37:38 brian Exp $
19104349Sphk *
20104349Sphk *	TODO:
21104349Sphk */
22104349Sphk
23104349Sphk/*
24104349Sphk *  Structure of LQR packet defined in RFC1333
25104349Sphk */
26104349Sphkstruct lqrdata {
27104349Sphk  u_int32_t MagicNumber;
28104349Sphk  u_int32_t LastOutLQRs;
29104349Sphk  u_int32_t LastOutPackets;
30104349Sphk  u_int32_t LastOutOctets;
31104349Sphk  u_int32_t PeerInLQRs;
32104349Sphk  u_int32_t PeerInPackets;
33  u_int32_t PeerInDiscards;
34  u_int32_t PeerInErrors;
35  u_int32_t PeerInOctets;
36  u_int32_t PeerOutLQRs;
37  u_int32_t PeerOutPackets;
38  u_int32_t PeerOutOctets;
39};
40
41struct lqrsave {
42  u_int32_t SaveInLQRs;
43  u_int32_t SaveInPackets;
44  u_int32_t SaveInDiscards;
45  u_int32_t SaveInErrors;
46  u_int32_t SaveInOctets;
47};
48
49struct lqrdata MyLqrData, HisLqrData;
50struct lqrsave HisLqrSave;
51
52/*
53 *  We support LQR and ECHO as LQM method
54 */
55#define	LQM_LQR	  1
56#define	LQM_ECHO  2
57
58extern void LqrDump(const char *, const struct lqrdata *);
59extern void LqrChangeOrder(struct lqrdata *, struct lqrdata *);
60extern void StartLqm(void);
61extern void StopLqr(int);
62extern void StopLqrTimer(void);
63extern void RecvEchoLqr(struct mbuf *);
64extern void LqrInput(struct mbuf *);
65