From f503c85b89c9d4081a557d228744177a77713e0b Mon Sep 17 00:00:00 2001 From: Jun-ichiro itojun Hagino Date: Fri, 15 Jun 2001 03:38:36 +0000 Subject: change the meaning of ifnet.if_lastchange to meet RFC1573 ifLastChange. follows BSD/OS practice and ucd-snmp code (FreeBSD does it for specific interfaces only). was: if_lastchange get updated on every packet transmission/receipt. now: if_lastchange get updated when IFF_UP is changed. --- sys/net/if_sl.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/net/if_sl.c') diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 31e1f7e8e9b..38a24740995 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sl.c,v 1.12 2001/06/12 21:41:32 deraadt Exp $ */ +/* $OpenBSD: if_sl.c,v 1.13 2001/06/15 03:38:34 itojun Exp $ */ /* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */ /* @@ -420,7 +420,7 @@ sloutput(ifp, m, dst, rtp) struct timeval tv; /* if output's been stalled for too long, and restart */ - timersub(&time, &sc->sc_if.if_lastchange, &tv); + timersub(&time, &sc->sc_lastpacket, &tv); if (tv.tv_sec > 0) { sc->sc_otimeout++; slstart(sc->sc_ttyp); @@ -434,7 +434,7 @@ sloutput(ifp, m, dst, rtp) return (ENOBUFS); } IF_ENQUEUE(ifq, m); - sc->sc_if.if_lastchange = time; + sc->sc_lastpacket = time; if ((sc->sc_oqlen = sc->sc_ttyp->t_outq.c_cc) == 0) slstart(sc->sc_ttyp); splx(s); @@ -551,7 +551,7 @@ slstart(tp) bpf_tap(sc->sc_bpf, bpfbuf, len + SLIP_HDRLEN); } #endif - sc->sc_if.if_lastchange = time; + sc->sc_lastpacket = time; #if !(defined(__NetBSD__) || defined(__OpenBSD__)) /* XXX - cgd */ /* @@ -842,7 +842,7 @@ slinput(c, tp) #endif sc->sc_if.if_ipackets++; - sc->sc_if.if_lastchange = time; + sc->sc_lastpacket = time; s = splimp(); if (IF_QFULL(&ipintrq)) { IF_DROP(&ipintrq); -- cgit v1.2.3