diff options
Diffstat (limited to 'dhcpv4/modifiers.go')
-rw-r--r-- | dhcpv4/modifiers.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dhcpv4/modifiers.go b/dhcpv4/modifiers.go new file mode 100644 index 0000000..bc19219 --- /dev/null +++ b/dhcpv4/modifiers.go @@ -0,0 +1,11 @@ +package dhcpv4 + +// WithUserClass adds a user class option to the packet +func WithUserClass(uc []byte) Modifier { + // TODO let the user specify multiple user classes + return func(d *DHCPv4) *DHCPv4 { + ouc := OptUserClass{UserClasses: [][]byte{uc}} + d.AddOption(&ouc) + return d + } +}
\ No newline at end of file |