Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Private Attributes | List of all members
DnsPacket Class Reference

#include <application_layer.h>

Inheritance diagram for DnsPacket:
Inheritance graph
Collaboration diagram for DnsPacket:
Collaboration graph

Public Member Functions

 DnsPacket (u_char *data, u_short data_len, Ports ports)
 
 ~DnsPacket ()
 
u_short get_data_size ()
 
u_charget_upper_data ()
 
u_short get_upper_data_size ()
 
short get_proto ()
 
short get_upper_proto ()
 
std::string get_upper_proto_name ()
 
std::string get_message ()
 
Ports get_ports ()
 
- Public Member Functions inherited from Packet
virtual ~Packet ()
 

Private Attributes

DnsHeaderdns_hdr
 
u_chardns_data
 
u_short dns_data_len
 
bool query
 
Ports ports
 

Detailed Description

DNS packet

Definition at line 59 of file application_layer.h.

Constructor & Destructor Documentation

DnsPacket::DnsPacket ( u_char data,
u_short  data_len,
Ports  ports 
)

Definition at line 20 of file application_layer.cpp.

References dns_data, dns_data_len, dns_hdr, and ports.

DnsPacket::~DnsPacket ( )

Definition at line 28 of file application_layer.cpp.

Member Function Documentation

u_short DnsPacket::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 58 of file application_layer.cpp.

References dns_data_len.

std::string DnsPacket::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 30 of file application_layer.cpp.

References dns_data, dns_hdr, and QUERY.

Ports DnsPacket::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 88 of file application_layer.cpp.

References ports.

short DnsPacket::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 63 of file application_layer.cpp.

References Ports::dst, ports, and Ports::src.

u_char * DnsPacket::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 78 of file application_layer.cpp.

u_short DnsPacket::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 83 of file application_layer.cpp.

short DnsPacket::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 68 of file application_layer.cpp.

std::string DnsPacket::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 73 of file application_layer.cpp.

Member Data Documentation

u_char* DnsPacket::dns_data
private

Definition at line 63 of file application_layer.h.

Referenced by DnsPacket(), and get_message().

u_short DnsPacket::dns_data_len
private

Definition at line 64 of file application_layer.h.

Referenced by DnsPacket(), and get_data_size().

DnsHeader* DnsPacket::dns_hdr
private

Definition at line 62 of file application_layer.h.

Referenced by DnsPacket(), and get_message().

Ports DnsPacket::ports
private

Definition at line 66 of file application_layer.h.

Referenced by DnsPacket(), get_ports(), and get_proto().

bool DnsPacket::query
private

Definition at line 65 of file application_layer.h.


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

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen