A modified version of http://mbed.org/users/segundo/libraries/NetServices/ljhqix to add HTTP proxy feature (based on http://mbed.org/users/igorsk/programs/NetServicesSource/ltjpag)

Dependents:   SenseClient

Committer:
mimil
Date:
Tue Sep 06 13:26:45 2011 +0000
Revision:
0:308f83189a3f

        

Who changed what in which revision?

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