pub struct DnsHeader {
pub id: u16,
pub qr: bool,
pub opcode: u8,
pub aa: bool,
pub tc: bool,
pub rd: bool,
pub ra: bool,
pub rcode: DnsResponseCode,
pub qdcount: u16,
pub ancount: u16,
pub nscount: u16,
pub arcount: u16,
}Expand description
DNS message header (12 bytes)
Fields§
§id: u16Transaction ID
qr: boolQR: 0=query, 1=response
opcode: u8Opcode: 0=standard query
aa: boolAuthoritative answer
tc: boolMessage truncated
rd: boolRecursion desired
ra: boolRecursion available
rcode: DnsResponseCodeResponse code
qdcount: u16Question count
ancount: u16Answer count
nscount: u16Authority count
arcount: u16Additional count
Implementations§
Trait Implementations§
impl 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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)