LineLedControl

Dependencies:   LPD8806 mbed

Fork of LPD8806_Test by Jelmer Tiete

Committer:
sfjmt
Date:
Mon Aug 19 12:14:37 2013 +0000
Revision:
3:b0a1b4b24d3c
LPD8806 control

Who changed what in which revision?

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