1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-05-27 08:56:19 +02:00

Removed references to removed function

This commit is contained in:
Pavel Odintsov 2023-04-03 19:25:50 +01:00
parent 2b0e4a6212
commit 5f318059c2
2 changed files with 12 additions and 4 deletions

View File

@ -1230,10 +1230,6 @@ bool load_our_networks_list() {
logger << log4cpp::Priority::INFO << "We loaded " << network_list_from_config.size() << " networks from networks file";
}
// Some consistency checks
assert(convert_ip_as_string_to_uint("255.255.255.0") == convert_cidr_to_binary_netmask(24));
assert(convert_ip_as_string_to_uint("255.255.255.255") == convert_cidr_to_binary_netmask(32));
logger << log4cpp::Priority::INFO << "Totally we have " << networks_list_ipv4_as_string.size() << " IPv4 subnets";
logger << log4cpp::Priority::INFO << "Totally we have " << networks_list_ipv6_as_string.size() << " IPv6 subnets";

View File

@ -105,6 +105,18 @@ TEST(patricia, negative_lookup_ipv6_prefix) {
EXPECT_EQ(found, false);
}
TEST(convert_ip_as_string_to_uint_test, convert_ip_as_string_to_uint) {
uint32_t ip = 0;
convert_ip_as_string_to_uint_safe("255.255.255.0", ip);
EXPECT_EQ(ip, convert_cidr_to_binary_netmask(24));
convert_ip_as_string_to_uint_safe("255.255.255.255", ip);
EXPECT_EQ(ip, convert_cidr_to_binary_netmask(32));
}
TEST(patricia, positive_lookup_ipv6_prefix) {
patricia_tree_t* lookup_ipv6_tree;
lookup_ipv6_tree = New_Patricia(128);