diff options
Diffstat (limited to 'dhcpv6/modifiers.go')
-rw-r--r-- | dhcpv6/modifiers.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dhcpv6/modifiers.go b/dhcpv6/modifiers.go index fbbad23..8c708d9 100644 --- a/dhcpv6/modifiers.go +++ b/dhcpv6/modifiers.go @@ -2,6 +2,7 @@ package dhcpv6 import ( "net" + "time" "github.com/insomniacslk/dhcp/iana" "github.com/insomniacslk/dhcp/rfc1035label" @@ -175,3 +176,9 @@ func WithIAPD(iaid [4]byte, prefixes ...*OptIAPrefix) Modifier { func WithClientLinkLayerAddress(ht iana.HWType, lla net.HardwareAddr) Modifier { return WithOption(OptClientLinkLayerAddress(ht, lla)) } + +// WithInformationRefreshTime adds an optInformationRefreshTime to the DHCPv6 packet +// using the provided duration +func WithInformationRefreshTime(irt time.Duration) Modifier { + return WithOption(OptInformationRefreshTime(irt)) +} |