netdev
[Top] [All Lists]

Re: Zeroing interface stats?

To: jamal <hadi@xxxxxxxxxx>
Subject: Re: Zeroing interface stats?
From: Andrew Morton <andrewm@xxxxxxxxxx>
Date: Tue, 06 Mar 2001 03:48:41 +0000
Cc: netdev@xxxxxxxxxxx
References: <Pine.GSO.4.30.0103052215160.24412-100000@xxxxxxxxxxxxxxxx>
Sender: owner-netdev@xxxxxxxxxxx
jamal wrote:
> 
> On Tue, 6 Mar 2001, Andrew Morton wrote:
> 
> > jamal wrote:
> > >
> > > On Tue, 6 Mar 2001, Andrew Morton wrote:
> > >
> > > Infact i think what the acenic is doing is illegal. These stats are used
> > > by SNMP.
> > > IIRC, if you have to zero the stats you also must reset the ifindex.
> > > Someone double check the SNMP RFCs.
> >
> > I've seen you use this `ifindex' term before.  What is it, and
> > what is its role in life?
> 
> -- interface index , retrievable via SIOCGIFINDEX
>    ^    ^    ^^^^^
> A unique identifier for a "net link". Represented in Linux as dev->ifindex
> Theoretically, also an index into a ifTable (a table of interfaces, on
> linux you walk a list of course) to retrieve an ifEntry ;->
> an IfEntry holds all the SNMP parameters + a lot more in Linux.
> In Linux one can look at IfEntry as a netdev struct.

I see. And this index is published to external applications
and management systems as a reliable identifier with which
to reference this interface on this host?  And so we're not
allowed to change it across the interface lifetime?

Should we attempt to make an interface's ifindex constant
across reinstantiations of the interface (ie: driver reloads?).

<Prev in Thread] Current Thread [Next in Thread>