(SIGAR-199) arp Ruby example
This commit is contained in:
		
							parent
							
								
									6847888168
								
							
						
					
					
						commit
						9777e53988
					
				
							
								
								
									
										8
									
								
								bindings/ruby/examples/arp.rb
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								bindings/ruby/examples/arp.rb
									
									
									
									
									
										Normal 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
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user