ipcp.c (29048) | ipcp.c (30187) |
---|---|
1/* 2 * PPP IP Control Protocol (IPCP) Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * PPP IP Control Protocol (IPCP) Module 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan, Inc. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: ipcp.c,v 1.27 1997/08/31 22:59:29 brian Exp $ | 20 * $Id: ipcp.c,v 1.28 1997/09/03 02:08:18 brian Exp $ |
21 * 22 * TODO: 23 * o More RFC1772 backwoard compatibility 24 */ 25#include <sys/types.h> 26#include <netdb.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 6 unchanged lines hidden (view full) --- 35#include "lcp.h" 36#include "ipcp.h" 37#include "slcompress.h" 38#include "os.h" 39#include "phase.h" 40#include "loadalias.h" 41#include "vars.h" 42 | 21 * 22 * TODO: 23 * o More RFC1772 backwoard compatibility 24 */ 25#include <sys/types.h> 26#include <netdb.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 6 unchanged lines hidden (view full) --- 35#include "lcp.h" 36#include "ipcp.h" 37#include "slcompress.h" 38#include "os.h" 39#include "phase.h" 40#include "loadalias.h" 41#include "vars.h" 42 |
43extern void VjInit(int); |
|
43extern void PutConfValue(); 44extern void Prompt(); 45extern struct in_addr ifnetmask; 46 47struct ipcpstate IpcpInfo; 48struct in_range DefMyAddress, DefHisAddress; 49struct in_addr TriggerAddress; 50int HaveTriggerAddress; --- 244 unchanged lines hidden (view full) --- 295IpcpLayerUp(struct fsm * fp) 296{ 297 char tbuff[100]; 298 299 Prompt(); 300 LogPrintf(LogIPCP, "IpcpLayerUp(%d).\n", fp->state); 301 snprintf(tbuff, sizeof(tbuff), "myaddr = %s ", 302 inet_ntoa(IpcpInfo.want_ipaddr)); | 44extern void PutConfValue(); 45extern void Prompt(); 46extern struct in_addr ifnetmask; 47 48struct ipcpstate IpcpInfo; 49struct in_range DefMyAddress, DefHisAddress; 50struct in_addr TriggerAddress; 51int HaveTriggerAddress; --- 244 unchanged lines hidden (view full) --- 296IpcpLayerUp(struct fsm * fp) 297{ 298 char tbuff[100]; 299 300 Prompt(); 301 LogPrintf(LogIPCP, "IpcpLayerUp(%d).\n", fp->state); 302 snprintf(tbuff, sizeof(tbuff), "myaddr = %s ", 303 inet_ntoa(IpcpInfo.want_ipaddr)); |
304 305 if (IpcpInfo.his_compproto >> 16 == PROTO_VJCOMP) 306 VjInit((IpcpInfo.his_compproto >> 8) & 255); 307 |
|
303 LogPrintf(LogIsKept(LogIPCP) ? LogIPCP : LogLINK, " %s hisaddr = %s\n", 304 tbuff, inet_ntoa(IpcpInfo.his_ipaddr)); 305 if (OsSetIpaddress(IpcpInfo.want_ipaddr, IpcpInfo.his_ipaddr, ifnetmask) < 0) { 306 if (VarTerm) 307 LogPrintf(LogERROR, "IpcpLayerUp: unable to set ip address\n"); 308 return; 309 } 310 if (mode & MODE_ALIAS) --- 293 unchanged lines hidden --- | 308 LogPrintf(LogIsKept(LogIPCP) ? LogIPCP : LogLINK, " %s hisaddr = %s\n", 309 tbuff, inet_ntoa(IpcpInfo.his_ipaddr)); 310 if (OsSetIpaddress(IpcpInfo.want_ipaddr, IpcpInfo.his_ipaddr, ifnetmask) < 0) { 311 if (VarTerm) 312 LogPrintf(LogERROR, "IpcpLayerUp: unable to set ip address\n"); 313 return; 314 } 315 if (mode & MODE_ALIAS) --- 293 unchanged lines hidden --- |