diff options
Diffstat (limited to 'dhcpv4')
-rw-r--r-- | dhcpv4/nclient4/client.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dhcpv4/nclient4/client.go b/dhcpv4/nclient4/client.go index 17af89c..a1596a5 100644 --- a/dhcpv4/nclient4/client.go +++ b/dhcpv4/nclient4/client.go @@ -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 |