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

#include <network_layer.h>

Inheritance diagram for Ipv6:
Inheritance graph
Collaboration diagram for Ipv6:
Collaboration graph

Public Member Functions

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

bool is_ext_hdr (int nxt)
 
extHeaderget_next_exthdr (extHeader *extheader)
 

Private Attributes

Ipv6Headeripv6_hdr
 
u_short ip_packet_size
 
int upper_proto
 
u_charupper_data
 
u_short data_length
 

Detailed Description

Ipv6 packet

Definition at line 133 of file network_layer.h.

Constructor & Destructor Documentation

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

Definition at line 86 of file network_layer.cpp.

References data_length, ip_packet_size, ipv6_hdr, upper_data, and upper_proto.

Ipv6::~Ipv6 ( )

Definition at line 94 of file network_layer.cpp.

Member Function Documentation

u_short Ipv6::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 152 of file network_layer.cpp.

References ip_packet_size.

std::string Ipv6::get_dst_address ( )

Definition at line 125 of file network_layer.cpp.

References Ipv6Header::daddr, ipv6_hdr, result, and TO_NTOHS.

Referenced by PcapHandler::packet_handler().

std::string Ipv6::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 205 of file network_layer.cpp.

extHeader * Ipv6::get_next_exthdr ( extHeader extheader)
private

If next header is an extension header return this header, else if next header is an Upper protom return NULL if next header is a upper protocol, set the upper_proto and upper_data and data_length to valid values

Definition at line 219 of file network_layer.cpp.

References data_length, extHeader::ext_len, is_ext_hdr(), extHeader::nxt_head, upper_data, and upper_proto.

Referenced by get_upper_data().

Ports Ipv6::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 262 of file network_layer.cpp.

References make_ports().

short Ipv6::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 233 of file network_layer.cpp.

References IPV6.

std::string Ipv6::get_src_address ( )

Definition at line 96 of file network_layer.cpp.

References ipv6_hdr, result, Ipv6Header::saddr, and TO_NTOHS.

Referenced by PcapHandler::packet_handler().

u_char * Ipv6::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 167 of file network_layer.cpp.

References data_length, EGP, get_next_exthdr(), ICMPv6, ipv6_hdr, is_ext_hdr(), NONEXT, Ipv6Header::nxt_head, TCP, UDP, upper_data, and upper_proto.

Referenced by get_upper_data_size(), and get_upper_proto().

u_short Ipv6::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 157 of file network_layer.cpp.

References data_length, get_upper_data(), ip_packet_size, and upper_data.

short Ipv6::get_upper_proto ( )
virtual

return protocol of transport layer

Implements Packet.

Definition at line 239 of file network_layer.cpp.

References get_upper_data(), upper_data, and upper_proto.

Referenced by get_upper_proto_name().

std::string Ipv6::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 257 of file network_layer.cpp.

References get_upper_proto(), and TRANS_PROTO_NAME.

bool Ipv6::is_ext_hdr ( int  nxt)
private

Definition at line 210 of file network_layer.cpp.

References AUTH, DESOP, ESPH, FRAG, HOPBHOP, MOBH, OPT, and ROUT.

Referenced by get_next_exthdr(), and get_upper_data().

Member Data Documentation

u_short Ipv6::data_length
private

Definition at line 140 of file network_layer.h.

Referenced by get_next_exthdr(), get_upper_data(), get_upper_data_size(), and Ipv6().

u_short Ipv6::ip_packet_size
private

Definition at line 137 of file network_layer.h.

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

Ipv6Header* Ipv6::ipv6_hdr
private

Definition at line 136 of file network_layer.h.

Referenced by get_dst_address(), get_src_address(), get_upper_data(), and Ipv6().

u_char* Ipv6::upper_data
private
int Ipv6::upper_proto
private

Definition at line 138 of file network_layer.h.

Referenced by get_next_exthdr(), get_upper_data(), get_upper_proto(), and Ipv6().


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