Module bdrck::net

source · []
Expand description

net provides additional network-related utilities, on top of what is available in std.

Structs

This structure denotes a hardware MAC address.

An IpNet represents an IP network. Networks are typically identified in CIDR notation, like (for example) “192.0.0.0/24”.

Functions

Compare the two given IP addresses, returning the ordering between them. If the given IP addresses are not of the same type (V4/V6), returns None instead.

Returns the IP address which immediately follows the given IP address. If the increment overflowed (i.e., the given input IP was already the largest possible IP address), None is returned instead.

Return the larger of the two IP addresses, or None if they cannot be compared (see compare_ips).

Return the smaller of the two IP addresses, or None if they cannot be compared (see compare_ips).