Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultParamsRequestList = []layers.DHCPOpt{ layers.DHCPOptSubnetMask, layers.DHCPOptRouter, layers.DHCPOptTimeServer, layers.DHCPOptDNS, layers.DHCPOptDomainName, layers.DHCPOptInterfaceMTU, layers.DHCPOptNTPServers, }
DefaultParamsRequestList is a list of params to be requested from the server
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Hostname string
Iface *net.Interface
Lease *Lease // The current lease
OnBound Callback // On renew or rebound
OnExpire Callback // On expiration of a lease
DHCPOptions []Option // List of options to send on discovery and requests
// contains filtered or unexported fields
}
Client is a DHCP client instance
func (*Client) AddParamRequest ¶
AddParamRequest adds an parameter to parameter request list, if not included yet.
func (*Client) Rebind ¶
func (client *Client) Rebind()
Rebind forgets the current lease and triggers acquirement of a new one
type Lease ¶
type Lease struct {
ServerID net.IP
FixedAddress net.IP
Netmask net.IPMask
NextServer net.IP
Broadcast net.IP
Router []net.IP
DNS []net.IP
TimeServer []net.IP
DomainName string
MTU uint16
// Other options
OtherOptions []Option
Bound time.Time
Renew time.Time
Rebind time.Time
Expire time.Time
}
Lease is an assignment by the DHCP server
Click to show internal directories.
Click to hide internal directories.