ip.c (15738) | ip.c (20120) |
---|---|
1/* 2 * PPP IP Protocol Interface 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. 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 Protocol Interface 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. 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: ip.c,v 1.8 1996/01/30 11:08:33 dfr Exp $ | 20 * $Id: ip.c,v 1.9 1996/05/11 20:48:25 phk Exp $ |
21 * 22 * TODO: 23 * o Return ICMP message for filterd packet 24 * and optionaly record it into log. 25 */ 26#include "fsm.h" 27#include "lcpproto.h" 28#include "hdlc.h" --- 19 unchanged lines hidden (view full) --- 48 49/* 50 * Start Idle timer. If timeout is reached, we call LcpClose() to 51 * close LCP and link. 52 */ 53void 54StartIdleTimer() 55{ | 21 * 22 * TODO: 23 * o Return ICMP message for filterd packet 24 * and optionaly record it into log. 25 */ 26#include "fsm.h" 27#include "lcpproto.h" 28#include "hdlc.h" --- 19 unchanged lines hidden (view full) --- 48 49/* 50 * Start Idle timer. If timeout is reached, we call LcpClose() to 51 * close LCP and link. 52 */ 53void 54StartIdleTimer() 55{ |
56 if (!(mode & MODE_DEDICATED)) { | 56 if (!(mode & (MODE_DEDICATED|MODE_DDIAL))) { |
57 StopTimer(&IdleTimer); 58 IdleTimer.func = IdleTimeout; 59 IdleTimer.load = VarIdleTimeout * SECTICKS; 60 IdleTimer.state = TIMER_STOPPED; 61 StartTimer(&IdleTimer); 62 } 63} 64 --- 4 unchanged lines hidden (view full) --- 69} 70 71/* 72 * If any IP layer traffic is detected, refresh IdleTimer. 73 */ 74static void 75RestartIdleTimer() 76{ | 57 StopTimer(&IdleTimer); 58 IdleTimer.func = IdleTimeout; 59 IdleTimer.load = VarIdleTimeout * SECTICKS; 60 IdleTimer.state = TIMER_STOPPED; 61 StartTimer(&IdleTimer); 62 } 63} 64 --- 4 unchanged lines hidden (view full) --- 69} 70 71/* 72 * If any IP layer traffic is detected, refresh IdleTimer. 73 */ 74static void 75RestartIdleTimer() 76{ |
77 if (!(mode & MODE_DEDICATED) && ipKeepAlive ) { | 77 if (!(mode & (MODE_DEDICATED|MODE_DDIAL)) && ipKeepAlive ) { |
78 StartTimer(&IdleTimer); 79 ipIdleSecs = 0; 80 } 81} 82 83static u_short interactive_ports[32] = { 84 544, 513, 514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85 0, 0, 0, 0, 0, 21, 22, 23, 0, 0, 0, 0, 0, 0, 0, 543, --- 318 unchanged lines hidden --- | 78 StartTimer(&IdleTimer); 79 ipIdleSecs = 0; 80 } 81} 82 83static u_short interactive_ports[32] = { 84 544, 513, 514, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 85 0, 0, 0, 0, 0, 21, 22, 23, 0, 0, 0, 0, 0, 0, 0, 543, --- 318 unchanged lines hidden --- |