dhcp

package
v0.0.0-...-aa34488 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DHCPAllocator

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

func NewDHCPAllocator

func NewDHCPAllocator() *DHCPAllocator

func (*DHCPAllocator) AddLease

func (a *DHCPAllocator) AddLease(
	hwAddr string,
	serverIP net.IP,
	clientIP net.IP,
	cidr string,
	routerIP net.IP,
	DNSServers []net.IP,
	domainName *string,
	domainSearch []string,
	NTPServers []string,
	leaseTime *int,
) (err error)

func (*DHCPAllocator) CheckLease

func (a *DHCPAllocator) CheckLease(hwAddr string) bool

func (*DHCPAllocator) DeleteLease

func (a *DHCPAllocator) DeleteLease(hwAddr string) (err error)

func (*DHCPAllocator) DryRun

func (a *DHCPAllocator) DryRun(ctx context.Context, nic string) (err error)

func (*DHCPAllocator) GetLease

func (a *DHCPAllocator) GetLease(hwAddr string) (lease DHCPLease)

func (*DHCPAllocator) Run

func (a *DHCPAllocator) Run(nic string, dryRun bool) (err error)

func (*DHCPAllocator) Stop

func (a *DHCPAllocator) Stop(nic string) (err error)

func (*DHCPAllocator) Usage

func (a *DHCPAllocator) Usage()

type DHCPLease

type DHCPLease struct {
	ServerIP     net.IP
	ClientIP     net.IP
	SubnetMask   net.IPMask
	Router       net.IP
	DNS          []net.IP
	DomainName   string
	DomainSearch []string
	NTP          []net.IP
	LeaseTime    int
}

Jump to

Keyboard shortcuts

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