diff options
-rw-r--r-- | dhcpv4/option_domain_search.go | 6 | ||||
-rw-r--r-- | dhcpv6/option_domainsearchlist.go | 6 | ||||
-rw-r--r-- | rfc1035label/label.go (renamed from dnscompress/label.go) | 2 | ||||
-rw-r--r-- | rfc1035label/label_test.go (renamed from dnscompress/label_test.go) | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/dhcpv4/option_domain_search.go b/dhcpv4/option_domain_search.go index 5ca17a8..daade0a 100644 --- a/dhcpv4/option_domain_search.go +++ b/dhcpv4/option_domain_search.go @@ -6,7 +6,7 @@ package dhcpv4 import ( "fmt" - "github.com/insomniacslk/dhcp/dnscompress" + "github.com/insomniacslk/dhcp/rfc1035label" ) // OptDomainSearch represents an option encapsulating a domain search list. @@ -22,7 +22,7 @@ func (op *OptDomainSearch) Code() OptionCode { // ToBytes returns a serialized stream of bytes for this option. func (op *OptDomainSearch) ToBytes() []byte { buf := []byte{byte(op.Code()), byte(op.Length())} - buf = append(buf, dnscompress.LabelsToBytes(op.DomainSearch)...) + buf = append(buf, rfc1035label.LabelsToBytes(op.DomainSearch)...) return buf } @@ -55,7 +55,7 @@ func ParseOptDomainSearch(data []byte) (*OptDomainSearch, error) { if len(data) < 2+length { return nil, ErrShortByteStream } - domainSearch, err := dnscompress.LabelsFromBytes(data[2:length+2]) + domainSearch, err := rfc1035label.LabelsFromBytes(data[2:length+2]) if err != nil { return nil, err } diff --git a/dhcpv6/option_domainsearchlist.go b/dhcpv6/option_domainsearchlist.go index cc56ee0..54e08bd 100644 --- a/dhcpv6/option_domainsearchlist.go +++ b/dhcpv6/option_domainsearchlist.go @@ -7,7 +7,7 @@ import ( "encoding/binary" "fmt" - "github.com/insomniacslk/dhcp/dnscompress" + "github.com/insomniacslk/dhcp/rfc1035label" ) // OptDomainSearchList list implements a DOMAIN_SEARCH_LIST option @@ -23,7 +23,7 @@ func (op *OptDomainSearchList) ToBytes() []byte { buf := make([]byte, 4) binary.BigEndian.PutUint16(buf[0:2], uint16(DOMAIN_SEARCH_LIST)) binary.BigEndian.PutUint16(buf[2:4], uint16(op.Length())) - buf = append(buf, dnscompress.LabelsToBytes(op.DomainSearchList)...) + buf = append(buf, rfc1035label.LabelsToBytes(op.DomainSearchList)...) return buf } @@ -44,7 +44,7 @@ func (op *OptDomainSearchList) String() string { func ParseOptDomainSearchList(data []byte) (*OptDomainSearchList, error) { opt := OptDomainSearchList{} var err error - opt.DomainSearchList, err = dnscompress.LabelsFromBytes(data) + opt.DomainSearchList, err = rfc1035label.LabelsFromBytes(data) if err != nil { return nil, err } diff --git a/dnscompress/label.go b/rfc1035label/label.go index 3d84708..c63b4af 100644 --- a/dnscompress/label.go +++ b/rfc1035label/label.go @@ -1,4 +1,4 @@ -package dnscompress +package rfc1035label import ( "fmt" diff --git a/dnscompress/label_test.go b/rfc1035label/label_test.go index af8e405..f91110b 100644 --- a/dnscompress/label_test.go +++ b/rfc1035label/label_test.go @@ -1,4 +1,4 @@ -package dnscompress +package rfc1035label import ( "bytes" |