lib/wmap/cidr_tracker.rb
# Count numbers of CIDR object entries in the CIDR cache table
Count numbers of CIDR object entries in the CIDR cache table
Count numbers of CIDR object entries in the CIDR cache table
def count
		puts "Counting number of entries in the CIDR cache table ..." if @verbose
		cnt=0
		@known_cidr_blks.keys.map do |key|
			if is_cidr?(key)
				cnt=cnt+1
			end
		end
		puts "Current number of CIDR object entries: #{cnt}" if @verbose
		return cnt
	rescue => ee
		puts "Exception on method #{__method__}: #{ee}" if @verbose
	end
def count puts "Counting number of entries in the CIDR cache table ..." if @verbose cnt = 0 @known_cidr_blks . keys . map do | key | if is_cidr? ( key ) cnt = cnt + 1 end end puts "Current number of CIDR object entries: #{cnt}" if @verbose return cnt rescue => ee puts "Exception on method #{__method__}: #{ee}" if @verbose end
Count numbers of CIDR object entries in the CIDR cache table
Count numbers of CIDR object entries in the CIDR cache table