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