summaryrefslogtreecommitdiff
path: root/internal/dns/rr_ns.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/dns/rr_ns.go')
-rw-r--r--internal/dns/rr_ns.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/dns/rr_ns.go b/internal/dns/rr_ns.go
new file mode 100644
index 0000000..aa21619
--- /dev/null
+++ b/internal/dns/rr_ns.go
@@ -0,0 +1,14 @@
+package dns
+
+type NS struct {
+ Ns Name
+}
+
+func (ns *NS) Type() uint16 { return TypeNS }
+func (ns *NS) Pack(p *packer) error { return p.writeName(ns.Ns) }
+func (ns *NS) Unpack(u *unpacker, length uint16) error {
+ var err error
+ ns.Ns, err = u.readName()
+ return err
+}
+func (ns *NS) String() string { return ns.Ns.String() }