Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: Read network configuration on FreeBSD

by VinsWorldcom (Vicar)
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 studying the Monastery: (18)
As of 2015-07-02 18:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (44 votes), past polls