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.2 1995/02/26 12:17:34 amurai 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 struct ipcpstate { 33 struct in_addr his_ipaddr; /* IP address he is willing to use */ 34 u_long his_compproto; 35 36 struct in_addr want_ipaddr; /* IP address I'm willing to use */ 37 u_long want_compproto; 38 39 u_long his_reject; /* Request codes rejected by peer */ 40 u_long my_reject; /* Request codes I have rejected */ 41 int heis1172; /* True if he is speaking rfc1172 */ 42 }; 43 44 struct compreq { 45 u_short proto; 46 u_char slots; 47 u_char compcid; 48 }; 49 50 struct in_range { 51 struct in_addr ipaddr; 52 struct in_addr mask; 53 int width; 54 }; 55 56 extern struct ipcpstate IpcpInfo; 57 extern struct in_range DefMyAddress; 58 extern struct in_range DefHisAddress; 59 extern struct in_range DefTriggerAddress; 60 61 extern void IpcpInit __P((void)); 62 extern void IpcpDefAddress __P((void)); 63 #endif 64