add ptp and broadcast
This commit is contained in:
parent
73bd4d93a2
commit
77f9bdd50b
|
@ -10,8 +10,18 @@ iflist.each do |ifname|
|
||||||
hwaddr = ifconfig.hwaddr
|
hwaddr = ifconfig.hwaddr
|
||||||
|
|
||||||
puts ifname + "\t" + "Link encap:" + encap + hwaddr
|
puts ifname + "\t" + "Link encap:" + encap + hwaddr
|
||||||
ptp = "" #XXX
|
|
||||||
bcast = "" #XXX
|
if (flags & Sigar::IFF_POINTOPOINT) != 0
|
||||||
|
ptp = " P-t-P:" + ifconfig.destination
|
||||||
|
else
|
||||||
|
ptp = ""
|
||||||
|
end
|
||||||
|
|
||||||
|
if (flags & Sigar::IFF_BROADCAST) != 0
|
||||||
|
bcast = " Bcast:" + ifconfig.broadcast
|
||||||
|
else
|
||||||
|
bcast = ""
|
||||||
|
end
|
||||||
|
|
||||||
puts "\t" + "inet addr:" + ifconfig.address +
|
puts "\t" + "inet addr:" + ifconfig.address +
|
||||||
ptp + bcast + " Mask:" + ifconfig.netmask
|
ptp + bcast + " Mask:" + ifconfig.netmask
|
||||||
|
|
Loading…
Reference in New Issue