Embedded C project:18/12/2014

Dependencies:   DS1307 TextLCD mbed

Committer:
ninoderkinderen
Date:
Thu Dec 18 09:35:49 2014 +0000
Revision:
0:8d87bc453349
Programma embedded C

Who changed what in which revision?

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