package
0.0.0-20240818021530-f5e744f7964a
Repository: https://github.com/kaisenlinux/docker.git
Documentation: pkg.go.dev
# Functions
CheckNameserverOverlaps checks whether the passed network overlaps with any of the nameservers.
CheckRouteOverlaps checks whether the passed network overlaps with any existing routes.
FindAvailableNetwork returns a network from the passed list which does not overlap with existing interfaces in the system.
GenerateIfaceName returns an interface name using the passed in prefix and the length of random bytes.
GenerateMACFromIP returns a locally administered MAC address where the 4 least significant bytes are derived from the IPv4 address.
GenerateRandomMAC returns a new 6-byte(48-bit) hardware address (MAC).
GenerateRandomName returns a string of the specified length, created by joining the prefix to random hex characters.
IsV6Listenable returns true when `[::1]:0` is listenable.
NetworkOverlaps detects overlap between one IPNet and another.
NetworkRange calculates the first and last IP addresses in an IPNet.
ReverseIP accepts a V4 or V6 IP string in the canonical form and returns a reversed IP in the dotted decimal form .
# Variables
ErrNetworkOverlaps preformatted error.
ErrNetworkOverlapsWithNameservers preformatted error.