add ptp and broadcast

This commit is contained in:
Doug MacEachern 2007-09-03 16:41:55 +00:00
parent 73bd4d93a2
commit 77f9bdd50b
1 changed files with 12 additions and 2 deletions

View File

@ -10,8 +10,18 @@ iflist.each do |ifname|
hwaddr = ifconfig.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 +
ptp + bcast + " Mask:" + ifconfig.netmask