Documentation ¶
Overview ¶
Package utils contain utility functions for the IPAM package.
Index ¶
- func GetMask(network string) uint8
- func GetTunnelIP(externalCIDR string) (string, error)
- func GetUnknownSourceIP(extCIDR string) (string, error)
- func IsValidCIDR(cidr string) error
- func MapIPToNetwork(newNetwork, oldIP string) (newIP string, err error)
- func Next(network string) string
- func SetMask(network string, mask uint8) string
- func SplitNetwork(network string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTunnelIP ¶
GetTunnelIP returns the IP address of the tunnel, which is the first external CIDR ip.
func GetUnknownSourceIP ¶
GetUnknownSourceIP returns the IP address used to map unknown sources.
func IsValidCIDR ¶
IsValidCIDR returns an error if the received CIDR is invalid.
func MapIPToNetwork ¶
MapIPToNetwork creates a new IP address obtained by means of the old IP address and the new network.
func SplitNetwork ¶
SplitNetwork returns the two halves that make up a given network.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.