dhcpd

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New added in v0.16.0

func New(failover bool, args ...string) (*dhcpd, error)

New returns a new dhcpd instance.

func NewFailOverService added in v0.16.0

func NewFailOverService(args ...string) (service.Service, error)

NewFailOverService returns a new dhcpd Service with failover mode on.

func NewService added in v0.16.0

func NewService(args ...string) (service.Service, error)

NewService returns a new dhcpd Service.

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 netip.Addr) (*Pool, error)

NewPool returns a new dhcp ip pool.

func (*Pool) LeaseIP added in v0.15.0

func (p *Pool) LeaseIP(mac net.HardwareAddr) (netip.Addr, 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 netip.Addr)

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