Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 1999 23:01:13 -0000
From:      "Barry Scott" <barry@scottb.demon.co.uk>
To:        "Freebsd-Isdn" <freebsd-isdn@freebsd.org>
Subject:   Double accounting in ISP0 devices - a prototype fix
Message-ID:  <000101be65c9$bc9d7460$060110ac@barrynt.private>

next in thread | raw e-mail | index | archive | help
	Here are all the places in the i4b code that operate on the
	TX and RX bytes values that netstat reports.

# find . -name \*.[hc] |xargs grep -n if_obytes /dev/null
./driver/i4b_ipr.c:44: *        sc->sc_if.if_obytes     # of bytes going out
to the line (after VJ)
./driver/i4b_ipr.c:302:         sc->sc_if.if_obytes = 0;
./driver/i4b_ipr.c:1082:                sc->sc_if.if_obytes +=
m->m_pkthdr.len;
./driver/i4b_isppp.c:265:               sc->sc_if.if_obytes = 0;
./driver/i4b_isppp.c:379:               sc->sc_if.if_obytes +=
m->m_pkthdr.len;
./sppp/if_spppsubr.c:779:       ifp->if_obytes += m->m_pkthdr.len + 3;
./sppp/if_spppsubr.c:1163:      ifp->if_obytes += m->m_pkthdr.len + 3;
./sppp/if_spppsubr.c:1221:      ifp->if_obytes += m->m_pkthdr.len + 3;
./sppp/if_spppsubr.c:3832:      ifp->if_obytes += m->m_pkthdr.len + 3;

# find . -name \*.[hc] |xargs grep -n if_ibytes /dev/null
./driver/i4b_ipr.c:43: *        sc->sc_if.if_ibytes     # of bytes coming in
from the line (before VJ)
./driver/i4b_ipr.c:301:         sc->sc_if.if_ibytes = 0;
./driver/i4b_ipr.c:882: sc->sc_if.if_ibytes += m->m_pkthdr.len;
./driver/i4b_isppp.c:264:               sc->sc_if.if_ibytes = 0;
./driver/i4b_isppp.c:628:       sc->sc_if.if_ibytes += m->m_pkthdr.len;
./sppp/if_spppsubr.c:438:               ifp->if_ibytes += m->m_pkthdr.len +
3;

	You will notice that both if_spppsubr.c and i4b_isppp.c want to add to the
	if_ibytes and if_obytes fields, same goes for if_ipackets and if_opackets.

	I removed the lines from i4b_isppp.c and have counters that make sense.

	As I have no idea which modules is responisble for incrementing these
	fields. At would be nice for someone that does know which lines to zap
	to generate a patch.

			Barry




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000101be65c9$bc9d7460$060110ac>