Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

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...

Comment on Re: Network interface discovery
Select or Download Code

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 wandering the Monastery: (3)
As of 2015-10-10 01:54 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls