lib/wmap/cidr_tracker.rb
# NetAddr wrapper to determine number of IPs within the CIDR object.
NetAddr wrapper to determine number of IPs within the CIDR object.
NetAddr wrapper to determine number of IPs within the CIDR object .
def size (cidr)
		puts "Determine the size of CIDR object: #{cidr}" if @verbose
		raise "Invalid CIDR format: #{cidr}" unless is_cidr?(cidr)
		obj = NetAddr::CIDR.create(cidr)
		return obj.size.to_i
	rescue => ee
		puts "Exception on method #{__method__}: #{ee}" if @verbose
		return nil
	end
def size ( cidr ) puts "Determine the size of CIDR object: #{cidr}" if @verbose raise "Invalid CIDR format: #{cidr}" unless is_cidr? ( cidr ) obj = NetAddr :: CIDR . create ( cidr ) return obj . size . to_i rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose return nil end
NetAddr wrapper to determine number of IPs within the CIDR object.
NetAddr wrapper to determine number of IPs within the CIDR object .
cidr
<not_specific>