pub struct DnsQueryView {
pub txn_id: u16,
pub flags: u16,
pub qname: String,
pub qtype: u16,
pub qclass: u16,
}Expand description
Minimal view of a parsed single-question DNS query.
The proxy uses Self::txn_id + Self::flags to construct deny / SERVFAIL
responses without re-parsing the question section. Self::qname is
already lowercased and trailing-dot-stripped so allowlist comparison is a
straight eq_ignore_ascii_case (or wildcard suffix match).
Fields§
§txn_id: u1616-bit DNS transaction id from the message header. Echoed back to the workload in any response the proxy emits.
flags: u16Raw flags word from the header. The proxy uses this to derive the response flags (set QR=1, copy RD, set RA=0, write the new RCODE).
qname: StringLowercased, trailing-dot-stripped query name.
qtype: u16Raw 16-bit qtype field. Map via
cellos_core::qtype_to_dns_query_type before allowlist evaluation.
qclass: u16Raw 16-bit qclass field. The parser only ever surfaces IN (1) here —
other classes return DnsParseError::UnsupportedClass before this
view is built.
Trait Implementations§
Source§impl Clone for DnsQueryView
impl Clone for DnsQueryView
Source§fn clone(&self) -> DnsQueryView
fn clone(&self) -> DnsQueryView
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DnsQueryView
impl Debug for DnsQueryView
Source§impl PartialEq for DnsQueryView
impl PartialEq for DnsQueryView
Source§fn eq(&self, other: &DnsQueryView) -> bool
fn eq(&self, other: &DnsQueryView) -> bool
self and other values to be equal, and is used by ==.impl Eq for DnsQueryView
impl StructuralPartialEq for DnsQueryView
Auto Trait Implementations§
impl Freeze for DnsQueryView
impl RefUnwindSafe for DnsQueryView
impl Send for DnsQueryView
impl Sync for DnsQueryView
impl Unpin for DnsQueryView
impl UnsafeUnpin for DnsQueryView
impl UnwindSafe for DnsQueryView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more