1 /* 2 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 3 * 4 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 5 * 6 * Redistribution and use in source and binary forms are permitted 7 * provided that the above copyright notice and this paragraph are 8 * duplicated in all such forms and that any documentation, 9 * advertising materials, and other materials related to such 10 * distribution and use acknowledge that the software was developed 11 * by the Internet Initiative Japan. The name of the 12 * IIJ may not be used to endorse or promote products derived 13 * from this software without specific prior written permission. 14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 15 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 16 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 17 * 18 * $Id: ipcp.h,v 1.6 1997/02/22 16:10:22 peter Exp $ 19 * 20 * TODO: 21 */ 22 23 #ifndef _IPCP_H_ 24 #define _IPCP_H_ 25 26 #define IPCP_MAXCODE CODE_CODEREJ 27 28 #define TY_IPADDRS 1 29 #define TY_COMPPROTO 2 30 #define TY_IPADDR 3 31 32 /* MS PPP NameServer and NetBIOS NameServer stuff */ 33 34 #ifndef NOMSEXT 35 #define TY_PRIMARY_DNS 129 36 #define TY_PRIMARY_NBNS 130 37 #define TY_SECONDARY_DNS 131 38 #define TY_SECONDARY_NBNS 132 39 #endif 40 41 struct ipcpstate { 42 struct in_addr his_ipaddr; /* IP address he is willing to use */ 43 u_long his_compproto; 44 45 struct in_addr want_ipaddr; /* IP address I'm willing to use */ 46 u_long want_compproto; 47 48 u_long his_reject; /* Request codes rejected by peer */ 49 u_long my_reject; /* Request codes I have rejected */ 50 int heis1172; /* True if he is speaking rfc1172 */ 51 }; 52 53 struct compreq { 54 u_short proto; 55 u_char slots; 56 u_char compcid; 57 }; 58 59 struct in_range { 60 struct in_addr ipaddr; 61 struct in_addr mask; 62 int width; 63 }; 64 65 extern struct ipcpstate IpcpInfo; 66 extern struct in_range DefMyAddress; 67 extern struct in_range DefHisAddress; 68 extern struct in_range DefTriggerAddress; 69 70 #ifndef NOMSEXT 71 extern struct in_addr ns_entries[2]; 72 extern struct in_addr nbns_entries[2]; 73 #endif 74 75 extern void IpcpInit(void); 76 extern void IpcpDefAddress(void); 77 #endif 78