what is the story on if_index allocation ?

Harti Brandt novo at cs.tu-berlin.de
Tue Apr 20 01:05:36 PDT 2004



On Mon, 19 Apr 2004, Bill Fumerola wrote:

> i disagree that this logic belongs outside the kernel in the snmp agent.
> an inconsistant if_index makes it difficult and error prone for using
> the index in multiple utilities whose data may be combined/joined/scaled
> with information from the snmp agent's IF-MIB/ifXTable tables.

The question is based on what do you decide to give an interface the same
index? Same hardware name? Same PCI slot? Same MAC address (what about
interfaces without MAC addresses and virtual interfaces)? Same IP address
(what about interfaces without IP address)?

In the bSNMP daemon currently I have two classes of interfaces: real ones
and 'dynamic' ones. For real ones I remember their name through the uptime
of the daemon and assign them the same index when they re-appear (by
loading/unloading the driver) with the same name. Actually I think that an
application (statistics or others) should look at the timestamp of the
last change of an interface and assume that the interface is another one
even if it has the same index if the timestamp changed.

harti


More information about the freebsd-net mailing list