Expand description
IPv4/IPv6 network primitives.
This library provides types for IP networks by extending the standard library.
Unlike most open-source libraries, this library is designed to support non-contiguous masks.
Structs§
- Contiguous
- A contiguous IP network.
- Ipv4
Network - Represents the network range in which IP addresses are IPv4.
- Ipv4
Network Addrs - Bidirectional iterator over
Ipv4Addrin anIpv4Network. - Ipv4
Network Diff - Lazy iterator over
Ipv4Networkparts of a set difference. - Ipv6
Network - Represents the network range in which IP addresses are IPv6.
- Ipv6
Network Addrs - Bidirectional iterator over
Ipv6Addrin anIpv6Network. - Ipv6
Network Diff - Yields between 0 and 128 pairwise-disjoint networks whose union equals
S(A) \ S(B). - MacAddr
- A 48-bit MAC (EUI-48) address.
- MacAddr
Parse Error - Error returned when parsing a MAC address string fails.
Enums§
- Contiguous
IpNet Parse Error - An error that occurs when parsing a contiguous IP network.
- IpNet
Parse Error - An error that is returned during IP network parsing.
- IpNetwork
- An IP network, either IPv4 or IPv6.
Functions§
- ipv4_
aggregate - Aggregates IPv4 networks in place: removes duplicates, eliminates networks contained in others, and merges adjacent siblings.
- ipv4_
binary_ split - Finds the shortest common network for the given slice of networks that covers at least half of slice.
- ipv6_
aggregate - Aggregates IPv6 networks in place: removes duplicates, eliminates networks contained in others, and merges adjacent siblings.
- ipv6_
binary_ split - Finds the shortest common network for the given slice of networks that covers at least half of slice.