Date: Fri, 20 Oct 2000 10:57:02 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Josef Karthauser <joe@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/netstat if.c src/sys/net if_var.h src/sys/netinet ip_input.c ip_output.c src/sys/netinet6 ip6_input.c ip6_output.c Message-ID: <20001020105702.D14725@sunbay.com> In-Reply-To: <200010192315.QAA62247@freefall.freebsd.org>; from joe@FreeBSD.org on Thu, Oct 19, 2000 at 04:15:55PM -0700 References: <200010192315.QAA62247@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Oct 19, 2000 at 04:15:55PM -0700, Josef Karthauser wrote:
> joe 2000/10/19 16:15:55 PDT
>
> Modified files:
> usr.bin/netstat if.c
> sys/net if_var.h
> sys/netinet ip_input.c ip_output.c
> sys/netinet6 ip6_input.c ip6_output.c
> Log:
> Augment the 'ifaddr' structure with a 'struct if_data' to keep
> statistics on a per network address basis.
>
> Teach the IPv4 and IPv6 input/output routines to log packets/bytes
> against the network address connected to the flow.
>
> Teach netstat to display the per-address stats for IP protocols
> when 'netstat -i' is evoked, instead of displaying the per-interface
> stats.
>
I have some concerns about ip_output():
1. If compiled with IPSEC, an interface could be changed:
[...]
} else {
/* nobody uses ia beyond here */
ifp = ro->ro_rt->rt_ifp;
}
[...]
The comment "nobody uses ia beyound here" is now incorrect,
perhaps we should remove the comment and add the following:
ia = ifatoia(ro->ro_rt->rt_ifa);
2. We record statistics before we actually sent the packet through
interface, but if_output() may fail. We probably should check the
return code from it, and only count on success.
3. Why don't we count the IP fragments?
--
Ruslan Ermilov Oracle Developer/DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001020105702.D14725>
