Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2014-09-23 09:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (216 votes), past polls