diff options
author | Andrea Barberio <insomniac@slackware.it> | 2017-12-07 23:17:53 +0000 |
---|---|---|
committer | Andrea Barberio <insomniac@slackware.it> | 2017-12-07 23:17:53 +0000 |
commit | 55d9d52d0a25d3826c5109f0bf101448322ec565 (patch) | |
tree | b953d5ad611eb4f6e6e5021d3f72fe258e1780da /dhcpv6/client.go | |
parent | d38c49539b87fb57fec7ff62f787304e4f0eccee (diff) |
Refactored options into the dhcpv6 package to resolve circular imports. Sadly.
Diffstat (limited to 'dhcpv6/client.go')
-rw-r--r-- | dhcpv6/client.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dhcpv6/client.go b/dhcpv6/client.go index 6bb1a91..2f7a64f 100644 --- a/dhcpv6/client.go +++ b/dhcpv6/client.go @@ -37,7 +37,7 @@ func (c *Client) Exchange(ifname string, solicit DHCPv6) ([]DHCPv6, error) { } } conversation = append(conversation, solicit) - advertise, err := c.ExchangeSolicitAdvertise(ifname, solicit) + advertise, err := c.Solicit(ifname, solicit) if err != nil { return conversation, err } @@ -47,7 +47,8 @@ func (c *Client) Exchange(ifname string, solicit DHCPv6) ([]DHCPv6, error) { return conversation, nil } -func (c *Client) ExchangeSolicitAdvertise(ifname string, solicit DHCPv6) (DHCPv6, error) { +// send a SOLICIT, return a response, or nil +func (c *Client) Solicit(ifname string, solicit DHCPv6) (DHCPv6, error) { // if no LocalAddr is specified, get the interface's link-local address var laddr net.UDPAddr if c.LocalAddr == nil { |