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.
This commit is contained in:
itojun 2001-06-14 05:44:23 +00:00
parent 7e00a527ea
commit 4d51fe368b
25 changed files with 42 additions and 84 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_xb.c,v 1.6 2001/01/17 00:30:49 thorpej Exp $ */
/* $NetBSD: if_xb.c,v 1.7 2001/06/14 05:44:28 itojun Exp $ */
/* [Notice revision 2.2]
* Copyright (c) 1997, 1998 Avalon Computer Systems, Inc.
@ -74,7 +74,7 @@
#include "opt_avalon_a12.h" /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.6 2001/01/17 00:30:49 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_xb.c,v 1.7 2001/06/14 05:44:28 itojun Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -234,7 +234,7 @@ xbattach(parent, self, aux)
xbfound = 1;
ccp = &xb_configuration;
xb_init_config(ccp, 1);
printf(": driver %s mtu %d\n", "$Revision: 1.6 $", xbi.if_mtu);
printf(": driver %s mtu %d\n", "$Revision: 1.7 $", xbi.if_mtu);
}
static void
@ -506,7 +506,6 @@ xb_output(ifp, m0, dst, rt0)
m_freem(m);
return ENETDOWN;
}
ifp->if_lastchange = time;
/*
* We want an IP packet with a link level route, on a silver platter.
*/

View File

