diff options
Diffstat (limited to 'dhcpv4/bsdp/bsdp_option_machine_name.go')
-rw-r--r-- | dhcpv4/bsdp/bsdp_option_machine_name.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/dhcpv4/bsdp/bsdp_option_machine_name.go b/dhcpv4/bsdp/bsdp_option_machine_name.go deleted file mode 100644 index ced88b0..0000000 --- a/dhcpv4/bsdp/bsdp_option_machine_name.go +++ /dev/null @@ -1,34 +0,0 @@ -package bsdp - -import ( - "github.com/insomniacslk/dhcp/dhcpv4" -) - -// OptMachineName represents a BSDP message type. -// -// Implements the BSDP option machine name, which gives the Netboot server's -// machine name. -type OptMachineName struct { - Name string -} - -// ParseOptMachineName constructs an OptMachineName struct from a sequence of -// bytes and returns it, or an error. -func ParseOptMachineName(data []byte) (*OptMachineName, error) { - return &OptMachineName{Name: string(data)}, nil -} - -// Code returns the option code. -func (o *OptMachineName) Code() dhcpv4.OptionCode { - return OptionMachineName -} - -// ToBytes returns a serialized stream of bytes for this option. -func (o *OptMachineName) ToBytes() []byte { - return []byte(o.Name) -} - -// String returns a human-readable string for this option. -func (o *OptMachineName) String() string { - return "BSDP Machine Name -> " + o.Name -} |