Michael Fischler / Mbed 2 deprecated Contest_Winner

Dependencies:   mbed

Committer:
mafischl
Date:
Thu Oct 13 18:01:31 2011 +0000
Revision:
1:5a7cce9994a3
Parent:
0:d9266031f832

        

Who changed what in which revision?

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