summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ppp/ip.c5
-rw-r--r--usr.sbin/ppp/lcp.c8
-rw-r--r--usr.sbin/ppp/os.c8
-rw-r--r--usr.sbin/ppp/os.h10
-rw-r--r--usr.sbin/ppp/timeout.h3
5 files changed, 22 insertions, 12 deletions
diff --git a/usr.sbin/ppp/ip.c b/usr.sbin/ppp/ip.c
index 2dd4e2c..394841e 100644
--- a/usr.sbin/ppp/ip.c
+++ b/usr.sbin/ppp/ip.c
@@ -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();
}
diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c
index 1538b46..89f3f75 100644
--- a/usr.sbin/ppp/lcp.c
+++ b/usr.sbin/ppp/lcp.c
@@ -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;
diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c
index 9cd9e75..f8eed52 100644
--- a/usr.sbin/ppp/os.c
+++ b/usr.sbin/ppp/os.c
@@ -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()
{
diff --git a/usr.sbin/ppp/os.h b/usr.sbin/ppp/os.h
index 303e300..a3b013e 100644
--- a/usr.sbin/ppp/os.h
+++ b/usr.sbin/ppp/os.h
@@ -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);
diff --git a/usr.sbin/ppp/timeout.h b/usr.sbin/ppp/timeout.h
index 2fcec0b..fbbda4a 100644
--- a/usr.sbin/ppp/timeout.h
+++ b/usr.sbin/ppp/timeout.h
@@ -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();
OpenPOWER on IntegriCloud