创建mbed

Dependencies:   EthernetInterface SDFileSystem mbed-rtos mbed

Committer:
sunyiming
Date:
Tue Mar 06 08:53:46 2018 +0000
Revision:
1:6465a3f5c58a
??OK

Who changed what in which revision?

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