Versions in this module Expand all Collapse all v1 v1.0.0 Feb 28, 2024 Changes in this version + const MaxDHCPLen + func Connection(co connections.Transport) 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() (connections.Transport, error) + func NewPacketSock(ifindex int) (connections.Transport, error) — linux/amd64 + func Timeout(t time.Duration) func(*Client) error + type Client struct + func New(options ...func(*Client) error) (*Client, error) + func (c *Client) BroadcastPacket(packet dhcp4.Packet) (i int, err 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) GetAcknowledgementWithOptions(requestPacket *dhcp4.Packet, opts DHCP4ClientOptions) (dhcp4.Packet, error) + func (c *Client) GetOffer(discoverPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) GetOfferWithOptions(xid []byte, opts DHCP4ClientOptions) (dhcp4.Packet, error) + func (c *Client) Release(dhcpaddr net.UDPAddr, acknowledgement dhcp4.Packet) error + func (c *Client) ReleasePacket(acknowledgement *dhcp4.Packet) dhcp4.Packet + func (c *Client) Renew(dhcpaddr net.UDPAddr, acknowledgement dhcp4.Packet) (bool, dhcp4.Packet, error) + func (c *Client) RenewalRequestPacket(l net.IP, s net.IP) dhcp4.Packet + func (c *Client) RenewalRequestPacketFromAcknowledgment(a *dhcp4.Packet) dhcp4.Packet + func (c *Client) RenewalRequestPacketWithOptions(l net.IP, s net.IP, opts DHCP4ClientOptions) dhcp4.Packet + func (c *Client) Request() (bool, dhcp4.Packet, error) + func (c *Client) RequestPacket(r net.IP, s net.IP) dhcp4.Packet + func (c *Client) RequestPacketFromOfferPacket(offerPacket *dhcp4.Packet) dhcp4.Packet + func (c *Client) RequestPacketWithOptions(r net.IP, s net.IP, opts DHCP4ClientOptions) dhcp4.Packet + func (c *Client) RequestWithOptions(opts DHCP4ClientOptions) (bool, dhcp4.Packet, error) + func (c *Client) SendDecline(acknowledgementPacket *dhcp4.Packet) (declinePacket dhcp4.Packet, err error) + func (c *Client) SendDiscoverPacket() (dhcp4.Packet, error) + func (c *Client) SendDiscoverPacketWithOptions(opts DHCP4ClientOptions) (dhcp4.Packet, error) + func (c *Client) SendRequestFromOfferPacket(offerPacket *dhcp4.Packet) (dhcp4.Packet, error) + func (c *Client) SendRequestFromOfferPacketWithOptions(offerPacket *dhcp4.Packet, opts DHCP4ClientOptions) (requestPacket dhcp4.Packet, err error) + func (c *Client) SetLaddr(l *net.UDPAddr) + func (c *Client) SetOption(options ...func(*Client) error) error + func (c *Client) UnicastPacket(p dhcp4.Packet) (i int, err error) + type DHCP4ClientOptions map[dhcp4.MessageType][]*dhcp4.Option + func (o DHCP4ClientOptions) String() string + type DHCP4Error struct + Dest net.Addr + Err error + IsTemporary bool + IsTimeout bool + OpCode int + Src net.Addr + func (e *DHCP4Error) Error() string + func (e *DHCP4Error) Temporary() bool + func (e *DHCP4Error) Timeout() bool