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

#include <transport_layer.h>

Inheritance diagram for IcmpPacket:
Inheritance graph
Collaboration diagram for IcmpPacket:
Collaboration graph

Public Member Functions

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

u_short get_type ()
 
u_short get_code ()
 

Private Attributes

IcmpHeadericmp_hdr
 
u_short packet_size
 

Detailed Description

ICMP packet

Definition at line 224 of file transport_layer.h.

Constructor & Destructor Documentation

IcmpPacket::IcmpPacket ( u_char data,
u_short  data_size 
)

Definition at line 261 of file transport_layer.cpp.

References icmp_hdr, and packet_size.

IcmpPacket::~IcmpPacket ( )

Definition at line 267 of file transport_layer.cpp.

Member Function Documentation

u_short IcmpPacket::get_code ( )
private

Definition at line 274 of file transport_layer.cpp.

References IcmpHeader::code, and icmp_hdr.

Referenced by get_message().

u_short IcmpPacket::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 288 of file transport_layer.cpp.

References packet_size.

std::string IcmpPacket::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 279 of file transport_layer.cpp.

References get_code(), and get_type().

Ports IcmpPacket::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 318 of file transport_layer.cpp.

References make_ports().

short IcmpPacket::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 303 of file transport_layer.cpp.

References ICMP.

u_short IcmpPacket::get_type ( )
private

Definition at line 269 of file transport_layer.cpp.

References icmp_hdr, and IcmpHeader::type.

Referenced by get_message().

u_char * IcmpPacket::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 293 of file transport_layer.cpp.

u_short IcmpPacket::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 298 of file transport_layer.cpp.

short IcmpPacket::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 308 of file transport_layer.cpp.

std::string IcmpPacket::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 313 of file transport_layer.cpp.

Member Data Documentation

IcmpHeader* IcmpPacket::icmp_hdr
private

Definition at line 227 of file transport_layer.h.

Referenced by get_code(), get_type(), and IcmpPacket().

u_short IcmpPacket::packet_size
private

Definition at line 228 of file transport_layer.h.

Referenced by get_data_size(), and IcmpPacket().


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