This library is stripped down version of NetServices library. HTTP server and client function is NOT supported.

Dependents:   imu-daq-eth

Committer:
idinor
Date:
Wed Jul 20 11:45:39 2011 +0000
Revision:
0:dcf3c92487ca

        

Who changed what in which revision?

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