pub struct DNSHeader {Show 13 fields
pub id: u16,
pub direction: Direction,
pub opcode: Opcode,
pub authoritative: bool,
pub truncation: bool,
pub recursion_desired: bool,
pub recursion_available: bool,
pub valid_zeroes: bool,
pub response: ResponseCode,
pub question_count: u16,
pub answer_record_count: u16,
pub authority_record_count: u16,
pub additional_record_count: u16,
}
Expand description
Represents a header including flag fields and record counts
Fields§
§id: u16
Random ID for associating responses with requests
direction: Direction
Is the message a request or the associated response
opcode: Opcode
What is the message function, e.g query, reverse DNS query
truncation: bool
§recursion_desired: bool
§recursion_available: bool
§valid_zeroes: bool
§response: ResponseCode
Status of the request or response
question_count: u16
Number of questions being made, should be the same in both the request and response
answer_record_count: u16
§additional_record_count: u16
Implementations§
Trait Implementations§
source§impl Ord for DNSHeader
impl Ord for DNSHeader
source§impl PartialEq for DNSHeader
impl PartialEq for DNSHeader
source§impl PartialOrd for DNSHeader
impl PartialOrd for DNSHeader
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for DNSHeader
impl StructuralPartialEq for DNSHeader
Auto Trait Implementations§
impl Freeze for DNSHeader
impl RefUnwindSafe for DNSHeader
impl Send for DNSHeader
impl Sync for DNSHeader
impl Unpin for DNSHeader
impl UnwindSafe for DNSHeader
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
Mutably borrows from an owned value. Read more