Dependents:   RTnoV3 RTnoV3_LED RTnoV3_Template RTnoV3_ADC ... more

Committer:
sherckuith
Date:
Sat Dec 31 11:25:27 2011 +0000
Revision:
0:479ce5546098
Ethernet

Who changed what in which revision?

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