Re: inconsistency between SIOCGIFCONF and SIOCGIFNAME

From: Stephen Hemminger
Date: Tue Jun 29 2004 - 11:34:04 EST


On Mon, 28 Jun 2004 21:06:25 -0700
Ulrich Drepper <drepper@xxxxxxxxxx> wrote:

> POSIX does not specify the if_indextoname and if_nameindex functions,
> they are only vaguely specified in an RFC. So there is some room for
> interpretation but still I think it is an issue.
>
> If SIOCGIFCONF to query the system's interfaces only active interfaces
> are returned. But SIOCGIFNAME (and SIOCGIFINDEX) allow querying
> interfaces which are down and not fully initialized.
>
> RFC 3493 says if_nameindex should return *all* interfaces. This means
> that neither if_indextoname or if_nametoindex (defined in the same rfc)
> should define more interfaces.
>

The bridge utilities depends on being able to do if_indextoname and
if_nametoindex for interfaces that aren't active to IP. Other non-IP
usage probably does as well.

--
Stephen Hemminger mailto:shemminger@xxxxxxxx
Open Source Development Lab http://developer.osdl.org/shemminger
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/