Onenet

Dependents:   K64F_eCompass_OneNET_JW

Committer:
robert_jw
Date:
Mon Jun 20 01:40:20 2016 +0000
Revision:
0:b2805b6888dc
ADS

Who changed what in which revision?

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