Measure system

Dependencies:   EthernetNetIf mbed RF12B

Committer:
benecsj
Date:
Thu Mar 10 19:56:45 2011 +0000
Revision:
1:b26ab2467b1a

        

Who changed what in which revision?

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