Dependencies:   mbed

Committer:
gbeardall
Date:
Mon Oct 17 10:39:17 2011 +0000
Revision:
0:715023d993d6

        

Who changed what in which revision?

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