Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Read network configuration on FreeBSD

by VinsWorldcom (Priest)
on Oct 10, 2012 at 18:08 UTC ( #998277=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Read network configuration on FreeBSD
in thread Read network configuration on FreeBSD

Just check if the values are defined before printing them. I don't have a linux system so I don't know why IO::Interface (which does't compile for me on Windows/Strawberry) doesn't return a dstaddr or hwaddr.

printf "dstaddr = %s\n", defined($if->dstaddr) ? $if->dstaddr : ''; +# line 15 printf "hwaddr = %s\n", defined($if->hwaddr) ? $if->hwaddr : ''; # +line 16


Comment on Re^3: Read network configuration on FreeBSD
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2014-07-10 10:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (206 votes), past polls