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