File: option_misc.go

package info (click to toggle)
golang-github-insomniacslk-dhcp 0.0~git20220915.043f172-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,168 kB
  • sloc: makefile: 6
file content (23 lines) | stat: -rw-r--r-- 726 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package dhcpv4

import (
	"github.com/insomniacslk/dhcp/iana"
	"github.com/insomniacslk/dhcp/rfc1035label"
)

// OptDomainSearch returns a new domain search option.
//
// The domain search option is described by RFC 3397, Section 2.
func OptDomainSearch(labels *rfc1035label.Labels) Option {
	return Option{Code: OptionDNSDomainSearchList, Value: labels}
}

// OptClientArch returns a new Client System Architecture Type option.
func OptClientArch(archs ...iana.Arch) Option {
	return Option{Code: OptionClientSystemArchitectureType, Value: iana.Archs(archs)}
}

// OptClientIdentifier returns a new Client Identifier option.
func OptClientIdentifier(ident []byte) Option {
	return OptGeneric(OptionClientIdentifier, ident)
}