X-Git-Url: https://blacka.com/cgi-bin/gitweb.cgi?p=python-rwhoisd.git;a=blobdiff_plain;f=rwhoisd%2FMemIndex.py;h=4d9d3653f58349a37d2e9de0a6cd8dc70112b1b8;hp=88a6cf031dbb21f8444928f62a47641274be3c5a;hb=HEAD;hpb=38b4406b046fb794322e948fd77cc1cbf28baa25 diff --git a/rwhoisd/MemIndex.py b/rwhoisd/MemIndex.py index 88a6cf0..4d9d365 100644 --- a/rwhoisd/MemIndex.py +++ b/rwhoisd/MemIndex.py @@ -2,8 +2,6 @@ # # Copyright (C) 2003, David E. Blacka # -# $Id: MemIndex.py,v 1.2 2003/04/28 16:43:19 davidb Exp $ -# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or @@ -421,8 +419,8 @@ if __name__ == "__main__": ci.add("127.0.0.1/24", "net-local-1"); ci.add("127.0.0.1/32", "net-local-2"); - ci.add(Cidr.Cidr.create("216.168.224.0", 22), "net-vrsn-1") - ci.add(Cidr.Cidr.create("216.168.252.1", 32), "net-vrsn-2") + ci.add(Cidr.new("216.168.224.0", 22), "net-vrsn-1") + ci.add(Cidr.new("216.168.252.1", 32), "net-vrsn-2") ci.add("24.36.191.0/24", "net-foo-c") ci.add("24.36.191.32/27", "net-foo-sub-c") ci.add("24.36/16", "net-foo-b") @@ -431,11 +429,11 @@ if __name__ == "__main__": ci.add("48.12.6.0 - 48.12.6.95", "net-bar-1") print "finding exactly 127.0.0.0/24" - res = ci.find(Cidr.Cidr.create("127.0.0.0/24")) + res = ci.find(Cidr.new("127.0.0.0/24")) print res print "finding exactly 127.0.0.16/32" - res = ci.find(Cidr.Cidr.create("127.0.0.16/32")) + res = ci.find(Cidr.new("127.0.0.16/32")) print res print "finding exactly 3ffe:4:5:6::0/64" @@ -443,19 +441,19 @@ if __name__ == "__main__": print res print "finding supernets of 127.0.0.16/32" - res = ci.find_supernets(Cidr.Cidr.create("127.0.0.16/32")) + res = ci.find_supernets(Cidr.new("127.0.0.16/32")) print res print "finding supernets of 24.36.191.32/27" - res = ci.find(Cidr.Cidr.create("24.36.191.32/27"), 1) + res = ci.find(Cidr.new("24.36.191.32/27"), 1) print res print "finding supernets of 24.36.191.33/27" - res = ci.find_supernets(Cidr.Cidr.create("24.36.191.33/27")) + res = ci.find_supernets(Cidr.new("24.36.191.33/27")) print res print "finding supernets of 24.36.191.64/27" - res = ci.find_supernets(Cidr.Cidr.create("24.36.191.64/27")) + res = ci.find_supernets(Cidr.new("24.36.191.64/27")) print res print "finding supernets of 3ffe:4:5:6:7::0/80" @@ -467,7 +465,7 @@ if __name__ == "__main__": print res print "finding subnets of 127.0/16" - res = ci.find_subnets(Cidr.Cidr.create("127.0/16")) + res = ci.find_subnets(Cidr.new("127.0/16")) print res print "finding subnets of 3ffe:4::0/32"