Commit | Line | Data |
---|---|---|
2a905848 RG |
1 | /* |
2 | * lcp.h - Link Control Protocol definitions. | |
3 | * | |
4 | * Copyright (c) 1989 Carnegie Mellon University. | |
5 | * All rights reserved. | |
6 | * | |
7 | * Redistribution and use in source and binary forms are permitted | |
8 | * provided that the above copyright notice and this paragraph are | |
9 | * duplicated in all such forms and that any documentation, | |
10 | * advertising materials, and other materials related to such | |
11 | * distribution and use acknowledge that the software was developed | |
12 | * by Carnegie Mellon University. The name of the | |
13 | * University may not be used to endorse or promote products derived | |
14 | * from this software without specific prior written permission. | |
15 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
16 | * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
17 | * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
f381ea37 JH |
18 | * |
19 | * $Id: lcp.h,v 1.1 1993/11/11 03:54:25 paulus Exp $ | |
2a905848 RG |
20 | */ |
21 | ||
22 | /* | |
23 | * Options. | |
24 | */ | |
25 | #define CI_MRU 1 /* Maximum Receive Unit */ | |
26 | #define CI_ASYNCMAP 2 /* Async Control Character Map */ | |
27 | #define CI_AUTHTYPE 3 /* Authentication Type */ | |
f381ea37 | 28 | #define CI_QUALITY 4 /* Quality Protocol */ |
2a905848 | 29 | #define CI_MAGICNUMBER 5 /* Magic Number */ |
f381ea37 | 30 | #define CI_KEEPALIVE 6 /* Keep Alive Parameters - OBSOLETE */ |
2a905848 RG |
31 | #define CI_PCOMPRESSION 7 /* Protocol Field Compression */ |
32 | #define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */ | |
33 | ||
34 | ||
35 | /* | |
36 | * The state of options is described by an lcp_options structure. | |
37 | */ | |
38 | typedef struct lcp_options { | |
f381ea37 JH |
39 | int passive : 1; /* Don't die if we don't get a response */ |
40 | int silent : 1; /* Wait for the other end to start first */ | |
2a905848 RG |
41 | int restart : 1; /* Restart vs. exit after close */ |
42 | int neg_mru : 1; /* Negotiate the MRU? */ | |
f381ea37 JH |
43 | int neg_asyncmap : 1; /* Negotiate the async map? */ |
44 | int neg_upap : 1; /* Ask for UPAP authentication? */ | |
45 | int neg_chap : 1; /* Ask for CHAP authentication? */ | |
46 | int neg_magicnumber : 1; /* Ask for magic number? */ | |
2a905848 RG |
47 | int neg_pcompression : 1; /* HDLC Protocol Field Compression? */ |
48 | int neg_accompression : 1; /* HDLC Address/Control Field Compression? */ | |
f381ea37 JH |
49 | int neg_lqr : 1; /* Negotiate use of Link Quality Reports */ |
50 | u_short mru; /* Value of MRU */ | |
51 | char chap_mdtype; /* which MD type (hashing algorithm) */ | |
52 | u_long asyncmap; /* Value of async map */ | |
53 | u_long magicnumber; | |
54 | int numloops; /* Number of loops during magic number neg. */ | |
55 | u_long lqr_period; /* Reporting period for link quality */ | |
2a905848 RG |
56 | } lcp_options; |
57 | ||
58 | extern fsm lcp_fsm[]; | |
59 | extern lcp_options lcp_wantoptions[]; | |
60 | extern lcp_options lcp_gotoptions[]; | |
61 | extern lcp_options lcp_allowoptions[]; | |
62 | extern lcp_options lcp_hisoptions[]; | |
63 | ||
64 | #define DEFMRU 1500 /* Try for this */ | |
65 | #define MINMRU 128 /* No MRUs below this */ | |
f381ea37 | 66 | #define MAXMRU 16384 /* Normally limit MRU to this */ |
2a905848 RG |
67 | |
68 | void lcp_init __ARGS((int)); | |
f381ea37 | 69 | void lcp_open __ARGS((int)); |
2a905848 RG |
70 | void lcp_close __ARGS((int)); |
71 | void lcp_lowerup __ARGS((int)); | |
72 | void lcp_lowerdown __ARGS((int)); | |
73 | void lcp_input __ARGS((int, u_char *, int)); | |
74 | void lcp_protrej __ARGS((int)); | |
75 | void lcp_sprotrej __ARGS((int, u_char *, int)); | |
f381ea37 JH |
76 | |
77 | extern int lcp_warnloops; /* Warn about a loopback this often */ | |
78 | #define DEFWARNLOOPS 10 /* Default value for above */ |