Myra Canyon  v0.0.1-768
network control
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Myra::Traffic::Name_Resolution Namespace Reference

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 Headerget_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...
 

Detailed Description

Detect and examine DNS packets.

Enumeration Type Documentation

See also
RFC1035
RFC6895
Enumerator
NoError 

"no error"

FormatError 
ServerFailure 
NameError 

"name not found"

NotImplemented 
Refused 

Function Documentation

const Header* Myra::Traffic::Name_Resolution::get_header ( const uint8_t *  ptr)
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.

Here is the call graph for this function:

Here is the caller graph for this function:

void Myra::Traffic::Name_Resolution::get_names ( const Header *  header,
Myra::HostLookupMap m 
)

Extract both names and addresses from a DNS reply.

Here is the call graph for this function:

ResponseCode Myra::Traffic::Name_Resolution::get_response_code ( const Header *  header)
inline
See also
response_code()

Here is the call graph for this function:

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_AA_flag ( const Header *  header)
inline

authoritative answer

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_QR_flag ( const Header *  header)
inline

true indicates a response, and false indicates a query

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_query ( const Header *  header)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_R1_flag ( const Header *  header)
inline

reserved flag

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_R2_flag ( const Header *  header)
inline

reserved flag

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_R3_flag ( const Header *  header)
inline

reserved flag

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_RA_flag ( const Header *  header)
inline

recursion available

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_RD_flag ( const Header *  header)
inline

recursion desired

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_response ( const Header *  header)
inline

Here is the call graph for this function:

Here is the caller graph for this function:

bool Myra::Traffic::Name_Resolution::is_TC_flag ( const Header *  header)
inline

truncated message

Here is the caller graph for this function:

uint16_t Myra::Traffic::Name_Resolution::number_of_answers ( const Header *  header)
inline

number of answers in a DNS reply

Here is the caller graph for this function:

uint16_t Myra::Traffic::Name_Resolution::number_of_questions ( const Header *  header)
inline

number of questions in a DNS query

Here is the caller graph for this function:

int Myra::Traffic::Name_Resolution::opcode ( const Header *  header)
inline

Here is the caller graph for this function:

int Myra::Traffic::Name_Resolution::response_code ( const Header *  header)
inline

response code

See also
get_response_code()

Here is the caller graph for this function: