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