From 6418d754529642828e652dfdd095502e2c0b28c5 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Tue, 18 Nov 1997 13:52:41 +0000 Subject: [PATCH] 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. --- sys/net/if_ppp.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c index 3cda41fbed66..864beb30dc95 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 #include #include @@ -102,10 +95,6 @@ #include #include #include -#include -#ifdef PPP_FILTER -#include -#endif #if INET #include @@ -124,14 +113,16 @@ #include #endif +#if defined(PPP_FILTER) && NBPFILTER == 0 +#error "PPP_FILTER requires bpf" +#endif + #ifdef VJC #include #endif -#include #include #include -#include /* 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 (;;) {