1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-26 16:18:31 +00:00

Allow the transition from an idle timeout value

of zero (no timeout) while IPCP is up.
Move some prototypes into .h files and re-order
some includes.
This commit is contained in:
Brian Somers 1997-09-03 00:40:51 +00:00
parent 170fa4e888
commit b6d7b1e061
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=29043
5 changed files with 22 additions and 12 deletions

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: ip.c,v 1.22 1997/06/16 21:20:00 brian Exp $
* $Id: ip.c,v 1.23 1997/08/25 00:29:13 brian Exp $
*
* TODO:
* o Return ICMP message for filterd packet
@ -38,6 +38,7 @@
#include "filter.h"
#include "mbuf.h"
#include "log.h"
#include "os.h"
extern void SendPppFrame();
extern void LcpClose();
@ -71,7 +72,7 @@ StartIdleTimer()
void
UpdateIdleTimer()
{
if (IdleTimer.state == TIMER_RUNNING)
if (OsLinkIsUp())
StartIdleTimer();
}

View File

@ -17,13 +17,15 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: lcp.c,v 1.27 1997/08/25 00:29:15 brian Exp $
* $Id: lcp.c,v 1.28 1997/08/31 22:59:31 brian Exp $
*
* TODO:
* o Validate magic number received from peer.
* o Limit data field length by MRU
*/
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "fsm.h"
#include "lcp.h"
#include "ipcp.h"
@ -36,14 +38,12 @@
#include "loadalias.h"
#include "vars.h"
#include "auth.h"
#include <arpa/inet.h>
#include "timeout.h"
extern void IpcpUp();
extern void IpcpOpen();
extern void SetLinkParams(struct lcpstate *);
extern void Prompt();
extern void StopIdleTimer();
extern void OsLinkdown();
extern void Cleanup();
extern struct pppTimer IpcpReportTimer;
extern int randinit;

View File

@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: os.c,v 1.24 1997/08/25 00:29:23 brian Exp $
* $Id: os.c,v 1.25 1997/08/31 22:59:44 brian Exp $
*
*/
#include "fsm.h"
@ -224,6 +224,12 @@ OsLinkup()
}
}
int
OsLinkIsUp()
{
return linkup;
}
void
OsLinkdown()
{

View File

@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: os.h,v 1.6 1997/06/09 03:27:32 brian Exp $
* $Id: os.h,v 1.7 1997/08/25 00:29:24 brian Exp $
*
* TODO:
*/
@ -23,12 +23,14 @@
#ifndef _OS_H_
#define _OS_H_
int OsSetIpaddress(struct in_addr myaddr, struct in_addr hisaddr, struct in_addr netmask);
int OsInterfaceDown(int);
int OsSetIpaddress(struct in_addr myaddr, struct in_addr hisaddr,
struct in_addr netmask);
int OsInterfaceDown(int);
void OsSetInterfaceParams(int type, int mtu, int speed);
int OpenTunnel(int *);
int OpenTunnel(int *);
void OsCloseLink(int flag);
void OsLinkup(void);
int OsLinkIsUp(void);
void OsLinkdown(void);
void OsSetRoute(int, struct in_addr, struct in_addr, struct in_addr);
void DeleteIfRoutes(int);

View File

@ -15,7 +15,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* $Id: timeout.h,v 1.10 1997/06/09 03:27:39 brian Exp $
* $Id: timeout.h,v 1.11 1997/08/25 00:29:30 brian Exp $
*
* TODO:
*/
@ -48,6 +48,7 @@ extern void TimerService(void);
extern void InitTimerService(void);
extern void TermTimerService(void);
extern void StartIdleTimer(void);
extern void StopIdleTimer(void);
extern void UpdateIdleTimer(void);
extern void ShowTimers();