Module bdrck::net[][src]

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

Structs

HardwareAddr

This structure denotes a hardware MAC address.

IpNet

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

Functions

compare_ips

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.

increment_ip

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.

max_ip

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

min_ip

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