summaryrefslogtreecommitdiff
path: root/internal/dns/rr_ptr.go
diff options
context:
space:
mode:
authorradhitya <alif@radhitya.org>2026-07-04 14:29:02 +0700
committerradhitya <alif@radhitya.org>2026-07-04 14:29:02 +0700
commit52a0d3845ead07f840e9e99cb4a8c3507c84ab30 (patch)
treeb9a08117bdcb35a1a0e61543b0859db8f4aa6bfd /internal/dns/rr_ptr.go
parente9d3659ef41b9b5fd5e7cc7bd04ae3fc07850044 (diff)
fiuh
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() }