Demo Application for the Celeritous Breakout Board

Dependencies:   mbed

Committer:
celeritous
Date:
Fri May 18 03:55:10 2012 +0000
Revision:
0:1a3da73fe36a
Celeritous_BreakoutBoardDemo

Who changed what in which revision?

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