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]

Re: FreeBSD stack ioctl. SIOCGIFSTATSUB,SIOCGIFSTATS support ?


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


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