Versions in this module Expand all Collapse all v1 v1.0.0 Jun 22, 2018 Changes in this version + const MaxDHCPLen + func Broadcast(b bool) func(*Client) error + func Connection(conn ConnectionInt) func(*Client) error + func CryptoGenerateXID(b []byte) + func GenerateXID(g func([]byte)) func(*Client) error + func HardwareAddr(h net.HardwareAddr) func(*Client) error + func IgnoreServers(s []net.IP) func(*Client) error + func MathGenerateXID(b []byte) + func NewInetSock(options ...func(*inetSock) error) (*inetSock, error) + func NewPacketSock(ifindex int) (*packetSock, error) — linux/amd64 + func SetLocalAddr(l net.UDPAddr) func(*inetSock) error + func SetRemoteAddr(r net.UDPAddr) func(*inetSock) error + func Timeout(t time.Duration) func(*Client) error + type Client struct + func New(options ...func(*Client) error) (*Client, error) + func (c *Client) Close() error + func (c *Client) DeclinePacket(acknowledgement *dhcp4.Packet) dhcp4.Packet + func (c *Client) DiscoverPacket() dhcp4.Packet + func (c *Client) GetAcknowledgement(requestPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) GetOffer(discoverPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) Release(acknowledgement dhcp4.Packet) error + func (c *Client) ReleasePacket(acknowledgement *dhcp4.Packet) dhcp4.Packet + func (c *Client) Renew(acknowledgement dhcp4.Packet) (bool, dhcp4.Packet, error) + func (c *Client) RenewalRequestPacket(acknowledgement *dhcp4.Packet) dhcp4.Packet + func (c *Client) Request() (bool, dhcp4.Packet, error) + func (c *Client) RequestPacket(offerPacket *dhcp4.Packet) dhcp4.Packet + func (c *Client) SendDecline(acknowledgementPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) SendDiscoverPacket() (dhcp4.Packet, error) + func (c *Client) SendPacket(packet dhcp4.Packet) error + func (c *Client) SendRequest(offerPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) SetOption(options ...func(*Client) error) error + type ConnectionInt interface + Close func() error + ReadFrom func() ([]byte, net.IP, error) + SetReadTimeout func(t time.Duration) error + Write func(packet []byte) error + type TimeoutError struct + Timeout time.Duration + func (te *TimeoutError) Error() string