Counter

Dependencies:   EthernetInterface NTPClient SDFileSystem TextLCD WebSocketClient mbed-rtos mbed Socket lwip-eth lwip-sys lwip FATFileSystem

Committer:
Tuxitheone
Date:
Mon Feb 29 18:59:15 2016 +0000
Revision:
0:ecaf3e593122
TankCounter

Who changed what in which revision?

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