diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-15 03:38:36 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2001-06-15 03:38:36 +0000 |
commit | f503c85b89c9d4081a557d228744177a77713e0b (patch) | |
tree | 0cb10156e6c8e931370c8412b68fa339b640f1f2 /sys/net/if_sl.c | |
parent | 0155468b6bfa9af93194487c72f384953150ed8f (diff) |
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.
Diffstat (limited to 'sys/net/if_sl.c')
-rw-r--r-- | sys/net/if_sl.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); |