Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateDefaultGateway ¶
Generate the default gateway IP Address for a subnet
Types ¶
type IPAllocator ¶
type IPAllocator struct {
// contains filtered or unexported fields
}
func NewIPAllocator ¶
func NewIPAllocator(network string, inUse []string) (*IPAllocator, error)
func (*IPAllocator) GetIP ¶
func (ipa *IPAllocator) GetIP() (*net.IPNet, error)
func (*IPAllocator) ReleaseIP ¶
func (ipa *IPAllocator) ReleaseIP(ip *net.IPNet) error
type SubnetAllocator ¶
type SubnetAllocator struct {
// contains filtered or unexported fields
}
func NewSubnetAllocator ¶
func NewSubnetAllocator(network string, capacity 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
Source Files
¶
- common.go
- ip_allocator.go
- subnet_allocator.go
Click to show internal directories.
Click to hide internal directories.