Struct dns_parser::Packet
source · pub struct Packet<'a> {
pub header: Header,
pub questions: Vec<Question<'a>>,
pub answers: Vec<ResourceRecord<'a>>,
pub nameservers: Vec<ResourceRecord<'a>>,
pub additional: Vec<ResourceRecord<'a>>,
pub opt: Option<Record<'a>>,
}
Expand description
Parsed DNS packet
Fields§
§header: Header
§questions: Vec<Question<'a>>
§answers: Vec<ResourceRecord<'a>>
§nameservers: Vec<ResourceRecord<'a>>
§additional: Vec<ResourceRecord<'a>>
§opt: Option<Record<'a>>
Optional Pseudo-RR
When present it is sent as an RR in the additional section. In this RR
the class
and ttl
fields store max udp packet size and flags
respectively. To keep ResourceRecord
clean we store the OPT record
here.