diff options
author | Christopher Koch <c@chrisko.ch> | 2019-01-15 20:55:06 +0000 |
---|---|---|
committer | Chris K <c@chrisko.ch> | 2019-01-19 14:44:00 -0800 |
commit | feb8958aff848a6d7363fea2e29a2ac071685055 (patch) | |
tree | 768aee371b4b7a1af1aba5691e97b7970d5c560d /dhcpv4/option_class_identifier.go | |
parent | fe6f307df5d78a54ddd4a56a275043317148fe5a (diff) |
dhcpv4: consolidate string options into one file.
Diffstat (limited to 'dhcpv4/option_class_identifier.go')
-rw-r--r-- | dhcpv4/option_class_identifier.go | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/dhcpv4/option_class_identifier.go b/dhcpv4/option_class_identifier.go deleted file mode 100644 index 286cb59..0000000 --- a/dhcpv4/option_class_identifier.go +++ /dev/null @@ -1,32 +0,0 @@ -package dhcpv4 - -import ( - "fmt" -) - -// OptClassIdentifier implements the vendor class identifier option described -// in RFC 2132, Section 9.13. -type OptClassIdentifier struct { - Identifier string -} - -// ParseOptClassIdentifier constructs an OptClassIdentifier struct from a sequence of -// bytes and returns it, or an error. -func ParseOptClassIdentifier(data []byte) (*OptClassIdentifier, error) { - return &OptClassIdentifier{Identifier: string(data)}, nil -} - -// Code returns the option code. -func (o *OptClassIdentifier) Code() OptionCode { - return OptionClassIdentifier -} - -// ToBytes returns a serialized stream of bytes for this option. -func (o *OptClassIdentifier) ToBytes() []byte { - return []byte(o.Identifier) -} - -// String returns a human-readable string for this option. -func (o *OptClassIdentifier) String() string { - return fmt.Sprintf("Class Identifier -> %v", o.Identifier) -} |