Experimental HTTPClient with proxy support

Committer:
igorsk
Date:
Wed Jun 29 16:01:58 2011 +0000
Revision:
0:b56b6a05cad4

        

Who changed what in which revision?

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