ipcp.h revision 30715
133965Sjdp/* 2130561Sobrien * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 3130561Sobrien * 433965Sjdp * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 589857Sobrien * 633965Sjdp * Redistribution and use in source and binary forms are permitted 789857Sobrien * provided that the above copyright notice and this paragraph are 889857Sobrien * duplicated in all such forms and that any documentation, 989857Sobrien * advertising materials, and other materials related to such 1089857Sobrien * distribution and use acknowledge that the software was developed 1133965Sjdp * by the Internet Initiative Japan. The name of the 1289857Sobrien * IIJ may not be used to endorse or promote products derived 1389857Sobrien * from this software without specific prior written permission. 1489857Sobrien * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1589857Sobrien * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1633965Sjdp * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1789857Sobrien * 1889857Sobrien * $Id: ipcp.h,v 1.10 1997/09/03 02:08:19 brian Exp $ 1989857Sobrien * 2033965Sjdp * TODO: 2133965Sjdp */ 2233965Sjdp 2333965Sjdp#define IPCP_MAXCODE CODE_CODEREJ 2433965Sjdp 2533965Sjdp#define TY_IPADDRS 1 2633965Sjdp#define TY_COMPPROTO 2 2733965Sjdp#define TY_IPADDR 3 2833965Sjdp 2989857Sobrien/* MS PPP NameServer and NetBIOS NameServer stuff */ 3033965Sjdp 3133965Sjdp#ifndef NOMSEXT 3233965Sjdp#define TY_PRIMARY_DNS 129 3333965Sjdp#define TY_PRIMARY_NBNS 130 3491041Sobrien#define TY_SECONDARY_DNS 131 3533965Sjdp#define TY_SECONDARY_NBNS 132 3633965Sjdp 3733965Sjdpextern struct in_addr ns_entries[2]; 3833965Sjdpextern struct in_addr nbns_entries[2]; 3933965Sjdp#endif 4033965Sjdp 4133965Sjdpstruct ipcpstate { 4233965Sjdp struct in_addr his_ipaddr; /* IP address he is willing to use */ 4333965Sjdp u_long his_compproto; 4433965Sjdp 4589857Sobrien struct in_addr want_ipaddr; /* IP address I'm willing to use */ 4689857Sobrien u_long want_compproto; 4789857Sobrien 4833965Sjdp u_long his_reject; /* Request codes rejected by peer */ 4933965Sjdp u_long my_reject; /* Request codes I have rejected */ 5033965Sjdp int heis1172; /* True if he is speaking rfc1172 */ 5189857Sobrien}; 5233965Sjdp 5389857Sobrienstruct compreq { 5489857Sobrien u_short proto; 5589857Sobrien u_char slots; 5689857Sobrien u_char compcid; 5733965Sjdp}; 5833965Sjdp 5933965Sjdpstruct in_range { 6038889Sjdp struct in_addr ipaddr; 6133965Sjdp struct in_addr mask; 6289857Sobrien int width; 6333965Sjdp}; 64130561Sobrien 65130561Sobrienextern struct ipcpstate IpcpInfo; 66130561Sobrienextern struct in_range DefMyAddress; 67130561Sobrienextern struct in_range DefHisAddress; 68130561Sobrienextern struct in_addr TriggerAddress; 6938889Sjdpextern int HaveTriggerAddress; 70130561Sobrienextern struct fsm IpcpFsm; 7138889Sjdpextern struct pppTimer IpcpReportTimer; 72130561Sobrien 73130561Sobrienextern void IpcpInit(void); 74130561Sobrienextern void IpcpDefAddress(void); 75130561Sobrienextern void IpcpUp(void); 76130561Sobrienextern void IpcpOpen(void); 77130561Sobrienextern int ReportIpcpStatus(void); 78130561Sobrien