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

#include <transport_layer.h>

Inheritance diagram for TcpPacket:
Inheritance graph
Collaboration diagram for TcpPacket:
Collaboration graph

Public Member Functions

 TcpPacket (u_char *data, u_short data_size, TcpSettings *tcp_set)
 
 ~TcpPacket ()
 
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 ()
 
TcpReassemblyPtr get_tcp_reasembly ()
 
std::set< TcpFlagget_flag ()
 
- Public Member Functions inherited from Packet
virtual ~Packet ()
 

Static Public Member Functions

static void clean_static_data ()
 

Private Member Functions

void update_seq_map ()
 

Private Attributes

TcpHeadertcp_hdr
 
u_short packet_size
 
Ports ports
 
bpf_u_int32 relative_seq_num
 
bpf_u_int32 relative_ack_num
 
std::set< TcpFlagflags
 
bool segment
 
bool is_segment_ack
 
TcpReassemblyPtr tcp_reassembly
 
TcpSettingstcp_settings
 

Static Private Attributes

static std::map< Ports, SeqItemseq_map
 

Detailed Description

TCP packet

Definition at line 157 of file transport_layer.h.

Constructor & Destructor Documentation

TcpPacket::TcpPacket ( u_char data,
u_short  data_size,
TcpSettings tcp_set 
)
TcpPacket::~TcpPacket ( )

Definition at line 31 of file transport_layer.cpp.

Member Function Documentation

void TcpPacket::clean_static_data ( )
static

Definition at line 169 of file transport_layer.cpp.

References seq_map.

Referenced by PcapHandler::last_diagram_update().

u_short TcpPacket::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 136 of file transport_layer.cpp.

References packet_size.

std::set< TcpFlag > TcpPacket::get_flag ( )
std::string TcpPacket::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 141 of file transport_layer.cpp.

References ACK, flags, flagsNames, relative_ack_num, relative_seq_num, segment, TcpSettings::show_flags, TcpSettings::show_segments, TcpSettings::show_seqack, and tcp_settings.

Ports TcpPacket::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 119 of file transport_layer.cpp.

References ports.

short TcpPacket::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 104 of file transport_layer.cpp.

References TCP.

TcpReassemblyPtr TcpPacket::get_tcp_reasembly ( )

Definition at line 99 of file transport_layer.cpp.

References tcp_reassembly.

Referenced by get_aggregd_for_reass().

u_char * TcpPacket::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 124 of file transport_layer.cpp.

References TcpHeader::data_off, and tcp_hdr.

u_short TcpPacket::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 131 of file transport_layer.cpp.

References TcpHeader::data_off, packet_size, and tcp_hdr.

Referenced by update_seq_map().

short TcpPacket::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 109 of file transport_layer.cpp.

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

std::string TcpPacket::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 114 of file transport_layer.cpp.

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

void TcpPacket::update_seq_map ( )
private

Member Data Documentation

std::set<TcpFlag> TcpPacket::flags
private

Definition at line 165 of file transport_layer.h.

Referenced by get_message(), and update_seq_map().

bool TcpPacket::is_segment_ack
private

Definition at line 173 of file transport_layer.h.

Referenced by update_seq_map().

u_short TcpPacket::packet_size
private

Definition at line 160 of file transport_layer.h.

Referenced by get_data_size(), get_upper_data_size(), and TcpPacket().

Ports TcpPacket::ports
private
bpf_u_int32 TcpPacket::relative_ack_num
private

Definition at line 164 of file transport_layer.h.

Referenced by get_message(), and update_seq_map().

bpf_u_int32 TcpPacket::relative_seq_num
private

Definition at line 163 of file transport_layer.h.

Referenced by get_message(), and update_seq_map().

bool TcpPacket::segment
private

Definition at line 172 of file transport_layer.h.

Referenced by get_message(), and update_seq_map().

std::map< Ports, SeqItem > TcpPacket::seq_map
staticprivate

Definition at line 178 of file transport_layer.h.

Referenced by clean_static_data(), and update_seq_map().

TcpHeader* TcpPacket::tcp_hdr
private
TcpReassemblyPtr TcpPacket::tcp_reassembly
private

Definition at line 174 of file transport_layer.h.

Referenced by get_tcp_reasembly(), and update_seq_map().

TcpSettings* TcpPacket::tcp_settings
private

Definition at line 175 of file transport_layer.h.

Referenced by get_message(), and TcpPacket().


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