n6sdk.addr_helpers

n6sdk.addr_helpers.ip_network_as_tuple(ip_network_str)[source]
>>> ip_network_as_tuple('10.20.30.40/24')
('10.20.30.40', 24)
n6sdk.addr_helpers.ip_network_tuple_to_min_max_ip(ip_network_tuple)[source]
>>> ip_network_tuple_to_min_max_ip(('10.20.30.41', 24))
(169090560, 169090815)
>>> ip_network_tuple_to_min_max_ip(('10.20.30.41', 32))
(169090601, 169090601)
>>> ip_network_tuple_to_min_max_ip(('10.20.30.41', 0))
(0, 4294967295)
n6sdk.addr_helpers.ip_str_to_int(ip_str)[source]
>>> ip_str_to_int('10.20.30.41')
169090601