Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Network interface discovery

by rg0now (Chaplain)
on Apr 24, 2005 at 09:57 UTC ( #450909=note: print w/replies, xml ) Need Help??

in reply to Network interface discovery

After many years of doing maintenance work on various UNIX network daemons, I have gradually grown to believe that we do not have "reliable cross-platform methods of performing interface discovery", neither for Perl nor for C. In the case of Linux, the standard way was to parse /proc/net/dev (it is not that hard, even with C), even though recent libcs provide the if_nameindex API. For *BSD, coders usually rolled their own if_nameindex implementation, because the BSD libc does not seem to porvide the API (at least, back those days when the daemons were written, this was the case).

Note that I do not want to foster these programming practices. I just want to stress that this paticular problem is really hard to solve in a cross-platform-way...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://450909]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2016-10-22 09:16 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (294 votes). Check out past polls.