DNS packet. More...
#include <dns_packet.h>
Public Member Functions | |
Construction | |
DNSPacket () | |
DNSPacket (const DataBuffer &data) | |
Constructs a DNSPacket. More... | |
DNSPacket (int query_id, int opcode, bool recursion_desired, const std::string &question_name, int question_type, int question_class) | |
~DNSPacket () | |
Operations | |
void | set_data (const DataBuffer &data) |
Set data. More... | |
void | set_query_id (unsigned short query_id) |
Set query id. More... | |
Attributes | |
enum | Opcode { opcode_query = 0, opcode_inverse_query = 1, opcode_status = 2 } |
enum | ResponseCode { response_ok = 0, response_format_error = 1, response_server_failure = 2, response_name_error = 3, response_not_implemented = 4, response_refused = 5 } |
const DataBuffer & | get_data () const |
unsigned short | get_query_id () const |
bool | is_query () const |
Is Query. More... | |
bool | is_response () const |
Is Response. More... | |
int | get_opcode () const |
Get Opcode. More... | |
bool | is_authoriative_answer () const |
Is Authoriative answer. More... | |
bool | is_truncated () const |
Is Truncated. More... | |
bool | is_recursion_desired () const |
Is Recursion desired. More... | |
bool | is_recursion_available () const |
Is Recursion available. More... | |
int | get_response_code () const |
Get Response code. More... | |
int | get_question_count () const |
Get Question count. More... | |
int | get_answer_count () const |
Get Answer count. More... | |
int | get_nameserver_count () const |
Get Nameserver count. More... | |
int | get_additional_count () const |
Get Additional count. More... | |
std::string | get_question_name (int index) const |
Get question name. More... | |
int | get_question_type (int index) const |
Get question type. More... | |
int | get_question_class (int index) const |
Get question class. More... | |
DNSResourceRecord | get_answer (int index) const |
Get answer. More... | |
DNSResourceRecord | get_nameserver (int index) const |
Get nameserver. More... | |
DNSResourceRecord | get_additional (int index) const |
Get additional. More... | |
DNS packet.