Documentation
¶
Overview ¶
Package dhclient provides a unified interface for interfacing with both DHCPv4 and DHCPv6 clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandlePacket ¶
HandlePacket adds IP addresses, routes, and DNS servers to the system.
Types ¶
type Client ¶
type Client interface { // Solicit solicits a new DHCP lease. Solicit() (Packet, error) // Renew renews an existing DHCP lease. Renew(p Packet) (Packet, error) }
Client is a DHCP client.
type Client4 ¶
type Client4 struct {
// contains filtered or unexported fields
}
Client4 implements Client for DHCPv4.
type Packet ¶
type Packet interface { IPs() []net.IP // Leases are the leases returned by the DHCP server if specified, // otherwise nil. Leases() []Lease // Gateway is the gateway server, if specified, otherwise nil. Gateway() net.IP // DNS are DNS server addresses, if specified, otherwise nil. DNS() []net.IP // Boot returns the boot URI and boot parameters if specified, // otherwise an error. Boot() (url.URL, string, error) }
Packet is a DHCP packet.
type Packet4 ¶
type Packet4 struct {
// contains filtered or unexported fields
}
Packet4 implements Packet for IPv4 DHCP.
Click to show internal directories.
Click to hide internal directories.