This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?
- From: sebastien Couret <sebastien dot couret at elios-informatique dot fr>
- To: ecos-patches at sources dot redhat dot com
- Date: Tue, 7 Sep 2004 12:03:56 +0200
- Subject: FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?
- Organization: Elios Informatique
- Reply-to: sebastien dot couret at elios-informatique dot fr
Hi guyz,
I'm using the FreeBSD TCP/IP stack port.
I was trying to obtain network interface statistical information from my
application. (input/output packets/bytes and so on ...)
So I used ioctl calls such as SIOCGIFSTATSUB and SIOCGIFSTATS.
(They are declared in header file bsd_tcpip/include/sys/sockio.h) but I was
very surprised to find out there is not associated code in
bsd_tcpip/src/sys/net/if.c. (actual revision 1.5)
The code to add in if.c is very basic , I have check that the following lines
will do the work :
case SIOCGIFSTATS:
case SIOCGIFSTATSUB:
error=copyout((caddr_t)&ifp->if_data,ifr->ifr_data,sizeof(ifp->if_data));
break;
Is there a reason why this is not implemented ?
May be there is a better way to obtain network interface statistics from the
application...
In advance thanks for your lights.
Have a nice day.