Documentation ¶
Index ¶
- func CreateBitset(numBitsWide uint) *bitset.BitSet
- func GetIPNumber(subnetIP string, subnetLen uint, allocSubnetLen uint, hostIP string) (uint, error)
- func GetInterfaceIP(linkName string) (string, error)
- func GetLocalIP() (string, error)
- func GetSubnetIP(subnetIP string, subnetLen uint, allocSubnetLen, hostID uint) (string, error)
- func InitSubnetBitset(b *bitset.BitSet, subnetLen uint)
- func ParseCIDR(cidrStr string) (string, uint, error)
- func SetInterfaceMac(name string, macaddr string) error
- type TagRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBitset ¶
CreateBitset initializes a bit set with 2^numBitsWide bits
func GetIPNumber ¶
GetIPNumber obtains the host id from the host IP. SEe `GetSubnetIP` for more information.
func GetInterfaceIP ¶
GetInterfaceIP obtains the ip addr of a local interface on the host.
func GetLocalIP ¶
GetLocalIP obtains the first IP on a local interface on the host.
func GetSubnetIP ¶
GetSubnetIP given a subnet IP and host identifier, calculates an IP within the subnet for use.
func InitSubnetBitset ¶
InitSubnetBitset initializes a bit set with 2^(32 - subnetLen) bits
func SetInterfaceMac ¶
SetInterfaceMac : Set mac address of an interface
Types ¶
Click to show internal directories.
Click to hide internal directories.