summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-11-18 13:52:41 +0000
committerbde <bde@FreeBSD.org>1997-11-18 13:52:41 +0000
commit1c02ba32615553433d8209446964a7484fa98e78 (patch)
tree6d7522ab2103f2b4d4186d677cd5282f063672d6
parentf3b73cd7962b572263fdcc293064ca55fb57e698 (diff)
downloadFreeBSD-src-1c02ba32615553433d8209446964a7484fa98e78.zip
FreeBSD-src-1c02ba32615553433d8209446964a7484fa98e78.tar.gz
Cleaned up PPP_FILTER/NBPFILTER ifdefs.
Use gettime() instead of microtime() to set if_lastchange for i/o's. microtime() is probably too expensive. However, setting if_lastchange for i/o's may be wrong.
-rw-r--r--sys/net/if_ppp.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index 3cda41f..864beb3 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.48 1997/10/18 00:56:22 peter Exp $ */
+/* $Id: if_ppp.c,v 1.49 1997/10/18 01:20:23 peter Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
@@ -81,13 +81,6 @@
#define VJC
#define PPP_COMPRESS
-#ifdef PPP_FILTER
-#include "bpfilter.h"
-#if NBPFILTER == 0
-#error "PPP_FILTER requires bpf"
-#endif
-#endif
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/proc.h>
@@ -102,10 +95,6 @@
#include <net/if.h>
#include <net/if_types.h>
#include <net/netisr.h>
-#include <net/route.h>
-#ifdef PPP_FILTER
-#include <net/bpf.h>
-#endif
#if INET
#include <netinet/in.h>
@@ -124,14 +113,16 @@
#include <net/bpf.h>
#endif
+#if defined(PPP_FILTER) && NBPFILTER == 0
+#error "PPP_FILTER requires bpf"
+#endif
+
#ifdef VJC
#include <net/slcompress.h>
#endif
-#include <net/ppp_defs.h>
#include <net/if_ppp.h>
#include <net/if_pppvar.h>
-#include <machine/cpu.h>
/* minimise diffs */
#define splsoftnet splnet
@@ -290,7 +281,7 @@ pppdealloc(sc)
if_down(&sc->sc_if);
sc->sc_if.if_flags &= ~(IFF_UP|IFF_RUNNING);
- gettime(&sc->sc_if.if_lastchange);
+ microtime(&sc->sc_if.if_lastchange);
sc->sc_devp = NULL;
sc->sc_xfer = 0;
for (;;) {
OpenPOWER on IntegriCloud