lqr.h revision 46686
1/*
2 *	    Written by Toshiharu OHNO (tony-o@iij.ad.jp)
3 *
4 *   Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd.
5 *
6 * Redistribution and use in source and binary forms are permitted
7 * provided that the above copyright notice and this paragraph are
8 * duplicated in all such forms and that any documentation,
9 * advertising materials, and other materials related to such
10 * distribution and use acknowledge that the software was developed
11 * by the Internet Initiative Japan.  The name of the
12 * IIJ may not be used to endorse or promote products derived
13 * from this software without specific prior written permission.
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 *
18 * $Id: lqr.h,v 1.13 1998/05/21 21:46:36 brian Exp $
19 *
20 *	TODO:
21 */
22
23/*
24 *  Structure of LQR packet defined in RFC1989
25 */
26struct lqrdata {
27  u_int32_t MagicNumber;
28  u_int32_t LastOutLQRs;	/* most recently received PeerOutLQRs */
29  u_int32_t LastOutPackets;	/* most recently received PeerOutPackets */
30  u_int32_t LastOutOctets;	/* most recently received PeerOutOctets */
31  u_int32_t PeerInLQRs;		/* Peers SaveInLQRs */
32  u_int32_t PeerInPackets;	/* Peers SaveInPackets */
33  u_int32_t PeerInDiscards;	/* Peers SaveInDiscards */
34  u_int32_t PeerInErrors;	/* Peers SaveInErrors */
35  u_int32_t PeerInOctets;	/* Peers SaveInOctets */
36  u_int32_t PeerOutLQRs;	/* Peers OutLQRs (hdlc.h) */
37  u_int32_t PeerOutPackets;	/* Peers OutPackets (hdlc.h) */
38  u_int32_t PeerOutOctets;	/* Peers OutOctets (hdlc.h) */
39};
40
41/*
42 *  We support LQR and ECHO as LQM method
43 */
44#define	LQM_LQR	  1
45#define	LQM_ECHO  2
46
47struct mbuf;
48struct physical;
49struct lcp;
50struct fsm;
51struct link;
52struct bundle;
53
54extern void lqr_Dump(const char *, const char *, const struct lqrdata *);
55extern void lqr_ChangeOrder(struct lqrdata *, struct lqrdata *);
56extern void lqr_Start(struct lcp *);
57extern void lqr_reStart(struct lcp *);
58extern void lqr_Stop(struct physical *, int);
59extern void lqr_StopTimer(struct physical *);
60extern void lqr_RecvEcho(struct fsm *, struct mbuf *);
61extern struct mbuf *lqr_Input(struct bundle *, struct link *, struct mbuf *);
62
63extern struct layer lqrlayer;
64