Class: ARPTable

Inherits:
Object
  • Object
show all
Defined in:
lib/netutils/arp.rb

Defined Under Namespace

Classes: ARP

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeARPTable

Returns a new instance of ARPTable.



17
18
19
# File 'lib/netutils/arp.rb', line 17

def initialize
	@arps = {}
end

Instance Attribute Details

#arpsObject (readonly)

Returns the value of attribute arps.



15
16
17
# File 'lib/netutils/arp.rb', line 15

def arps
  @arps
end

Instance Method Details

#[](ia) ⇒ Object



25
26
27
# File 'lib/netutils/arp.rb', line 25

def [](ia)
	return @arps[ia]
end

#add(ia, ma, interface, static) ⇒ Object



21
22
23
# File 'lib/netutils/arp.rb', line 21

def add(ia, ma, interface, static)
	@arps[ia] = ARP.new(ia, ma, interface, static)
end