lease

package
v0.0.0-...-6fa9711 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringCandidates

func StringCandidates() []string

Types

type DHCPLease

type DHCPLease struct {
	State            State
	IpAddr           net.IP
	Dns              net.IP
	SubnetMask       net.IPMask
	ServerIdentifier net.IP
	LeaseInitTime    time.Time
	LeaseDuration    time.Duration
	T1               time.Duration
	T2               time.Duration
	Offer            packet.DHCPPacket
}

func LoadLease

func LoadLease() DHCPLease

func NewDHCPLease

func NewDHCPLease() DHCPLease

func (*DHCPLease) DurationUntilRebind

func (l *DHCPLease) DurationUntilRebind() time.Duration

func (DHCPLease) DurationUntilRenew

func (l DHCPLease) DurationUntilRenew() time.Duration

func (DHCPLease) GetLeaseExpirationMoment

func (l DHCPLease) GetLeaseExpirationMoment() time.Time

func (DHCPLease) GetRebindMoment

func (l DHCPLease) GetRebindMoment() time.Time

func (DHCPLease) IsRebindPeriodExpired

func (l DHCPLease) IsRebindPeriodExpired() bool

func (DHCPLease) IsRenewPeriodExpired

func (l DHCPLease) IsRenewPeriodExpired() bool

func (*DHCPLease) ResetLease

func (l *DHCPLease) ResetLease()

func (DHCPLease) String

func (l DHCPLease) String() string

type State

type State int
const (
	INIT_REBOOT State = iota
	REBOOTING
	INIT
	SELECTING
	REQUESTING
	BOUND
	RENEWING
	REBINDING
)

func Parse

func Parse(str string) State

func (State) String

func (state State) String() string

Jump to

Keyboard shortcuts

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