(SIGAR-199) arp Ruby example

This commit is contained in:
Doug MacEachern 2010-01-18 17:14:53 -08:00
parent 6847888168
commit 9777e53988
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
require 'sigar'
Sigar.new.arp_list.each do |arp|
host = "?" #XXX
puts host + " " +
"(" + arp.address + ")" + " at " + arp.hwaddr + " " +
"[" + arp.type + "]" + " on " + arp.ifname
end