Sha256: de6fe44f4a8184cc2db0b401c2f12b48a16dd9e94646039dfc50a645cc19f622

Contents?: true

Size: 424 Bytes

Versions: 2

Compression:

Stored size: 424 Bytes

Contents

require 'netutils/macaddr'

class ARPTable
	class ARP
		attr_reader :ia, :ma, :interface, :static

		def initialize(ia, ma, interface, static)
			@ia = ia
			@ma = MACAddr.new(ma)
			@interface = interface
			@static = static
		end
	end

	attr_reader :arps

	def initialize
		@arps = {}
	end

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
netutils-0.1.2 lib/netutils/arp.rb
netutils-0.1.1 lib/netutils/arp.rb