CL_DNSPacket Class Reference
[clanNetwork Socket]

DNS packet. More...

#include <dns_packet.h>

List of all members.

Public Member Functions

Construction

 CL_DNSPacket ()
 CL_DNSPacket (const CL_DataBuffer &data)
 Constructs a DNSPacket.
 CL_DNSPacket (int query_id, int opcode, bool recursion_desired, const CL_String &question_name, int question_type, int question_class)
 ~CL_DNSPacket ()
Operations

void set_data (const CL_DataBuffer &data)
 Set data.
void set_query_id (unsigned short query_id)
 Set query id.

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 CL_DataBufferget_data () const
unsigned short get_query_id () const
bool is_query () const
 Is Query.
bool is_response () const
 Is Response.
int get_opcode () const
 Get Opcode.
bool is_authoriative_answer () const
 Is Authoriative answer.
bool is_truncated () const
 Is Truncated.
bool is_recursion_desired () const
 Is Recursion desired.
bool is_recursion_available () const
 Is Recursion available.
int get_response_code () const
 Get Response code.
int get_question_count () const
 Get Question count.
int get_answer_count () const
 Get Answer count.
int get_nameserver_count () const
 Get Nameserver count.
int get_additional_count () const
 Get Additional count.
CL_String get_question_name (int index) const
 Get question name.
int get_question_type (int index) const
 Get question type.
int get_question_class (int index) const
 Get question class.
CL_DNSResourceRecord get_answer (int index) const
 Get answer.
CL_DNSResourceRecord get_nameserver (int index) const
 Get nameserver.
CL_DNSResourceRecord get_additional (int index) const
 Get additional.

Detailed Description

DNS packet.


Member Enumeration Documentation

Enumerator:
opcode_query 
opcode_inverse_query 
opcode_status 
Enumerator:
response_ok 
response_format_error 
response_server_failure 
response_name_error 
response_not_implemented 
response_refused 

Constructor & Destructor Documentation

CL_DNSPacket::CL_DNSPacket (  ) 
CL_DNSPacket::CL_DNSPacket ( const CL_DataBuffer data  ) 

Constructs a DNSPacket.

Parameters:
data = Data Buffer
CL_DNSPacket::CL_DNSPacket ( int  query_id,
int  opcode,
bool  recursion_desired,
const CL_String question_name,
int  question_type,
int  question_class 
)
CL_DNSPacket::~CL_DNSPacket (  ) 

Member Function Documentation

CL_DNSResourceRecord CL_DNSPacket::get_additional ( int  index  )  const

Get additional.

Parameters:
index = value
Returns:
DNSResource Record
int CL_DNSPacket::get_additional_count (  )  const

Get Additional count.

Returns:
additional_count
CL_DNSResourceRecord CL_DNSPacket::get_answer ( int  index  )  const

Get answer.

Parameters:
index = value
Returns:
DNSResource Record
int CL_DNSPacket::get_answer_count (  )  const

Get Answer count.

Returns:
answer_count
const CL_DataBuffer& CL_DNSPacket::get_data (  )  const
CL_DNSResourceRecord CL_DNSPacket::get_nameserver ( int  index  )  const

Get nameserver.

Parameters:
index = value
Returns:
DNSResource Record
int CL_DNSPacket::get_nameserver_count (  )  const

Get Nameserver count.

Returns:
nameserver_count
int CL_DNSPacket::get_opcode (  )  const

Get Opcode.

Returns:
opcode
unsigned short CL_DNSPacket::get_query_id (  )  const
int CL_DNSPacket::get_question_class ( int  index  )  const

Get question class.

Parameters:
index = value
Returns:
int
int CL_DNSPacket::get_question_count (  )  const

Get Question count.

Returns:
question_count
CL_String CL_DNSPacket::get_question_name ( int  index  )  const

Get question name.

Parameters:
index = value
Returns:
String
int CL_DNSPacket::get_question_type ( int  index  )  const

Get question type.

Parameters:
index = value
Returns:
int
int CL_DNSPacket::get_response_code (  )  const

Get Response code.

Returns:
response_code
bool CL_DNSPacket::is_authoriative_answer (  )  const

Is Authoriative answer.

Returns:
true = authoriative_answer
bool CL_DNSPacket::is_query (  )  const

Is Query.

Returns:
true = query
bool CL_DNSPacket::is_recursion_available (  )  const

Is Recursion available.

Returns:
true = recursion_available
bool CL_DNSPacket::is_recursion_desired (  )  const

Is Recursion desired.

Returns:
true = recursion_desired
bool CL_DNSPacket::is_response (  )  const

Is Response.

Returns:
true = response
bool CL_DNSPacket::is_truncated (  )  const

Is Truncated.

Returns:
true = truncated
void CL_DNSPacket::set_data ( const CL_DataBuffer data  ) 

Set data.

Parameters:
data = Data Buffer
void CL_DNSPacket::set_query_id ( unsigned short  query_id  ) 

Set query id.

Parameters:
query_id = short

The documentation for this class was generated from the following file: