From 4dd3effc1a37a912a388b371ba506e5d444adc53 Mon Sep 17 00:00:00 2001 From: ddidderr Date: Sun, 8 May 2022 19:37:05 +0200 Subject: [PATCH] (refactor) no support for rfc4035 as of now --- src/proto.rs | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/proto.rs b/src/proto.rs index 4f7e24d..9c2f26f 100644 --- a/src/proto.rs +++ b/src/proto.rs @@ -140,10 +140,10 @@ pub struct DNSHeader { pub recursion_desired: bool, /// denotes whether recursive query support is available in the name server pub recursion_available: bool, - /// TODO: add documuentation about this flag - pub authentic_data: bool, - /// TODO: add documuentation about this flag - pub checking_disabled: bool, + // no support of rfc4035 at the moment + //pub authentic_data: bool, + // no support of rfc4035 at the moment + //pub checking_disabled: bool, pub response_code: DNSRCode, /// TODO: add documuentation about this count pub query_count: u16, @@ -171,8 +171,9 @@ impl DNSHeader { const RD_MASK: u8 = 0b00000001; const RA_MASK: u8 = 0b10000000; - const AD_MASK: u8 = 0b00100000; - const CD_MASK: u8 = 0b00010000; + // no support of rfc4035 at the moment + //const AD_MASK: u8 = 0b00100000; + //const CD_MASK: u8 = 0b00010000; const RCODE_MASK: u8 = 0b00001111; const OPCODE_OFFSET: u8 = 3; @@ -192,8 +193,9 @@ impl DNSHeader { let recursion_desired = (datagram[2] & Self::RD_MASK) != 0; let recursion_available = (datagram[3] & Self::RA_MASK) != 0; - let authentic_data = (datagram[2] & Self::AD_MASK) != 0; - let checking_disabled = (datagram[2] & Self::CD_MASK) != 0; + // no support for rfc4035 at the moment + //let authentic_data = (datagram[2] & Self::AD_MASK) != 0; + //let checking_disabled = (datagram[2] & Self::CD_MASK) != 0; let response_code = DNSRCode::try_from(datagram[3] & Self::RCODE_MASK)?; let query_count = u16::from_be_bytes((datagram[4..6]).try_into().unwrap()); @@ -209,8 +211,8 @@ impl DNSHeader { truncated, recursion_desired, recursion_available, - authentic_data, - checking_disabled, + //authentic_data, // no support of rfc4035 at the moment + //checking_disabled, // no support of rfc4035 at the moment response_code, query_count, answer_count,