summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/option_domain_name_server.go
diff options
context:
space:
mode:
authorChristopher Koch <chrisko@google.com>2018-12-29 09:21:33 -0800
committerinsomniac <insomniacslk@users.noreply.github.com>2019-01-14 23:19:04 +0000
commit158ad8e79b2e644da7dfbfceb9191e6587ede81e (patch)
tree3618cbf06e7e34d835495047ec634b5b93824432 /dhcpv4/option_domain_name_server.go
parent03a987ca7475df51eb9164e807f9c1929017e08a (diff)
dhcpv4: move all list of IPs types to options_ips.go.
Diffstat (limited to 'dhcpv4/option_domain_name_server.go')
-rw-r--r--dhcpv4/option_domain_name_server.go40
1 files changed, 0 insertions, 40 deletions
diff --git a/dhcpv4/option_domain_name_server.go b/dhcpv4/option_domain_name_server.go
deleted file mode 100644
index a8a679f..0000000
--- a/dhcpv4/option_domain_name_server.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package dhcpv4
-
-import (
- "fmt"
- "net"
-)
-
-// This option implements the domain name server option
-// https://tools.ietf.org/html/rfc2132
-
-// OptDomainNameServer represents an option encapsulating the domain name
-// servers.
-type OptDomainNameServer struct {
- NameServers []net.IP
-}
-
-// ParseOptDomainNameServer returns a new OptDomainNameServer from a byte
-// stream, or error if any.
-func ParseOptDomainNameServer(data []byte) (*OptDomainNameServer, error) {
- ips, err := ParseIPs(data)
- if err != nil {
- return nil, err
- }
- return &OptDomainNameServer{NameServers: ips}, nil
-}
-
-// Code returns the option code.
-func (o *OptDomainNameServer) Code() OptionCode {
- return OptionDomainNameServer
-}
-
-// ToBytes returns a serialized stream of bytes for this option.
-func (o *OptDomainNameServer) ToBytes() []byte {
- return IPsToBytes(o.NameServers)
-}
-
-// String returns a human-readable string.
-func (o *OptDomainNameServer) String() string {
- return fmt.Sprintf("Domain Name Servers -> %s", IPsToString(o.NameServers))
-}