ipcp.c (49434) | ipcp.c (50059) |
---|---|
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.81 1999/06/08 20:12:06 brian Exp $ | 20 * $Id: ipcp.c,v 1.82 1999/08/05 10:32:12 brian Exp $ |
21 * 22 * TODO: 23 * o Support IPADDRS properly 24 * o Validate the length in IpcpDecodeConfig 25 */ 26#include <sys/param.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 7 unchanged lines hidden (view full) --- 36#include <errno.h> 37#include <fcntl.h> 38#include <resolv.h> 39#include <stdlib.h> 40#include <string.h> 41#include <termios.h> 42#include <unistd.h> 43 | 21 * 22 * TODO: 23 * o Support IPADDRS properly 24 * o Validate the length in IpcpDecodeConfig 25 */ 26#include <sys/param.h> 27#include <netinet/in_systm.h> 28#include <netinet/in.h> --- 7 unchanged lines hidden (view full) --- 36#include <errno.h> 37#include <fcntl.h> 38#include <resolv.h> 39#include <stdlib.h> 40#include <string.h> 41#include <termios.h> 42#include <unistd.h> 43 |
44#ifndef NOALIAS | 44#ifndef NONAT |
45#ifdef __FreeBSD__ 46#include <alias.h> 47#else 48#include "alias.h" 49#endif 50#endif 51#include "layer.h" 52#include "ua.h" --- 687 unchanged lines hidden (view full) --- 740int 741ipcp_InterfaceUp(struct ipcp *ipcp) 742{ 743 if (ipcp_SetIPaddress(ipcp->fsm.bundle, ipcp->my_ip, ipcp->peer_ip, 0) < 0) { 744 log_Printf(LogERROR, "ipcp_InterfaceUp: unable to set ip address\n"); 745 return 0; 746 } 747 | 45#ifdef __FreeBSD__ 46#include <alias.h> 47#else 48#include "alias.h" 49#endif 50#endif 51#include "layer.h" 52#include "ua.h" --- 687 unchanged lines hidden (view full) --- 740int 741ipcp_InterfaceUp(struct ipcp *ipcp) 742{ 743 if (ipcp_SetIPaddress(ipcp->fsm.bundle, ipcp->my_ip, ipcp->peer_ip, 0) < 0) { 744 log_Printf(LogERROR, "ipcp_InterfaceUp: unable to set ip address\n"); 745 return 0; 746 } 747 |
748#ifndef NOALIAS 749 if (ipcp->fsm.bundle->AliasEnabled) | 748#ifndef NONAT 749 if (ipcp->fsm.bundle->NatEnabled) |
750 PacketAliasSetAddress(ipcp->my_ip); 751#endif 752 753 return 1; 754} 755 756static int 757IpcpLayerUp(struct fsm *fp) --- 474 unchanged lines hidden --- | 750 PacketAliasSetAddress(ipcp->my_ip); 751#endif 752 753 return 1; 754} 755 756static int 757IpcpLayerUp(struct fsm *fp) --- 474 unchanged lines hidden --- |