FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?
sebastien Couret
sebastien.couret@elios-informatique.fr
Tue Sep 7 09:59:00 GMT 2004
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.
More information about the Ecos-patches
mailing list