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
UdpPacket Class Reference

#include <transport_layer.h>

Inheritance diagram for UdpPacket:
Inheritance graph
Collaboration diagram for UdpPacket:
Collaboration graph

Public Member Functions

 UdpPacket (u_char *data, u_short data_size)
 
 ~UdpPacket ()
 
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

UdpHeaderudp_hdr
 
Ports ports
 
u_short packet_size
 

Detailed Description

UDP packet

Definition at line 201 of file transport_layer.h.

Constructor & Destructor Documentation

UdpPacket::UdpPacket ( u_char data,
u_short  data_size 
)
UdpPacket::~UdpPacket ( )

Definition at line 219 of file transport_layer.cpp.

Member Function Documentation

u_short UdpPacket::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 226 of file transport_layer.cpp.

References packet_size.

std::string UdpPacket::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 255 of file transport_layer.cpp.

Ports UdpPacket::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 221 of file transport_layer.cpp.

References ports.

short UdpPacket::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 241 of file transport_layer.cpp.

References UDP.

u_char * UdpPacket::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 231 of file transport_layer.cpp.

References udp_hdr.

u_short UdpPacket::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 236 of file transport_layer.cpp.

References UdpHeader::len, TO_NTOHS, and udp_hdr.

short UdpPacket::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 246 of file transport_layer.cpp.

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

std::string UdpPacket::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 251 of file transport_layer.cpp.

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

Member Data Documentation

u_short UdpPacket::packet_size
private

Definition at line 206 of file transport_layer.h.

Referenced by get_data_size(), and UdpPacket().

Ports UdpPacket::ports
private

Definition at line 205 of file transport_layer.h.

Referenced by get_ports(), get_upper_proto(), get_upper_proto_name(), and UdpPacket().

UdpHeader* UdpPacket::udp_hdr
private

Definition at line 204 of file transport_layer.h.

Referenced by get_upper_data(), get_upper_data_size(), and UdpPacket().


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

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