Forked from the DieterGraef Library

Fork of F7_Ethernet by Dieter Graef

Committer:
EmbeddedSam
Date:
Fri Nov 18 12:48:10 2016 +0000
Revision:
2:fdef48f830c0
Parent:
0:d26c1b55cfca
Linking MQTT together, starting with mbed-cli

Who changed what in which revision?

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