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

#include <network_layer.h>

Inheritance diagram for Ipv4:
Inheritance graph
Collaboration diagram for Ipv4:
Collaboration graph

Public Member Functions

 Ipv4 (const u_char *link_packet, u_short size)
 
 ~Ipv4 ()
 
std::string get_src_address ()
 
std::string get_dst_address ()
 
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

Ipv4Headeripv4_hdr
 
u_short ip_packet_size
 

Detailed Description

Ipv4 packet

Definition at line 109 of file network_layer.h.

Constructor & Destructor Documentation

Ipv4::Ipv4 ( const u_char link_packet,
u_short  size 
)

Definition at line 20 of file network_layer.cpp.

References ip_packet_size, and ipv4_hdr.

Ipv4::~Ipv4 ( )

Definition at line 26 of file network_layer.cpp.

Member Function Documentation

u_short Ipv4::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 42 of file network_layer.cpp.

References ip_packet_size.

std::string Ipv4::get_dst_address ( )
std::string Ipv4::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 74 of file network_layer.cpp.

Ports Ipv4::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 79 of file network_layer.cpp.

References make_ports().

short Ipv4::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 59 of file network_layer.cpp.

References IPV4.

std::string Ipv4::get_src_address ( )
u_char * Ipv4::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 47 of file network_layer.cpp.

References ipv4_hdr, and Ipv4Header::ver_ihl.

u_short Ipv4::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 53 of file network_layer.cpp.

References ipv4_hdr, Ipv4Header::tlen, TO_NTOHS, and Ipv4Header::ver_ihl.

short Ipv4::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 64 of file network_layer.cpp.

References ipv4_hdr, and Ipv4Header::proto.

Referenced by get_upper_proto_name().

std::string Ipv4::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 69 of file network_layer.cpp.

References get_upper_proto(), and TRANS_PROTO_NAME.

Member Data Documentation

u_short Ipv4::ip_packet_size
private

Definition at line 113 of file network_layer.h.

Referenced by get_data_size(), and Ipv4().

Ipv4Header* Ipv4::ipv4_hdr
private

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