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