Object
This class represents a logical switch board route. TODO: Enable this to work with IPv6 addresses
# File lib/rex/socket/switch_board.rb, line 36 def initialize(subnet, netmask, comm) self.subnet = subnet self.netmask = netmask self.comm = comm self.subnet_nbo = Socket.resolv_nbo_i(subnet) self.netmask_nbo = Socket.resolv_nbo_i(netmask) end
Sort according to bitmask
# File lib/rex/socket/switch_board.rb, line 47 def <=>(other) self.bitmask <=> other.bitmask end
Convert the netmask to a bitmask and cache it.
# File lib/rex/socket/switch_board.rb, line 54 def bitmask @_bitmask = Socket.net2bitmask(self.netmask) if (@_bitmask == nil) @_bitmask end
[Validate]
Generated with the Darkfish Rdoc Generator 2.