lcp.h revision 30733
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: lcp.h,v 1.9 1997/10/26 01:02:58 brian Exp $
19 *
20 *	TODO:
21 */
22
23struct lcpstate {
24  u_long his_mru;
25  u_long his_accmap;
26  u_long his_magic;
27  u_long his_lqrperiod;
28  u_char his_protocomp;
29  u_char his_acfcomp;
30  u_short his_auth;
31
32  u_long want_mru;
33  u_long want_accmap;
34  u_long want_magic;
35  u_long want_lqrperiod;
36  u_char want_protocomp;
37  u_char want_acfcomp;
38  u_short want_auth;
39
40  u_long his_reject;		/* Request codes rejected by peer */
41  u_long my_reject;		/* Request codes I have rejected */
42
43  u_short auth_iwait;
44  u_short auth_ineed;
45};
46
47#define	LCP_MAXCODE	CODE_DISCREQ
48
49#define	TY_MRU		1	/* Maximum-Receive-Unit */
50#define	TY_ACCMAP	2	/* Async-Control-Character-Map */
51#define	TY_AUTHPROTO	3	/* Authentication-Protocol */
52#define	TY_QUALPROTO	4	/* Quality-Protocol */
53#define	TY_MAGICNUM	5	/* Magic-Number */
54#define	TY_RESERVED	6	/* RESERVED */
55#define	TY_PROTOCOMP	7	/* Protocol-Field-Compression */
56#define	TY_ACFCOMP	8	/* Address-and-Control-Field-Compression */
57#define	TY_FCSALT	9	/* FCS-Alternatives */
58#define	TY_SDP		10	/* Self-Dscribing-Padding */
59#define	TY_NUMMODE	11	/* Numbered-Mode */
60#define	TY_XXXXXX	12
61#define	TY_CALLBACK	13	/* Callback */
62#define	TY_YYYYYY	14
63#define	TY_COMPFRAME	15	/* Compound-Frames */
64
65struct lqrreq {
66  u_char type;
67  u_char length;
68  u_short proto;		/* Quality protocol */
69  u_long period;		/* Reporting interval */
70};
71
72extern struct lcpstate LcpInfo;
73extern struct fsm LcpFsm;
74
75extern void LcpInit(void);
76extern void LcpUp(void);
77extern void LcpSendProtoRej(u_char *, int);
78extern void LcpOpen(int mode);
79extern void LcpClose(void);
80extern void LcpDown(void);
81extern void PutConfValue(u_char **, char **, u_char, int, u_long);
82extern int ReportLcpStatus(void);
83extern void LcpInput(struct mbuf *);
84