2 * ipcp.h - IP Control Protocol definitions.
4 * Copyright (c) 1989 Carnegie Mellon University.
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 * $Id: ipcp.h,v 1.5 1994/09/21 06:47:37 paulus Exp $
25 #define CI_ADDRS 1 /* IP Addresses */
26 #define CI_COMPRESSTYPE 2 /* Compression Type */
29 #define MAX_STATES 16 /* from slcompress.h */
31 #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */
32 #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */
33 #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */
34 /* maxslot and slot number compression) */
36 #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/
37 #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
38 /* compression option*/
40 typedef struct ipcp_options {
41 int neg_addr : 1; /* Negotiate IP Address? */
42 int old_addrs : 1; /* Use old (IP-Addresses) option? */
43 int req_addr : 1; /* Ask peer to send IP address? */
44 int default_route : 1; /* Assign default route through interface? */
45 int proxy_arp : 1; /* Make proxy ARP entry for peer? */
46 int neg_vj : 1; /* Van Jacobson Compression? */
47 int old_vj : 1; /* use old (short) form of VJ option? */
48 int accept_local : 1; /* accept peer's value for ouraddr */
49 int accept_remote : 1; /* accept peer's value for hisaddr */
50 u_short vj_protocol; /* protocol value to use in VJ option */
51 u_char maxslotindex, cflag; /* values for RFC1332 VJ compression neg. */
52 u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
55 extern fsm ipcp_fsm[];
56 extern ipcp_options ipcp_wantoptions[];
57 extern ipcp_options ipcp_gotoptions[];
58 extern ipcp_options ipcp_allowoptions[];
59 extern ipcp_options ipcp_hisoptions[];
61 void ipcp_init __P((int));
62 void ipcp_open __P((int));
63 void ipcp_close __P((int));
64 void ipcp_lowerup __P((int));
65 void ipcp_lowerdown __P((int));
66 void ipcp_input __P((int, u_char *, int));
67 void ipcp_protrej __P((int));
68 int ipcp_printpkt __P((u_char *, int, void (*)(), void *));