Anope IRC Services  Version 2.0
Public Member Functions | Data Fields | Static Public Attributes | Private Member Functions
Packet Class Reference
Inheritance diagram for Packet:
Inheritance graph
[legend]
Collaboration diagram for Packet:
Collaboration graph
[legend]

Public Member Functions

 Packet (Manager *m, sockaddrs *a)
 
void Fill (const unsigned char *input, const unsigned short len)
 
unsigned short Pack (unsigned char *output, unsigned short output_size)
 
- Public Member Functions inherited from DNS::Query
 Query ()
 
 Query (const Question &q)
 

Data Fields

Managermanager
 
sockaddrs addr
 
unsigned short id
 
unsigned short flags
 
- Data Fields inherited from DNS::Query
std::vector< Questionquestions
 
std::vector< ResourceRecordanswers
 
std::vector< ResourceRecordauthorities
 
std::vector< ResourceRecordadditional
 
Error error
 

Static Public Attributes

static const int POINTER = 0xC0
 
static const int LABEL = 0x3F
 
static const int HEADER_LENGTH = 12
 

Private Member Functions

void PackName (unsigned char *output, unsigned short output_size, unsigned short &pos, const Anope::string &name)
 
Anope::string UnpackName (const unsigned char *input, unsigned short input_size, unsigned short &pos)
 
Question UnpackQuestion (const unsigned char *input, unsigned short input_size, unsigned short &pos)
 
ResourceRecord UnpackResourceRecord (const unsigned char *input, unsigned short input_size, unsigned short &pos)
 

Detailed Description

A full packet sent or recieved to/from the nameserver

Definition at line 27 of file m_dns.cpp.

Constructor & Destructor Documentation

Packet::Packet ( Manager m,
sockaddrs a 
)
inline

Definition at line 206 of file m_dns.cpp.

Member Function Documentation

void Packet::Fill ( const unsigned char *  input,
const unsigned short  len 
)
inline

Definition at line 212 of file m_dns.cpp.

References LOG_DEBUG_2.

Referenced by MyManager::HandlePacket().

unsigned short Packet::Pack ( unsigned char *  output,
unsigned short  output_size 
)
inline
void Packet::PackName ( unsigned char *  output,
unsigned short  output_size,
unsigned short &  pos,
const Anope::string name 
)
inlineprivate
Anope::string Packet::UnpackName ( const unsigned char *  input,
unsigned short  input_size,
unsigned short &  pos 
)
inlineprivate

Definition at line 49 of file m_dns.cpp.

References Anope::string::empty(), LOG_DEBUG_2, and name.

Question Packet::UnpackQuestion ( const unsigned char *  input,
unsigned short  input_size,
unsigned short &  pos 
)
inlineprivate

Definition at line 110 of file m_dns.cpp.

References DNS::Question::name, DNS::Question::qclass, and DNS::Question::type.

ResourceRecord Packet::UnpackResourceRecord ( const unsigned char *  input,
unsigned short  input_size,
unsigned short &  pos 
)
inlineprivate

Field Documentation

sockaddrs Packet::addr

Definition at line 200 of file m_dns.cpp.

Referenced by UDPSocket::ProcessWrite(), and NotifySocket::ProcessWrite().

unsigned short Packet::flags

Definition at line 204 of file m_dns.cpp.

Referenced by MyManager::HandlePacket(), MyManager::Notify(), and MyManager::Process().

const int Packet::HEADER_LENGTH = 12
static

Definition at line 196 of file m_dns.cpp.

Referenced by MyManager::HandlePacket().

unsigned short Packet::id

Definition at line 202 of file m_dns.cpp.

Referenced by MyManager::HandlePacket(), MyManager::Notify(), and MyManager::Process().

const int Packet::LABEL = 0x3F
static

Definition at line 195 of file m_dns.cpp.

Manager* Packet::manager

Definition at line 198 of file m_dns.cpp.

const int Packet::POINTER = 0xC0
static

Definition at line 194 of file m_dns.cpp.


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