- Add an entry for iwl(4)
[dragonfly.git] / usr.sbin / pppd / lcp.h
blob170ae3379ed4ae51a794b79ee704ba1752e8a54b
1 /*
2 * lcp.h - Link Control Protocol definitions.
4 * Copyright (c) 1989 Carnegie Mellon University.
5 * All rights reserved.
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.
19 * $FreeBSD: src/usr.sbin/pppd/lcp.h,v 1.7 1999/08/28 01:19:05 peter Exp $
20 * $DragonFly: src/usr.sbin/pppd/lcp.h,v 1.3 2003/11/03 19:31:40 eirikn Exp $
24 * Options.
26 #define CI_MRU 1 /* Maximum Receive Unit */
27 #define CI_ASYNCMAP 2 /* Async Control Character Map */
28 #define CI_AUTHTYPE 3 /* Authentication Type */
29 #define CI_QUALITY 4 /* Quality Protocol */
30 #define CI_MAGICNUMBER 5 /* Magic Number */
31 #define CI_PCOMPRESSION 7 /* Protocol Field Compression */
32 #define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */
33 #define CI_CALLBACK 13 /* callback */
36 * LCP-specific packet types.
38 #define PROTREJ 8 /* Protocol Reject */
39 #define ECHOREQ 9 /* Echo Request */
40 #define ECHOREP 10 /* Echo Reply */
41 #define DISCREQ 11 /* Discard Request */
42 #define CBCP_OPT 6 /* Use callback control protocol */
45 * The state of options is described by an lcp_options structure.
47 typedef struct lcp_options {
48 int passive : 1; /* Don't die if we don't get a response */
49 int silent : 1; /* Wait for the other end to start first */
50 int restart : 1; /* Restart vs. exit after close */
51 int neg_mru : 1; /* Negotiate the MRU? */
52 int neg_asyncmap : 1; /* Negotiate the async map? */
53 int neg_upap : 1; /* Ask for UPAP authentication? */
54 int neg_chap : 1; /* Ask for CHAP authentication? */
55 int neg_magicnumber : 1; /* Ask for magic number? */
56 int neg_pcompression : 1; /* HDLC Protocol Field Compression? */
57 int neg_accompression : 1; /* HDLC Address/Control Field Compression? */
58 int neg_lqr : 1; /* Negotiate use of Link Quality Reports */
59 int neg_cbcp : 1; /* Negotiate use of CBCP */
60 u_short mru; /* Value of MRU */
61 u_char chap_mdtype; /* which MD type (hashing algorithm) */
62 u_int32_t asyncmap; /* Value of async map */
63 u_int32_t magicnumber;
64 int numloops; /* Number of loops during magic number neg. */
65 u_int32_t lqr_period; /* Reporting period for LQR 1/100ths second */
66 } lcp_options;
68 extern fsm lcp_fsm[];
69 extern lcp_options lcp_wantoptions[];
70 extern lcp_options lcp_gotoptions[];
71 extern lcp_options lcp_allowoptions[];
72 extern lcp_options lcp_hisoptions[];
73 extern u_int32_t xmit_accm[][8];
75 #define DEFMRU 1500 /* Try for this */
76 #define MINMRU 128 /* No MRUs below this */
77 #define MAXMRU 16384 /* Normally limit MRU to this */
79 void lcp_open(int);
80 void lcp_close(int, char *);
81 void lcp_lowerup(int);
82 void lcp_lowerdown(int);
83 void lcp_sprotrej(int, u_char *, int); /* send protocol reject */
85 extern struct protent lcp_protent;
87 /* Default number of times we receive our magic number from the peer
88 before deciding the link is looped-back. */
89 #define DEFLOOPBACKFAIL 10