dhcpd

package
v0.15.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool is a dhcp pool.

func NewPool

func NewPool(lease time.Duration, start, end net.IP) (*Pool, error)

NewPool returns a new dhcp ip pool.

func (*Pool) LeaseIP added in v0.15.0

func (p *Pool) LeaseIP(mac net.HardwareAddr) (net.IP, error)

LeaseIP leases an ip to mac from dhcp pool.

func (*Pool) LeaseStaticIP added in v0.15.0

func (p *Pool) LeaseStaticIP(mac net.HardwareAddr, ip net.IP)

LeaseStaticIP leases static ip from pool according to the given mac.

func (*Pool) ReleaseIP added in v0.15.0

func (p *Pool) ReleaseIP(mac net.HardwareAddr)

ReleaseIP releases ip from pool according to the given mac.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL