This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?
- From: Andrew Lunn <andrew at lunn dot ch>
- To: sebastien Couret <sebastien dot couret at elios-informatique dot fr>
- Cc: ecos-patches at sources dot redhat dot com
- Date: Tue, 7 Sep 2004 12:43:32 +0200
- Subject: Re: FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?
- References: <MELELIOSGz2wt3su1en00000236@melelios.dmz.elios-informatique.fr>
On Tue, Sep 07, 2004 at 12:03:56PM +0200, sebastien Couret wrote:
> 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...
Could you point me at the FreeBSD sources you got this from. The
FreeBSD cross refernces website does not seem to know SIOCGIFSTATS.
Thanks
Andrew