This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]