lib/wmap/cidr_tracker.rb
# Count numbers of IPs within the trusted CIDR objects
Count numbers of IPs within the trusted CIDR objects
Count numbers of IPs within the trusted CIDR objects
def counts
		puts "Counting number of IPs within the CIDR store:" if @verbose
		cnt=0
		@known_cidr_blks.keys.map do |key|
			cnt=cnt+size(key)
		end
		puts "Total number of trusted IPs: #{cnt}" if @verbose
		return cnt
	rescue => ee
		puts "Exception on method #{__method__}: #{ee}" if @verbose
	end
def counts puts "Counting number of IPs within the CIDR store:" if @verbose cnt = 0 @known_cidr_blks . keys . map do | key | cnt = cnt + size ( key ) end puts "Total number of trusted IPs: #{cnt}" if @verbose return cnt rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose end
Count numbers of IPs within the trusted CIDR objects
Count numbers of IPs within the trusted CIDR objects