Committer:
mbed714
Date:
Sat Sep 18 23:05:49 2010 +0000
Revision:
0:d616ece2d859

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed714 0:d616ece2d859 1 /*****************************************************************************
mbed714 0:d616ece2d859 2 * ipcp.h - PPP IP NCP: Internet Protocol Network Control Protocol header file.
mbed714 0:d616ece2d859 3 *
mbed714 0:d616ece2d859 4 * Copyright (c) 2003 by Marc Boucher, Services Informatiques (MBSI) inc.
mbed714 0:d616ece2d859 5 * portions Copyright (c) 1997 Global Election Systems Inc.
mbed714 0:d616ece2d859 6 *
mbed714 0:d616ece2d859 7 * The authors hereby grant permission to use, copy, modify, distribute,
mbed714 0:d616ece2d859 8 * and license this software and its documentation for any purpose, provided
mbed714 0:d616ece2d859 9 * that existing copyright notices are retained in all copies and that this
mbed714 0:d616ece2d859 10 * notice and the following disclaimer are included verbatim in any
mbed714 0:d616ece2d859 11 * distributions. No written agreement, license, or royalty fee is required
mbed714 0:d616ece2d859 12 * for any of the authorized uses.
mbed714 0:d616ece2d859 13 *
mbed714 0:d616ece2d859 14 * THIS SOFTWARE IS PROVIDED BY THE CONTRIBUTORS *AS IS* AND ANY EXPRESS OR
mbed714 0:d616ece2d859 15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
mbed714 0:d616ece2d859 16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
mbed714 0:d616ece2d859 17 * IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
mbed714 0:d616ece2d859 18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
mbed714 0:d616ece2d859 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
mbed714 0:d616ece2d859 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
mbed714 0:d616ece2d859 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
mbed714 0:d616ece2d859 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
mbed714 0:d616ece2d859 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed714 0:d616ece2d859 24 *
mbed714 0:d616ece2d859 25 ******************************************************************************
mbed714 0:d616ece2d859 26 * REVISION HISTORY
mbed714 0:d616ece2d859 27 *
mbed714 0:d616ece2d859 28 * 03-01-01 Marc Boucher <marc@mbsi.ca>
mbed714 0:d616ece2d859 29 * Ported to lwIP.
mbed714 0:d616ece2d859 30 * 97-12-04 Guy Lancaster <glanca@gesn.com>, Global Election Systems Inc.
mbed714 0:d616ece2d859 31 * Original derived from BSD codes.
mbed714 0:d616ece2d859 32 *****************************************************************************/
mbed714 0:d616ece2d859 33 /*
mbed714 0:d616ece2d859 34 * ipcp.h - IP Control Protocol definitions.
mbed714 0:d616ece2d859 35 *
mbed714 0:d616ece2d859 36 * Copyright (c) 1989 Carnegie Mellon University.
mbed714 0:d616ece2d859 37 * All rights reserved.
mbed714 0:d616ece2d859 38 *
mbed714 0:d616ece2d859 39 * Redistribution and use in source and binary forms are permitted
mbed714 0:d616ece2d859 40 * provided that the above copyright notice and this paragraph are
mbed714 0:d616ece2d859 41 * duplicated in all such forms and that any documentation,
mbed714 0:d616ece2d859 42 * advertising materials, and other materials related to such
mbed714 0:d616ece2d859 43 * distribution and use acknowledge that the software was developed
mbed714 0:d616ece2d859 44 * by Carnegie Mellon University. The name of the
mbed714 0:d616ece2d859 45 * University may not be used to endorse or promote products derived
mbed714 0:d616ece2d859 46 * from this software without specific prior written permission.
mbed714 0:d616ece2d859 47 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
mbed714 0:d616ece2d859 48 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
mbed714 0:d616ece2d859 49 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
mbed714 0:d616ece2d859 50 *
mbed714 0:d616ece2d859 51 * $Id: ipcp.h,v 1.4 2010/01/18 20:49:43 goldsimon Exp $
mbed714 0:d616ece2d859 52 */
mbed714 0:d616ece2d859 53
mbed714 0:d616ece2d859 54 #ifndef IPCP_H
mbed714 0:d616ece2d859 55 #define IPCP_H
mbed714 0:d616ece2d859 56
mbed714 0:d616ece2d859 57 /*
mbed714 0:d616ece2d859 58 * Options.
mbed714 0:d616ece2d859 59 */
mbed714 0:d616ece2d859 60 #define CI_ADDRS 1 /* IP Addresses */
mbed714 0:d616ece2d859 61 #define CI_COMPRESSTYPE 2 /* Compression Type */
mbed714 0:d616ece2d859 62 #define CI_ADDR 3
mbed714 0:d616ece2d859 63
mbed714 0:d616ece2d859 64 #define CI_MS_DNS1 129 /* Primary DNS value */
mbed714 0:d616ece2d859 65 #define CI_MS_WINS1 128 /* Primary WINS value */
mbed714 0:d616ece2d859 66 #define CI_MS_DNS2 131 /* Secondary DNS value */
mbed714 0:d616ece2d859 67 #define CI_MS_WINS2 130 /* Secondary WINS value */
mbed714 0:d616ece2d859 68
mbed714 0:d616ece2d859 69 #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */
mbed714 0:d616ece2d859 70 #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */
mbed714 0:d616ece2d859 71 #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */
mbed714 0:d616ece2d859 72 /* maxslot and slot number compression) */
mbed714 0:d616ece2d859 73
mbed714 0:d616ece2d859 74 #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option */
mbed714 0:d616ece2d859 75 #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */
mbed714 0:d616ece2d859 76 /* compression option */
mbed714 0:d616ece2d859 77
mbed714 0:d616ece2d859 78 typedef struct ipcp_options {
mbed714 0:d616ece2d859 79 u_int neg_addr : 1; /* Negotiate IP Address? */
mbed714 0:d616ece2d859 80 u_int old_addrs : 1; /* Use old (IP-Addresses) option? */
mbed714 0:d616ece2d859 81 u_int req_addr : 1; /* Ask peer to send IP address? */
mbed714 0:d616ece2d859 82 u_int default_route : 1; /* Assign default route through interface? */
mbed714 0:d616ece2d859 83 u_int proxy_arp : 1; /* Make proxy ARP entry for peer? */
mbed714 0:d616ece2d859 84 u_int neg_vj : 1; /* Van Jacobson Compression? */
mbed714 0:d616ece2d859 85 u_int old_vj : 1; /* use old (short) form of VJ option? */
mbed714 0:d616ece2d859 86 u_int accept_local : 1; /* accept peer's value for ouraddr */
mbed714 0:d616ece2d859 87 u_int accept_remote : 1; /* accept peer's value for hisaddr */
mbed714 0:d616ece2d859 88 u_int req_dns1 : 1; /* Ask peer to send primary DNS address? */
mbed714 0:d616ece2d859 89 u_int req_dns2 : 1; /* Ask peer to send secondary DNS address? */
mbed714 0:d616ece2d859 90 u_short vj_protocol; /* protocol value to use in VJ option */
mbed714 0:d616ece2d859 91 u_char maxslotindex; /* VJ slots - 1. */
mbed714 0:d616ece2d859 92 u_char cflag; /* VJ slot compression flag. */
mbed714 0:d616ece2d859 93 u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */
mbed714 0:d616ece2d859 94 u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */
mbed714 0:d616ece2d859 95 u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */
mbed714 0:d616ece2d859 96 } ipcp_options;
mbed714 0:d616ece2d859 97
mbed714 0:d616ece2d859 98 extern fsm ipcp_fsm[];
mbed714 0:d616ece2d859 99 extern ipcp_options ipcp_wantoptions[];
mbed714 0:d616ece2d859 100 extern ipcp_options ipcp_gotoptions[];
mbed714 0:d616ece2d859 101 extern ipcp_options ipcp_allowoptions[];
mbed714 0:d616ece2d859 102 extern ipcp_options ipcp_hisoptions[];
mbed714 0:d616ece2d859 103
mbed714 0:d616ece2d859 104 extern struct protent ipcp_protent;
mbed714 0:d616ece2d859 105
mbed714 0:d616ece2d859 106 #endif /* IPCP_H */