Documentation ¶
Index ¶
- Constants
- func Broadcast(b bool) func(*Client) error
- func Connection(conn connection) func(*Client) error
- func HardwareAddr(h net.HardwareAddr) func(*Client) error
- func IgnoreServers(s []net.IP) func(*Client) error
- func NewInetSock(options ...func(*inetSock) error) (*inetSock, error)
- func NewPacketSock(ifindex int) (*packetSock, error)
- 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
- func (c *Client) Close() error
- 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) 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
Constants ¶
View Source
const (
MaxDHCPLen = 576
)
Variables ¶
This section is empty.
Functions ¶
func Connection ¶
func HardwareAddr ¶
func HardwareAddr(h net.HardwareAddr) func(*Client) error
func NewInetSock ¶
func NewPacketSock ¶
func SetLocalAddr ¶
func SetRemoteAddr ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) DiscoverPacket ¶
* Create Discover Packet
func (*Client) GetAcknowledgement ¶
* Retreive Acknowledgement * Wait for the offer for a specific Request Packet.
func (*Client) Release ¶
* Release a lease backed on the Acknowledgement Packet. * Returns Any Errors
func (*Client) ReleasePacket ¶
* Create Release Packet For a Release
func (*Client) Renew ¶
* Renew a lease backed on the Acknowledgement Packet. * Returns Sucessfull, The AcknoledgementPacket, Any Errors
func (*Client) RenewalRequestPacket ¶
* Create Request Packet For a Renew
func (*Client) RequestPacket ¶
* Create Request Packet
func (*Client) SendDiscoverPacket ¶
* Send the Discovery Packet to the Broadcast Channel
func (*Client) SendPacket ¶
* Send a DHCP Packet.
func (*Client) SendRequest ¶
* Send Request Based On the offer Received.
Click to show internal directories.
Click to hide internal directories.