summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/modifiers.go
blob: bc192196ad7cc78a3e60403b13546c4684c66983 (plain)
1
2
3
4
5
6
7
8
9
10
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
	}
}