]> git.karo-electronics.de Git - karo-tx-redboot.git/blob - packages/net/ppp/v2_0/include/ipcp.h
Initial revision
[karo-tx-redboot.git] / packages / net / ppp / v2_0 / include / ipcp.h
1 //==========================================================================
2 //
3 //      include/ipcp.h
4 //
5 //==========================================================================
6 //####ECOSGPLCOPYRIGHTBEGIN####
7 // -------------------------------------------
8 // This file is part of eCos, the Embedded Configurable Operating System.
9 // Portions created by Nick Garnett are
10 // Copyright (C) 2003 eCosCentric Ltd.
11 //
12 // eCos is free software; you can redistribute it and/or modify it under
13 // the terms of the GNU General Public License as published by the Free
14 // Software Foundation; either version 2 or (at your option) any later version.
15 //
16 // eCos is distributed in the hope that it will be useful, but WITHOUT ANY
17 // WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 // FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19 // for more details.
20 //
21 // You should have received a copy of the GNU General Public License along
22 // with eCos; if not, write to the Free Software Foundation, Inc.,
23 // 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
24 //
25 // As a special exception, if other files instantiate templates or use macros
26 // or inline functions from this file, or you compile this file and link it
27 // with other works to produce a work based on this file, this file does not
28 // by itself cause the resulting work to be covered by the GNU General Public
29 // License. However the source code for this file must still be made available
30 // in accordance with section (3) of the GNU General Public License.
31 //
32 // This exception does not invalidate any other reasons why a work based on
33 // this file might be covered by the GNU General Public License.
34 //
35 // -------------------------------------------
36 //####ECOSGPLCOPYRIGHTEND####
37 //####BSDCOPYRIGHTBEGIN####
38 //
39 // -------------------------------------------
40 //
41 // Portions of this software may have been derived from OpenBSD, 
42 // FreeBSD or other sources, and are covered by the appropriate
43 // copyright disclaimers included herein.
44 //
45 // -------------------------------------------
46 //
47 //####BSDCOPYRIGHTEND####
48 //==========================================================================
49
50 /*
51  * ipcp.h - IP Control Protocol definitions.
52  *
53  * Copyright (c) 1989 Carnegie Mellon University.
54  * All rights reserved.
55  *
56  * Redistribution and use in source and binary forms are permitted
57  * provided that the above copyright notice and this paragraph are
58  * duplicated in all such forms and that any documentation,
59  * advertising materials, and other materials related to such
60  * distribution and use acknowledge that the software was developed
61  * by Carnegie Mellon University.  The name of the
62  * University may not be used to endorse or promote products derived
63  * from this software without specific prior written permission.
64  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
65  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
66  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
67  *
68  * $FreeBSD: src/usr.sbin/pppd/ipcp.h,v 1.10 1999/08/28 01:19:03 peter Exp $
69  */
70
71 /*
72  * Options.
73  */
74 #define CI_ADDRS        1       /* IP Addresses */
75 #define CI_COMPRESSTYPE 2       /* Compression Type */
76 #define CI_ADDR         3
77
78 #define CI_MS_DNS1      129     /* Primary DNS value */
79 #define CI_MS_WINS1     130     /* Primary WINS value */
80 #define CI_MS_DNS2      131     /* Secondary DNS value */
81 #define CI_MS_WINS2     132     /* Secondary WINS value */
82
83 #define MAX_STATES 16           /* from slcompress.h */
84
85 #define IPCP_VJMODE_OLD 1       /* "old" mode (option # = 0x0037) */
86 #define IPCP_VJMODE_RFC1172 2   /* "old-rfc"mode (option # = 0x002d) */
87 #define IPCP_VJMODE_RFC1332 3   /* "new-rfc"mode (option # = 0x002d, */
88                                 /*  maxslot and slot number compression) */
89
90 #define IPCP_VJ_COMP 0x002d     /* current value for VJ compression option*/
91 #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
92                                 /* compression option*/ 
93
94 typedef struct ipcp_options {
95     int neg_addr : 1;           /* Negotiate IP Address? */
96     int old_addrs : 1;          /* Use old (IP-Addresses) option? */
97     int req_addr : 1;           /* Ask peer to send IP address? */
98     int default_route : 1;      /* Assign default route through interface? */
99     int proxy_arp : 1;          /* Make proxy ARP entry for peer? */
100     int neg_vj : 1;             /* Van Jacobson Compression? */
101     int old_vj : 1;             /* use old (short) form of VJ option? */
102     int accept_local : 1;       /* accept peer's value for ouraddr */
103     int accept_remote : 1;      /* accept peer's value for hisaddr */
104 #ifdef CYGOPT_PPP_NS_NEGOTIATE
105     int neg_dns1 : 1;           /* Negotiate primary domain name server? */
106     int neg_wins1 : 1;          /* Negotiate primary WINS? */
107     int neg_dns2 : 1;           /* Negotiate secondary domain name server? */
108     int neg_wins2 : 1;          /* Negotiate secondary WINS? */
109 #endif
110     u_short vj_protocol;        /* protocol value to use in VJ option */
111     u_char maxslotindex, cflag; /* values for RFC1332 VJ compression neg. */
112     u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
113     u_int32_t dnsaddr[2];       /* Primary and secondary MS DNS entries */
114     u_int32_t winsaddr[2];      /* Primary and secondary MS WINS entries */
115 } ipcp_options;
116
117 extern fsm ipcp_fsm[];
118 extern ipcp_options ipcp_wantoptions[];
119 extern ipcp_options ipcp_gotoptions[];
120 extern ipcp_options ipcp_allowoptions[];
121 extern ipcp_options ipcp_hisoptions[];
122
123 char *ip_ntoa __P((u_int32_t));
124
125 extern struct protent ipcp_protent;