File: option_archtype.go

package info (click to toggle)
golang-github-insomniacslk-dhcp 0.0~git20250417.5f8cf70-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,096 kB
  • sloc: makefile: 3
file content (31 lines) | stat: -rw-r--r-- 637 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package dhcpv6

import (
	"fmt"

	"github.com/insomniacslk/dhcp/iana"
)

// OptClientArchType represents an option CLIENT_ARCH_TYPE.
//
// This module defines the OptClientArchType structure.
// https://www.ietf.org/rfc/rfc5970.txt
func OptClientArchType(a ...iana.Arch) Option {
	return &optClientArchType{Archs: a}
}

type optClientArchType struct {
	iana.Archs
}

func (op *optClientArchType) Code() OptionCode {
	return OptionClientArchType
}

func (op optClientArchType) String() string {
	return fmt.Sprintf("%s: %s", op.Code(), op.Archs)
}

func (op *optClientArchType) FromBytes(p []byte) error {
	return op.Archs.FromBytes(p)
}