1 /* 2 * ipcp.h - IP Control Protocol definitions. 3 * 4 * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: 9 * 10 * 1. Redistributions of source code must retain the above copyright 11 * notice, this list of conditions and the following disclaimer. 12 * 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * 18 * 3. The name "Carnegie Mellon University" must not be used to 19 * endorse or promote products derived from this software without 20 * prior written permission. For permission or any legal 21 * details, please contact 22 * Office of Technology Transfer 23 * Carnegie Mellon University 24 * 5000 Forbes Avenue 25 * Pittsburgh, PA 15213-3890 26 * (412) 268-4387, fax: (412) 268-7395 27 * tech-transfer@andrew.cmu.edu 28 * 29 * 4. Redistributions of any form whatsoever must retain the following 30 * acknowledgment: 31 * "This product includes software developed by Computing Services 32 * at Carnegie Mellon University (http://www.cmu.edu/computing/)." 33 * 34 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 35 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 36 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 37 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 38 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 39 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 40 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 41 * 42 * $Id: ipcp.h,v 1.14 2002/12/04 23:03:32 paulus Exp $ 43 */ 44 45 #include "netif/ppp/ppp_opts.h" 46 #if PPP_SUPPORT && PPP_IPV4_SUPPORT /* don't build if not configured for use in lwipopts.h */ 47 48 #ifndef IPCP_H 49 #define IPCP_H 50 51 /* 52 * Options. 53 */ 54 #define CI_ADDRS 1 /* IP Addresses */ 55 #if VJ_SUPPORT 56 #define CI_COMPRESSTYPE 2 /* Compression Type */ 57 #endif /* VJ_SUPPORT */ 58 #define CI_ADDR 3 59 60 #if LWIP_DNS 61 #define CI_MS_DNS1 129 /* Primary DNS value */ 62 #define CI_MS_DNS2 131 /* Secondary DNS value */ 63 #endif /* LWIP_DNS */ 64 #if 0 /* UNUSED - WINS */ 65 #define CI_MS_WINS1 130 /* Primary WINS value */ 66 #define CI_MS_WINS2 132 /* Secondary WINS value */ 67 #endif /* UNUSED - WINS */ 68 69 #if VJ_SUPPORT 70 #define MAX_STATES 16 /* from slcompress.h */ 71 72 #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ 73 #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ 74 #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ 75 /* maxslot and slot number compression) */ 76 77 #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ 78 #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ 79 /* compression option*/ 80 #endif /* VJ_SUPPORT */ 81 82 typedef struct ipcp_options { 83 unsigned int neg_addr :1; /* Negotiate IP Address? */ 84 unsigned int old_addrs :1; /* Use old (IP-Addresses) option? */ 85 unsigned int req_addr :1; /* Ask peer to send IP address? */ 86 #if 0 /* UNUSED */ 87 unsigned int default_route :1; /* Assign default route through interface? */ 88 unsigned int replace_default_route :1; /* Replace default route through interface? */ 89 #endif /* UNUSED */ 90 #if 0 /* UNUSED - PROXY ARP */ 91 unsigned int proxy_arp :1; /* Make proxy ARP entry for peer? */ 92 #endif /* UNUSED - PROXY ARP */ 93 #if VJ_SUPPORT 94 unsigned int neg_vj :1; /* Van Jacobson Compression? */ 95 unsigned int old_vj :1; /* use old (short) form of VJ option? */ 96 unsigned int cflag :1; 97 #endif /* VJ_SUPPORT */ 98 unsigned int accept_local :1; /* accept peer's value for ouraddr */ 99 unsigned int accept_remote :1; /* accept peer's value for hisaddr */ 100 #if LWIP_DNS 101 unsigned int req_dns1 :1; /* Ask peer to send primary DNS address? */ 102 unsigned int req_dns2 :1; /* Ask peer to send secondary DNS address? */ 103 #endif /* LWIP_DNS */ 104 105 u32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ 106 #if LWIP_DNS 107 u32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ 108 #endif /* LWIP_DNS */ 109 #if 0 /* UNUSED - WINS */ 110 u32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ 111 #endif /* UNUSED - WINS */ 112 113 #if VJ_SUPPORT 114 u16_t vj_protocol; /* protocol value to use in VJ option */ 115 u8_t maxslotindex; /* values for RFC1332 VJ compression neg. */ 116 #endif /* VJ_SUPPORT */ 117 } ipcp_options; 118 119 #if 0 /* UNUSED, already defined by lwIP */ 120 char *ip_ntoa (u32_t); 121 #endif /* UNUSED, already defined by lwIP */ 122 123 extern const struct protent ipcp_protent; 124 125 #endif /* IPCP_H */ 126 #endif /* PPP_SUPPORT && PPP_IPV4_SUPPORT */ 127