From 9777e53988efa067adf8935d36ee0c6494ad885b Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Mon, 18 Jan 2010 17:14:53 -0800 Subject: [PATCH] (SIGAR-199) arp Ruby example --- bindings/ruby/examples/arp.rb | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bindings/ruby/examples/arp.rb diff --git a/bindings/ruby/examples/arp.rb b/bindings/ruby/examples/arp.rb new file mode 100644 index 00000000..e668cd32 --- /dev/null +++ b/bindings/ruby/examples/arp.rb @@ -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