[CUWiN] Question about Originating ifIndex field

David Young dyoung at pobox.com
Sun Apr 17 21:44:38 CDT 2005


On Sun, Apr 17, 2005 at 07:58:48PM -0400, Sanjai Narain wrote:
> 
> Is this field set correctly in the HSLS Packet Header? It refers to the 
> interface number in the SNMP mib, but if the host is not running SNMP then 
> how does one interpret this field? Does it correlate with any information 
> produced by Linux's ifconfig?

Sanjai,

The interface number is set in hsls_interface_create.  The call
chain there is hsls_interface_create->getifprops->if_nametoindex.
The daemon sets the originator interface in a couple places.
One is in hsls_router_retransmit_lsupd.  The other place
is hsls_interface_send_olsu, where the call chain is
hsls_interface_send_olsu->hsls_interface_postpack_lsu.

It is more than likely that the SNMP MIB and the operating system's
interface index will be the same.  I may have made a mistake to refer
to the SNMP MIB, but this seems to be the way that a lot of RFCs refer
to an interface index in the abstract.  Suffice it to say, I expect
for the ifindex of every physical interface to be different from every
other physical interface's; I also expect for the ifindex to be greater
than zero.

I don't think the information correlates with ifconfig.  I believe
that on *BSD, 'ifconfig -a' lists the interfaces in ifindex order,
but I chalk that up to a happy accident of implementation.

If all the ifindices are the same, it may be that each Linux box on
your network has coincidentally assigned the same ifindex to its HSLS
interface.  However, if any two interfaces on the same Linux box have
the same ifindex, that's a bug.

If it helps, NetBSD's if_nametoindex(3) manual page says that it the
library routine conforms to an RFC:

  STANDARDS
       The if_nametoindex(), if_indextoname(), if_nameindex(), and
       if_freenameindex() functions conform to RFC 2553.

Dave

> 
> In the packet traces that I have looked at, this number is always set to 
> 4.
> 
> Thanks for any help. Regards. -- Sanjai
> _______________________________________________
> CU-Wireless mailing list
> CU-Wireless at lists.cuwireless.net
> http://lists.chambana.net/cgi-bin/listinfo/cu-wireless
> Project Page: http://cuwireless.ucimc.org

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless mailing list