summaryrefslogtreecommitdiff
path: root/internal/dns/header.go
diff options
context:
space:
mode:
authorradhitya <alif@radhitya.org>2026-07-05 14:05:24 +0700
committerradhitya <alif@radhitya.org>2026-07-05 14:05:24 +0700
commit1799ef47cedcfed8c979e145783fff7c9d1944cc (patch)
tree4634846c9035339d03f783543ac83056686a9f5b /internal/dns/header.go
parent52a0d3845ead07f840e9e99cb4a8c3507c84ab30 (diff)
foreward upstream, in memory cache, udp listener, handler, cli flags
Diffstat (limited to 'internal/dns/header.go')
-rw-r--r--internal/dns/header.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/dns/header.go b/internal/dns/header.go
index 3b51f67..0f462a8 100644
--- a/internal/dns/header.go
+++ b/internal/dns/header.go
@@ -47,7 +47,7 @@ func (h *Header) SetZ(v uint8) { h.Flags = (h.Flags &^ (0x7 << 4)) | ((uint1
func (h *Header) SetAD(v bool) { h.set(0x0020, v) }
func (h *Header) SetCD(v bool) { h.set(0x0010, v) }
func (h *Header) SetRCode(v uint8) { h.Flags = (h.Flags &^ 0xF) | (uint16(v) & 0xF) }
-
+func (h *Header) Rcode() uint8 { return uint8(h.Flags & 0xF) }
func (h *Header) set(mask uint16, v bool) {
if v {
h.Flags |= mask