-
- Downloads
Add 'trunc_to_net' flag to resolve_ipnets() function.
This new flag will cause resolve_ipnets() to mask the resolved IP addresses with the specified netmask, thus "truncating" the address down to the network address for the subnet. For example, if the hostname "exempel.se" resolves to 2001:db8:17:23::69:3:4711, then "exempel.se/64" will return 2001:db8:17:23::/64, "exempel.se/112" will return 2001:db8:17:23::69:3:0/112, and "exempel.se/96" will yield the address 2001:db8:17:23:0:69::/96. This can be useful if you have an "example" host, and want to specify the entire subnet on which that host resides, but your application requires the address part of the CIDR specification given to it to be the network address, i.e. with all bits in the host part to be zero.
Please register or sign in to comment