lkml.org 
[lkml]   [2004]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: consistent ioctl for getting all net interfaces?
 On Sat, May 22, Joshua Kwan wrote:

> Hi,
>
> I'm interested in not having to parse /proc/net/dev to get a list of all
> available (not necessarily even up) interfaces on the system. I
> investigated the ioctl SIOCGIFCONF, but it seems to behave differently on
> 2.4 and 2.6 series kernels, e.g. sometimes it won't return all interfaces.

you should bring that to netdev@oss.sgi.com instead of lkml.

IF the ioctl has really changed, then it would be a bug. I just played
with ipconfig from the klibc distribution, and it returns only
interfaces in UP state. I'm sure that ipconfig binary worked when the
code was written.

If the ioctl is supposed to work how it does in 2.6, there is still
/sys/class/net/*. Thats (probably) more reliable than a text parser.
See `nameif -r 'foo: bar' eth0` as example.


--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.046 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site