Xbee test 2

Dependencies:   XBee mbed

Committer:
takashiyamanoue
Date:
Sat Jul 21 04:08:27 2012 +0000
Revision:
0:ffac63d6a7f0
xbee test 2

Who changed what in which revision?

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