Detect and examine DNS packets. More...
Classes | |
struct | Header |
This is only the first part of the DNS packet. More... | |
struct | ResourceRecord |
RFC 1035 section 4.1.3. More... | |
Enumerations | |
enum | ResponseCode { ResponseCode::NoError = 0, ResponseCode::FormatError = 1, ResponseCode::ServerFailure = 2, ResponseCode::NameError = 3, ResponseCode::NotImplemented = 4, ResponseCode::Refused = 5 } |
Functions | |
const Header * | get_header (const uint8_t *ptr) |
get the DNS header More... | |
uint16_t | number_of_questions (const Header *header) |
number of questions in a DNS query More... | |
uint16_t | number_of_answers (const Header *header) |
number of answers in a DNS reply More... | |
bool | is_QR_flag (const Header *header) |
true indicates a response, and false indicates a query More... | |
int | opcode (const Header *header) |
bool | is_AA_flag (const Header *header) |
authoritative answer More... | |
bool | is_TC_flag (const Header *header) |
truncated message More... | |
bool | is_RD_flag (const Header *header) |
recursion desired More... | |
bool | is_RA_flag (const Header *header) |
recursion available More... | |
bool | is_R3_flag (const Header *header) |
reserved flag More... | |
bool | is_R2_flag (const Header *header) |
reserved flag More... | |
bool | is_R1_flag (const Header *header) |
reserved flag More... | |
int | response_code (const Header *header) |
response code More... | |
bool | is_query (const Header *header) |
bool | is_response (const Header *header) |
ResponseCode | get_response_code (const Header *header) |
VStr | get_names (const Header *header) |
Extract all of the names from the DNS header. More... | |
void | get_names (const Header *header, Myra::HostLookupMap &m) |
Extract both names and addresses from a DNS reply. More... | |
Detect and examine DNS packets.
|
strong |
|
inline |
get the DNS header
Myra::VStr Myra::Traffic::Name_Resolution::get_names | ( | const Header * | header | ) |
Extract all of the names from the DNS header.
void Myra::Traffic::Name_Resolution::get_names | ( | const Header * | header, |
Myra::HostLookupMap & | m | ||
) |
Extract both names and addresses from a DNS reply.
|
inline |
|
inline |
authoritative answer
|
inline |
true
indicates a response, and false
indicates a query
|
inline |
|
inline |
reserved flag
|
inline |
reserved flag
|
inline |
reserved flag
|
inline |
recursion available
|
inline |
recursion desired
|
inline |
|
inline |
truncated message
|
inline |
number of answers in a DNS reply
|
inline |
number of questions in a DNS query
|
inline |
|
inline |