12Oct2012MbedLab

Dependents:   Lab3_VoiceMeter

Fork of EthernetNetIf by Donatien Garnier

Committer:
psawant9
Date:
Fri Oct 12 16:02:00 2012 +0000
Revision:
6:22ce63eddd2b
Parent:
0:422060928e37
Done

Who changed what in which revision?

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