@ -1,4 +1,4 @@
/* $NetBSD: hd64570.c,v 1.16 2001/06/12 11:48:51 wiz Exp $ */
/* $NetBSD: hd64570.c,v 1.17 2001/06/14 05:44:26 itojun Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@ -807,7 +807,6 @@ sca_output(ifp, m, dst, rt0)
ALTQ_DECL(struct altq_pktattr pktattr;)
error = 0;
ifp->if_lastchange = time;
if ((ifp->if_flags & IFF_UP) != IFF_UP) {
error = ENETDOWN;
@ -906,7 +905,6 @@ sca_output(ifp, m, dst, rt0)
return (error);
}
ifp->if_obytes += len;
ifp->if_lastchange = time;
if (mflags & M_MCAST)
ifp->if_omcasts++;
@ -1610,7 +1608,6 @@ sca_frame_process(sca_port_t *scp)
#endif
scp->sp_if.if_ipackets++;
scp->sp_if.if_lastchange = time;
hdlc = mtod(m, struct hdlc_header *);
switch (ntohs(hdlc->h_proto)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: smc91cxx.c,v 1.32 2000/12/14 06:27:26 thorpej Exp $ */
/* $NetBSD: smc91cxx.c,v 1.33 2001/06/14 05:44:27 itojun Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -996,9 +996,8 @@ smc91cxx_read(sc)
MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m == NULL)
goto out;
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = m->m_len = packetlen;
m->m_pkthdr.len = packetlen;
/*
* Always put the packet in a cluster.

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_upl.c,v 1.14 2001/04/13 23:30:09 thorpej Exp $ */
/* $NetBSD: if_upl.c,v 1.15 2001/06/14 05:44:27 itojun Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
@ -1082,5 +1082,4 @@ upl_input(struct ifnet *ifp, struct mbuf *m)
splx(s);
ifp->if_ipackets++;
ifp->if_ibytes += m->m_len;
ifp->if_lastchange = time;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: if.c,v 1.90 2001/06/07 13:26:48 mrg Exp $ */
/* $NetBSD: if.c,v 1.91 2001/06/14 05:44:23 itojun Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@ -992,6 +992,7 @@ if_down(ifp)
struct ifaddr *ifa;
ifp->if_flags &= ~IFF_UP;
microtime(&ifp->if_lastchange);
for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL;
ifa = TAILQ_NEXT(ifa, ifa_list))
pfctlinput(PRC_IFDOWN, ifa->ifa_addr);
@ -1013,6 +1014,7 @@ if_up(ifp)
#endif
ifp->if_flags |= IFF_UP;
microtime(&ifp->if_lastchange);
#ifdef notyet
/* this has no effect on IP, and will kill all ISO connections XXX */
for (ifa = TAILQ_FIRST(&ifp->if_addrlist); ifa != NULL;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_arcsubr.c,v 1.35 2001/04/13 23:30:12 thorpej Exp $ */
/* $NetBSD: if_arcsubr.c,v 1.36 2001/06/14 05:44:23 itojun Exp $ */
/*
* Copyright (c) 1994, 1995 Ignatios Souvatzis
@ -139,7 +139,6 @@ arc_output(ifp, m0, dst, rt0)
myself = *LLADDR(ifp->if_sadl);
ifp->if_lastchange = time;
if ((rt = rt0)) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = rtalloc1(dst, 1)))
@ -576,7 +575,6 @@ arc_input(ifp, m)
ah = mtod(m, struct arc_header *);
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
if (arcbroadcastaddr == ah->arc_dhost) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_atmsubr.c,v 1.28 2001/04/13 23:30:12 thorpej Exp $ */
/* $NetBSD: if_atmsubr.c,v 1.29 2001/06/14 05:44:23 itojun Exp $ */
/*
*
@ -113,7 +113,6 @@ atm_output(ifp, m0, dst, rt0)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
/*
* If the queueing discipline needs packet classification,
@ -266,7 +265,6 @@ atm_input(ifp, ah, m, rxhand)
m_freem(m);
return;
}
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
if (rxhand) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ethersubr.c,v 1.84 2001/06/12 15:03:26 thorpej Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.85 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -203,7 +203,6 @@ ether_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
if ((rt = rt0) != NULL) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = rtalloc1(dst, 1)) != NULL) {
@ -687,7 +686,6 @@ ether_input(struct ifnet *ifp, struct mbuf *m)
m->m_flags &= ~M_HASFCS;
}
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
#if NBRIDGE > 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_fddisubr.c,v 1.39 2001/04/13 23:30:13 thorpej Exp $ */
/* $NetBSD: if_fddisubr.c,v 1.40 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -222,7 +222,6 @@ fddi_output(ifp, m0, dst, rt0)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
#if !defined(__bsdi__) || _BSDI_VERSION >= 199401
if ((rt = rt0) != NULL) {
if ((rt->rt_flags & RTF_UP) == 0) {
@ -633,7 +632,6 @@ fddi_input(ifp, m)
fh = mtod(m, struct fddi_header *);
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
if (fh->fddi_dhost[0] & 1) {
if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_gif.c,v 1.28 2001/06/04 23:53:13 itojun Exp $ */
/* $NetBSD: if_gif.c,v 1.29 2001/06/14 05:44:24 itojun Exp $ */
/* $KAME: if_gif.c,v 1.49 2001/06/04 12:03:41 itojun Exp $ */
/*
@ -298,7 +298,6 @@ gif_output(ifp, m, dst, rt)
goto end;
}
ifp->if_lastchange = time;
m->m_flags &= ~(M_BCAST|M_MCAST);
if (!(ifp->if_flags & IFF_UP) ||
sc->gif_psrc == NULL || sc->gif_pdst == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_hippisubr.c,v 1.11 2001/04/13 23:30:14 thorpej Exp $ */
/* $NetBSD: if_hippisubr.c,v 1.12 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (c) 1982, 1989, 1993
@ -107,7 +107,6 @@ hippi_output(ifp, m0, dst, rt0)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
/* HIPPI doesn't really do broadcast or multicast right now */
if (m->m_flags & (M_BCAST | M_MCAST))
@ -268,7 +267,6 @@ hippi_input(ifp, m)
hh = mtod(m, struct hippi_header *);
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
if (hh->hi_le.le_dest_addr[0] & 1) {
if (bcmp((caddr_t)etherbroadcastaddr,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ieee1394subr.c,v 1.10 2001/04/13 23:30:14 thorpej Exp $ */
/* $NetBSD: if_ieee1394subr.c,v 1.11 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -101,7 +101,6 @@ ieee1394_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst,
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
if ((rt = rt0) != NULL) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = rtalloc1(dst, 1)) != NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_loop.c,v 1.38 2001/04/13 23:30:14 thorpej Exp $ */
/* $NetBSD: if_loop.c,v 1.39 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@ -186,7 +186,6 @@ looutput(ifp, m, dst, rt)
if ((m->m_flags & M_PKTHDR) == 0)
panic("looutput: no header mbuf");
ifp->if_lastchange = time;
#if NBPFILTER > 0
if (ifp->if_bpf && (ifp->if_flags & IFF_LOOPBACK)) {
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ppp.c,v 1.68 2001/04/13 23:30:14 thorpej Exp $ */
/* $NetBSD: if_ppp.c,v 1.69 2001/06/14 05:44:24 itojun Exp $ */
/* Id: if_ppp.c,v 1.6 1997/03/04 03:33:00 paulus Exp */
/*
@ -929,7 +929,6 @@ pppoutput(ifp, m0, dst, rtp)
}
ppp_restart(sc);
}
ifp->if_lastchange = time;
ifp->if_opackets++;
ifp->if_obytes += len;
@ -1647,7 +1646,6 @@ ppp_inproc(sc, m)
splx(s);
ifp->if_ipackets++;
ifp->if_ibytes += ilen;
ifp->if_lastchange = time;
if (rv)
(*sc->sc_ctlp)(sc);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pppoe.c,v 1.1 2001/04/29 09:50:37 martin Exp $ */
/* $NetBSD: if_pppoe.c,v 1.2 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (c) 2001 Martin Husemann. All rights reserved.
@ -943,7 +943,6 @@ pppoe_start(struct ifnet *ifp)
}
while ((m = sppp_dequeue(ifp)) != NULL) {
microtime(&ifp->if_lastchange);
len = m->m_pkthdr.len;
M_PREPEND(m, PPPOE_HEADERLEN, M_DONTWAIT);
if (m == NULL) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_sl.c,v 1.75 2001/05/30 16:42:02 itojun Exp $ */
/* $NetBSD: if_sl.c,v 1.76 2001/06/14 05:44:24 itojun Exp $ */
/*
* Copyright (c) 1987, 1989, 1992, 1993
@ -444,7 +444,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);
@ -473,7 +473,7 @@ sloutput(ifp, m, dst, rtp)
ifp->if_oerrors++;
return (error);
}
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
splx(s);
s = spltty();
@ -788,7 +788,7 @@ slintr(void *arg)
m_freem(bpf_m);
}
#endif
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
s = spltty();
@ -987,7 +987,7 @@ slintr(void *arg)
}
sc->sc_if.if_ipackets++;
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
s = splnet();
if (IF_QFULL(&ipintrq)) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_slvar.h,v 1.23 2001/01/15 16:33:31 thorpej Exp $ */
/* $NetBSD: if_slvar.h,v 1.24 2001/06/14 05:44:24 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -71,6 +71,7 @@ struct sl_softc {
#ifdef INET /* XXX */
struct slcompress sc_comp; /* tcp compression data */
#endif
struct timeval sc_lastpacket; /* for watchdog */
};
/* internal flags */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_strip.c,v 1.38 2001/05/07 10:15:46 lukem Exp $ */
/* $NetBSD: if_strip.c,v 1.39 2001/06/14 05:44:25 itojun Exp $ */
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
/*
@ -834,7 +834,7 @@ stripoutput(ifp, m, dst, rt)
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) {
DPRINTF(("stripoutput: stalled, resetting\n"));
sc->sc_otimeout++;
@ -860,7 +860,7 @@ stripoutput(ifp, m, dst, rt)
ifp->if_oerrors++;
return (error);
}
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
splx(s);
s = spltty();
@ -1182,7 +1182,7 @@ stripintr(void *arg)
m_freem(bpf_m);
}
#endif
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
s = spltty();
strip_send(sc, m);
@ -1300,7 +1300,7 @@ stripintr(void *arg)
}
sc->sc_if.if_ipackets++;
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
s = splnet();
if (IF_QFULL(&ipintrq)) {
@ -1411,7 +1411,7 @@ strip_resetradio(sc, tp)
* is so badlyhung it needs powercycling.
*/
sc->sc_state = ST_DEAD;
sc->sc_if.if_lastchange = time;
sc->sc_lastpacket = time;
sc->sc_statetimo = time.tv_sec + STRIP_RESET_INTERVAL;
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_stripvar.h,v 1.11 2001/01/15 16:33:32 thorpej Exp $ */
/* $NetBSD: if_stripvar.h,v 1.12 2001/06/14 05:44:25 itojun Exp $ */
#ifndef _NET_IF_STRIPVAR_H_
#define _NET_IF_STRIPVAR_H_
@ -39,6 +39,8 @@ struct strip_softc {
#define ST_DEAD 0x2 /* no answer to probe; do reset */
long sc_statetimo; /* When (secs) current state ends */
struct timeval sc_lastpacket; /* for watchdog */
};

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_tokensubr.c,v 1.17 2001/04/13 23:30:17 thorpej Exp $ */
/* $NetBSD: if_tokensubr.c,v 1.18 2001/06/14 05:44:25 itojun Exp $ */
/*
* Copyright (c) 1997-1999
@ -167,7 +167,6 @@ token_output(ifp, m0, dst, rt0)
if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
senderr(ENETDOWN);
ifp->if_lastchange = time;
if ((rt = rt0)) {
if ((rt->rt_flags & RTF_UP) == 0) {
if ((rt0 = rt = RTALLOC1(dst, 1)))
@ -506,7 +505,6 @@ token_input(ifp, m)
trh = mtod(m, struct token_header *);
ifp->if_lastchange = time;
ifp->if_ibytes += m->m_pkthdr.len;
if (bcmp((caddr_t)tokenbroadcastaddr, (caddr_t)trh->token_dhost,
sizeof(tokenbroadcastaddr)) == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: ppp_tty.c,v 1.24 2001/03/31 00:35:24 enami Exp $ */
/* $NetBSD: ppp_tty.c,v 1.25 2001/06/14 05:44:25 itojun Exp $ */
/* Id: ppp_tty.c,v 1.3 1996/07/01 01:04:11 paulus Exp */
/*
@ -643,7 +643,6 @@ pppsyncstart(sc)
if (sc->sc_flags & SC_DEBUG)
pppdumpframe(sc,m,1);
}
microtime(&sc->sc_if.if_lastchange);
for(n=m,len=0;n!=NULL;n=n->m_next)
len += n->m_len;
@ -709,7 +708,6 @@ pppasyncstart(sc)
/* Calculate the FCS for the first mbuf's worth. */
sc->sc_outfcs = pppfcs(PPP_INITFCS, mtod(m, u_char *), m->m_len);
sc->sc_if.if_lastchange = time;
}
for (;;) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_x25subr.c,v 1.24 2001/04/13 23:30:20 thorpej Exp $ */
/* $NetBSD: if_x25subr.c,v 1.25 2001/06/14 05:44:26 itojun Exp $ */
/*
* Copyright (c) 1990, 1993
@ -174,7 +174,6 @@ x25_ifinput(m, v)
struct llinfo_x25 *lx = (struct llinfo_x25 *) lcp->lcd_upnext;
struct ifnet *ifp;
struct ifqueue *inq;
extern struct timeval time;
int s, isr;
if (m == 0 || lcp->lcd_state != DATA_TRANSFER)
@ -182,7 +181,6 @@ x25_ifinput(m, v)
pk_flowcontrol(lcp, 0, 1); /* Generate RR */
ifp = m->m_pkthdr.rcvif;
ifp->if_lastchange = time;
switch (m->m_type) {
default:
if (m)

View File

@ -27,7 +27,7 @@
* i4b_ipr.c - isdn4bsd IP over raw HDLC ISDN network driver
* ---------------------------------------------------------
*
* $Id: i4b_ipr.c,v 1.5 2001/03/24 12:40:31 martin Exp $
* $Id: i4b_ipr.c,v 1.6 2001/06/14 05:44:26 itojun Exp $
*
* $FreeBSD$
*
@ -496,10 +496,6 @@ i4biproutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
}
#endif
/* update access time */
microtime(&sc->sc_if.if_lastchange);
/*
* check, if type of service indicates interactive, i.e. telnet,
* traffic. in case it is interactive, put it into the fast queue,
@ -581,7 +577,6 @@ i4biprioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = EAFNOSUPPORT;
else
sc->sc_if.if_flags |= IFF_UP;
microtime(&sc->sc_if.if_lastchange);
break;
case SIOCSIFFLAGS: /* set interface flags */
@ -610,7 +605,6 @@ i4biprioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
/* enable debug messages */
}
microtime(&sc->sc_if.if_lastchange);
break;
#if !defined(__OpenBSD__)
@ -620,10 +614,7 @@ i4biprioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
else if(ifr->ifr_mtu < I4BIPRMINMTU)
error = EINVAL;
else
{
ifp->if_mtu = ifr->ifr_mtu;
microtime(&sc->sc_if.if_lastchange);
}
break;
#endif /* __OPENBSD__ */
@ -936,8 +927,6 @@ ipr_rx_data_rdy(int unit)
m->m_pkthdr.len = m->m_len;
microtime(&sc->sc_if.if_lastchange);
#ifdef I4BIPRADJFRXP
/*
@ -1136,8 +1125,6 @@ ipr_tx_queue_empty(int unit)
break;
}
microtime(&sc->sc_if.if_lastchange);
#if NBPFILTER > 0 || NBPF > 0
if(sc->sc_if.if_bpf)
{

View File

@ -34,7 +34,7 @@
* the "cx" driver for Cronyx's HDLC-in-hardware device). This driver
* is only the glue between sppp and i4b.
*
* $Id: i4b_isppp.c,v 1.5 2001/04/09 19:35:46 martin Exp $
* $Id: i4b_isppp.c,v 1.6 2001/06/14 05:44:26 itojun Exp $
*
* $FreeBSD$
*
@ -431,8 +431,6 @@ i4bisppp_start(struct ifnet *ifp)
#endif
#endif /* NBPFILTER > 0 || NBPF > 0 */
microtime(&ifp->if_lastchange);
if(IF_QFULL(isdn_linktab[unit]->tx_queue))
{
NDBGL4(L4_ISPDBG, "isp%d, tx queue full!", unit);
@ -710,8 +708,6 @@ i4bisppp_rx_data_rdy(int unit)
m->m_pkthdr.rcvif = &sc->sc_if;
m->m_pkthdr.len = m->m_len;
microtime(&sc->sc_if.if_lastchange);
sc->sc_if.if_ipackets++;
#if 0
sc->sc_if.if_ibytes += m->m_pkthdr.len;

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_eon.c,v 1.33 2001/04/13 23:30:27 thorpej Exp $ */
/* $NetBSD: if_eon.c,v 1.34 2001/06/14 05:44:26 itojun Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -375,7 +375,6 @@ eonoutput(ifp, m, sdst, rt)
}
#endif
ifp->if_lastchange = time;
ifp->if_opackets++;
if (rt == 0 || (el = (struct eon_llinfo *) rt->rt_llinfo) == 0) {
if (dst->siso_family == AF_LINK) {
@ -505,7 +504,6 @@ eoninput(m, va_alist)
}
}
eonif->if_ibytes += m->m_pkthdr.len;
eonif->if_lastchange = time;
iphdr = mtod(m, struct ip *);
/* do a few checks for debugging */
if (iphdr->ip_p != IPPROTO_EON) {