Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDefaultGateway ¶
Generate the default gateway IP Address for a subnet
func GetHostIPNetworks ¶ added in v1.0.8
Return Host IP Networks Ignores provided interfaces and filters loopback and non IPv4 addrs.
func IPToUint32 ¶
func Uint32ToIP ¶
Types ¶
type NetIDAllocator ¶ added in v1.0.5
type NetIDAllocator struct {
// contains filtered or unexported fields
}
func NewNetIDAllocator ¶ added in v1.0.5
func NewNetIDAllocator(min uint, max uint, inUse []uint) (*NetIDAllocator, error)
func (*NetIDAllocator) GetNetID ¶ added in v1.0.5
func (nia *NetIDAllocator) GetNetID() (uint, error)
func (*NetIDAllocator) ReleaseNetID ¶ added in v1.0.5
func (nia *NetIDAllocator) ReleaseNetID(netid uint) error
type SubnetAllocator ¶
type SubnetAllocator struct {
// contains filtered or unexported fields
}
func NewSubnetAllocator ¶
func NewSubnetAllocator(network string, hostBits uint, inUse []string) (*SubnetAllocator, error)
func (*SubnetAllocator) GetNetwork ¶
func (sna *SubnetAllocator) GetNetwork() (*net.IPNet, error)
func (*SubnetAllocator) ReleaseNetwork ¶
func (sna *SubnetAllocator) ReleaseNetwork(ipnet *net.IPNet) error
Click to show internal directories.
Click to hide internal directories.