pub struct DnsPacket {
pub id: u16,
pub is_query: bool,
pub domain: String,
pub query_type: DnsQueryType,
pub raw: Vec<u8>,
}Expand description
A parsed DNS packet (header + first question only).
Fields§
§id: u16Transaction ID.
is_query: boolTrue if this is a query (QR bit = 0), false if response.
domain: StringQuery domain name (e.g. “example.com”).
query_type: DnsQueryTypeQuery type.
raw: Vec<u8>Raw packet bytes.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DnsPacket
impl RefUnwindSafe for DnsPacket
impl Send for DnsPacket
impl Sync for DnsPacket
impl Unpin for DnsPacket
impl UnsafeUnpin for DnsPacket
impl UnwindSafe for DnsPacket
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