Crate netaddr2[][src]

Expand description

A crate for parsing, representing, and manipulating network addresses.

netaddr2 arose from a need to mask and subnet IP space logically similar to the way that routers and network interface cards (NICs) do. This enables the user to ask questions like:

  • Does this IpAddr belong to this NetAddr? (That is, does this specific address happen to lie within the network/netmask given by this NetAddr?)

  • Does this network contain this other network?

The API is strikingly similar to that of the std::net::Ip.*Addr structs, and users who have used that set of structs will hopefully find this API quite naturally similar.

Structs

A structure representing an IPv4 network.

A structure representing an IPv6 network.

Enums

The error type for operations relating to the NetAddr type

A structure representing an IP network.

Traits

Compute the “broadcast” address for supported networks.

Check containment of one object within another

Masking one object with another

Merge two items together

Type Definitions

A type definition with netaddr2::Error as its type.