HTTPClient using static IP

Dependencies:   mbed

Committer:
mr_q
Date:
Mon May 30 11:53:37 2011 +0000
Revision:
0:d8f2f7d5f31b
v0.01 Draft

Who changed what in which revision?

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