Initial import of pppd 1.3
[unix-history] / libexec / pppd / lcp.h
CommitLineData
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.
18 */
19
20/*
21 * Options.
22 */
23#define CI_MRU 1 /* Maximum Receive Unit */
24#define CI_ASYNCMAP 2 /* Async Control Character Map */
25#define CI_AUTHTYPE 3 /* Authentication Type */
26#define CI_NOTDEFINED 4 /* not defined (used to be Encryption Type) */
27#define CI_MAGICNUMBER 5 /* Magic Number */
28#define CI_KEEPALIVE 6 /* Keep Alive Parameters */
29#define CI_PCOMPRESSION 7 /* Protocol Field Compression */
30#define CI_ACCOMPRESSION 8 /* Address/Control Field Compression */
31
32
33/*
34 * The state of options is described by an lcp_options structure.
35 */
36typedef struct lcp_options {
37 int passive : 1; /* Passives vs. active open */
38 int restart : 1; /* Restart vs. exit after close */
39 int neg_mru : 1; /* Negotiate the MRU? */
40 u_short mru; /* Value of MRU */
41 int neg_asyncmap : 1; /* Async map? */
42 u_long asyncmap;
43 int neg_upap : 1; /* UPAP authentication? */
44 int neg_chap : 1; /* CHAP authentication? */
45 char chap_mdtype; /* which MD type */
46 char chap_callback; /* callback ? */
47 int neg_magicnumber : 1; /* Magic number? */
48 u_long magicnumber;
49 int numloops; /* Number loops during magic number negot. */
50 int neg_pcompression : 1; /* HDLC Protocol Field Compression? */
51 int neg_accompression : 1; /* HDLC Address/Control Field Compression? */
52} lcp_options;
53
54extern fsm lcp_fsm[];
55extern lcp_options lcp_wantoptions[];
56extern lcp_options lcp_gotoptions[];
57extern lcp_options lcp_allowoptions[];
58extern lcp_options lcp_hisoptions[];
59
60#define DEFMRU 1500 /* Try for this */
61#define MINMRU 128 /* No MRUs below this */
62
63void lcp_init __ARGS((int));
64void lcp_activeopen __ARGS((int));
65void lcp_passiveopen __ARGS((int));
66void lcp_close __ARGS((int));
67void lcp_lowerup __ARGS((int));
68void lcp_lowerdown __ARGS((int));
69void lcp_input __ARGS((int, u_char *, int));
70void lcp_protrej __ARGS((int));
71void lcp_sprotrej __ARGS((int, u_char *, int));