1*842cf550Sderaadt /* $OpenBSD: ipcp.h,v 1.7 2002/07/01 19:31:37 deraadt Exp $ */ 2608f9123Sniklas 3df930be7Sderaadt /* 4df930be7Sderaadt * ipcp.h - IP Control Protocol definitions. 5df930be7Sderaadt * 6*842cf550Sderaadt * Copyright (c) 1984-2000 Carnegie Mellon University. All rights reserved. 7df930be7Sderaadt * 8*842cf550Sderaadt * Redistribution and use in source and binary forms, with or without 9*842cf550Sderaadt * modification, are permitted provided that the following conditions 10*842cf550Sderaadt * are met: 11ba05f447Smillert * 12*842cf550Sderaadt * 1. Redistributions of source code must retain the above copyright 13*842cf550Sderaadt * notice, this list of conditions and the following disclaimer. 14*842cf550Sderaadt * 15*842cf550Sderaadt * 2. Redistributions in binary form must reproduce the above copyright 16*842cf550Sderaadt * notice, this list of conditions and the following disclaimer in 17*842cf550Sderaadt * the documentation and/or other materials provided with the 18*842cf550Sderaadt * distribution. 19*842cf550Sderaadt * 20*842cf550Sderaadt * 3. The name "Carnegie Mellon University" must not be used to 21*842cf550Sderaadt * endorse or promote products derived from this software without 22*842cf550Sderaadt * prior written permission. For permission or any legal 23*842cf550Sderaadt * details, please contact 24*842cf550Sderaadt * Office of Technology Transfer 25*842cf550Sderaadt * Carnegie Mellon University 26*842cf550Sderaadt * 5000 Forbes Avenue 27*842cf550Sderaadt * Pittsburgh, PA 15213-3890 28*842cf550Sderaadt * (412) 268-4387, fax: (412) 268-7395 29*842cf550Sderaadt * tech-transfer@andrew.cmu.edu 30*842cf550Sderaadt * 31*842cf550Sderaadt * 4. Redistributions of any form whatsoever must retain the following 32*842cf550Sderaadt * acknowledgment: 33*842cf550Sderaadt * "This product includes software developed by Computing Services 34*842cf550Sderaadt * at Carnegie Mellon University (http://www.cmu.edu/computing/)." 35*842cf550Sderaadt * 36*842cf550Sderaadt * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO 37*842cf550Sderaadt * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 38*842cf550Sderaadt * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE 39*842cf550Sderaadt * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 40*842cf550Sderaadt * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN 41*842cf550Sderaadt * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING 42*842cf550Sderaadt * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 43df930be7Sderaadt */ 44df930be7Sderaadt 45df930be7Sderaadt /* 46df930be7Sderaadt * Options. 47df930be7Sderaadt */ 48df930be7Sderaadt #define CI_ADDRS 1 /* IP Addresses */ 49df930be7Sderaadt #define CI_COMPRESSTYPE 2 /* Compression Type */ 50df930be7Sderaadt #define CI_ADDR 3 51df930be7Sderaadt 52608f9123Sniklas #define CI_MS_DNS1 129 /* Primary DNS value */ 53a3adf44fSmillert #define CI_MS_WINS1 130 /* Primary WINS value */ 54608f9123Sniklas #define CI_MS_DNS2 131 /* Secondary DNS value */ 55a3adf44fSmillert #define CI_MS_WINS2 132 /* Secondary WINS value */ 56608f9123Sniklas 57df930be7Sderaadt #define MAX_STATES 16 /* from slcompress.h */ 58df930be7Sderaadt 59df930be7Sderaadt #define IPCP_VJMODE_OLD 1 /* "old" mode (option # = 0x0037) */ 60df930be7Sderaadt #define IPCP_VJMODE_RFC1172 2 /* "old-rfc"mode (option # = 0x002d) */ 61df930be7Sderaadt #define IPCP_VJMODE_RFC1332 3 /* "new-rfc"mode (option # = 0x002d, */ 62df930be7Sderaadt /* maxslot and slot number compression) */ 63df930be7Sderaadt 64df930be7Sderaadt #define IPCP_VJ_COMP 0x002d /* current value for VJ compression option*/ 65df930be7Sderaadt #define IPCP_VJ_COMP_OLD 0x0037 /* "old" (i.e, broken) value for VJ */ 66df930be7Sderaadt /* compression option*/ 67df930be7Sderaadt 68df930be7Sderaadt typedef struct ipcp_options { 69df930be7Sderaadt int neg_addr : 1; /* Negotiate IP Address? */ 70df930be7Sderaadt int old_addrs : 1; /* Use old (IP-Addresses) option? */ 71df930be7Sderaadt int req_addr : 1; /* Ask peer to send IP address? */ 72df930be7Sderaadt int default_route : 1; /* Assign default route through interface? */ 73df930be7Sderaadt int proxy_arp : 1; /* Make proxy ARP entry for peer? */ 74df930be7Sderaadt int neg_vj : 1; /* Van Jacobson Compression? */ 75df930be7Sderaadt int old_vj : 1; /* use old (short) form of VJ option? */ 76df930be7Sderaadt int accept_local : 1; /* accept peer's value for ouraddr */ 77df930be7Sderaadt int accept_remote : 1; /* accept peer's value for hisaddr */ 78df930be7Sderaadt u_short vj_protocol; /* protocol value to use in VJ option */ 79df930be7Sderaadt u_char maxslotindex, cflag; /* values for RFC1332 VJ compression neg. */ 80df930be7Sderaadt u_int32_t ouraddr, hisaddr; /* Addresses in NETWORK BYTE ORDER */ 81608f9123Sniklas u_int32_t dnsaddr[2]; /* Primary and secondary MS DNS entries */ 82ba05f447Smillert u_int32_t winsaddr[2]; /* Primary and secondary MS WINS entries */ 83df930be7Sderaadt } ipcp_options; 84df930be7Sderaadt 85df930be7Sderaadt extern fsm ipcp_fsm[]; 86df930be7Sderaadt extern ipcp_options ipcp_wantoptions[]; 87df930be7Sderaadt extern ipcp_options ipcp_gotoptions[]; 88df930be7Sderaadt extern ipcp_options ipcp_allowoptions[]; 89df930be7Sderaadt extern ipcp_options ipcp_hisoptions[]; 90df930be7Sderaadt 91c72b5b24Smillert char *ip_ntoa(u_int32_t); 92608f9123Sniklas 93608f9123Sniklas extern struct protent ipcp_protent; 94