summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/option_tftp_server_name.go
diff options
context:
space:
mode:
authorChristopher Koch <c@chrisko.ch>2019-01-15 20:55:06 +0000
committerChris K <c@chrisko.ch>2019-01-19 14:44:00 -0800
commitfeb8958aff848a6d7363fea2e29a2ac071685055 (patch)
tree768aee371b4b7a1af1aba5691e97b7970d5c560d /dhcpv4/option_tftp_server_name.go
parentfe6f307df5d78a54ddd4a56a275043317148fe5a (diff)
dhcpv4: consolidate string options into one file.
Diffstat (limited to 'dhcpv4/option_tftp_server_name.go')
-rw-r--r--dhcpv4/option_tftp_server_name.go30
1 files changed, 0 insertions, 30 deletions
diff --git a/dhcpv4/option_tftp_server_name.go b/dhcpv4/option_tftp_server_name.go
deleted file mode 100644
index 52c638d..0000000
--- a/dhcpv4/option_tftp_server_name.go
+++ /dev/null
@@ -1,30 +0,0 @@
-package dhcpv4
-
-import (
- "fmt"
-)
-
-// OptTFTPServerName implements the TFTP server name option described by RFC
-// 2132, Section 9.4.
-type OptTFTPServerName struct {
- TFTPServerName string
-}
-
-// Code returns the option code
-func (op *OptTFTPServerName) Code() OptionCode {
- return OptionTFTPServerName
-}
-
-// ToBytes serializes the option and returns it as a sequence of bytes
-func (op *OptTFTPServerName) ToBytes() []byte {
- return []byte(op.TFTPServerName)
-}
-
-func (op *OptTFTPServerName) String() string {
- return fmt.Sprintf("TFTP Server Name -> %s", op.TFTPServerName)
-}
-
-// ParseOptTFTPServerName returns a new OptTFTPServerName from a byte stream or error if any
-func ParseOptTFTPServerName(data []byte) (*OptTFTPServerName, error) {
- return &OptTFTPServerName{TFTPServerName: string(data)}, nil
-}