Skip to content

Commit

Permalink
Merge pull request #336 from xaionaro-facebook/master
Browse files Browse the repository at this point in the history
Added option nclient4.WithHWAddr
  • Loading branch information
pmazzini authored Nov 29, 2019
2 parents 571b45e + 73d51e8 commit 776f862
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dhcpv4/nclient4/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,15 @@ func WithUnicast(srcAddr *net.UDPAddr) ClientOpt {
}
}

// WithHWAddr tells to the Client to receive messages destinated to selected
// hardware address
func WithHWAddr(hwAddr net.HardwareAddr) ClientOpt {
return func(c *Client) (err error) {
c.ifaceHWAddr = hwAddr
return
}
}

func withBufferCap(n int) ClientOpt {
return func(c *Client) (err error) {
c.bufferCap = n
Expand Down

0 comments on commit 776f862

Please sign in to comment.