Documentation ¶
Overview ¶
Package dhcp implements a DHCP client and server as described in RFC 2131.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a DHCP client.
func NewClient ¶
NewClient creates a DHCP client.
TODO(crawshaw): add s.LinkAddr(nicid) to *stack.Stack.
func (*Client) Request ¶
Request executes a DHCP request session.
On success, it adds a new address to this client's TCPIP stack. If the server sets a lease limit a timer is set to automatically renew it.
type Config ¶
type Config struct { ServerAddress tcpip.Address // address of the server SubnetMask tcpip.AddressMask // client address subnet mask Gateway tcpip.Address // client default gateway DomainNameServer tcpip.Address // client domain name server LeaseLength time.Duration // length of the address lease }
Config is standard DHCP configuration.
Click to show internal directories.
Click to hide internal directories.