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