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

#include <network_layer.h>

Inheritance diagram for ArpPacket:
Inheritance graph
Collaboration diagram for ArpPacket:
Collaboration graph

Public Member Functions

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

std::string get_sender_prot_adr ()
 
std::string get_target_prot_adr ()
 
std::string get_sender_hard_adr ()
 
std::string get_target_hard_adr ()
 

Private Attributes

ArpHeaderarp_hdr
 
u_short data_size
 
u_short host_len
 
u_short proto_len
 
bool arp
 
u_short op_code
 

Detailed Description

ARP packet

Definition at line 166 of file network_layer.h.

Constructor & Destructor Documentation

ArpPacket::ArpPacket ( const u_char data,
u_short  data_size 
)
ArpPacket::~ArpPacket ( )

Definition at line 278 of file network_layer.cpp.

Member Function Documentation

u_short ArpPacket::get_data_size ( )
virtual

Return size of packet in Bytes

Implements Packet.

Definition at line 357 of file network_layer.cpp.

References data_size.

std::string ArpPacket::get_dst_address ( )

Definition at line 300 of file network_layer.cpp.

References arp, get_target_hard_adr(), and get_target_prot_adr().

std::string ArpPacket::get_message ( )
virtual

Return protocol specific message to include in label

Implements Packet.

Definition at line 315 of file network_layer.cpp.

References arp, get_sender_hard_adr(), get_sender_prot_adr(), get_target_hard_adr(), get_target_prot_adr(), op_code, REP, REPR, REQ, REQR, and result.

Ports ArpPacket::get_ports ( )
virtual

Return ports, make_ports(0,0) otherwise

Implements Packet.

Definition at line 382 of file network_layer.cpp.

References make_ports().

u_short ArpPacket::get_prot_type ( )

Definition at line 280 of file network_layer.cpp.

References arp_hdr, ArpHeader::prot_type, and TO_NTOHS.

short ArpPacket::get_proto ( )
virtual

Return protocol numer

Implements Packet.

Definition at line 352 of file network_layer.cpp.

References ARP.

std::string ArpPacket::get_sender_hard_adr ( )
private

Definition at line 285 of file network_layer.cpp.

References arp_hdr, get_host(), host_len, and ArpHeader::sender_hard_adr.

Referenced by get_message(), and get_src_address().

std::string ArpPacket::get_sender_prot_adr ( )
private

Definition at line 290 of file network_layer.cpp.

References arp_hdr, get_proto_address(), proto_len, and ArpHeader::sender_prot_adr.

Referenced by get_message(), and get_src_address().

std::string ArpPacket::get_src_address ( )

Definition at line 295 of file network_layer.cpp.

References arp, get_sender_hard_adr(), and get_sender_prot_adr().

std::string ArpPacket::get_target_hard_adr ( )
private

Definition at line 305 of file network_layer.cpp.

References arp_hdr, get_host(), host_len, and ArpHeader::target_hard_adr.

Referenced by get_dst_address(), and get_message().

std::string ArpPacket::get_target_prot_adr ( )
private

Definition at line 310 of file network_layer.cpp.

References arp_hdr, get_proto_address(), proto_len, and ArpHeader::target_prot_adr.

Referenced by get_dst_address(), and get_message().

u_char * ArpPacket::get_upper_data ( )
virtual

Return pointer to encapsulated protocol, NULL otherwise

Implements Packet.

Definition at line 362 of file network_layer.cpp.

u_short ArpPacket::get_upper_data_size ( )
virtual

Return size of encapsulated data in Bytes, 0 otherwise

Implements Packet.

Definition at line 367 of file network_layer.cpp.

short ArpPacket::get_upper_proto ( )
virtual

Return number-id of encapsulated protocol,-1 otherwise

Implements Packet.

Definition at line 372 of file network_layer.cpp.

std::string ArpPacket::get_upper_proto_name ( )
virtual

Return name of encapsulated protocol, empty string otherwise

Implements Packet.

Definition at line 377 of file network_layer.cpp.

Member Data Documentation

bool ArpPacket::arp
private

Definition at line 173 of file network_layer.h.

Referenced by ArpPacket(), get_dst_address(), get_message(), and get_src_address().

ArpHeader* ArpPacket::arp_hdr
private
u_short ArpPacket::data_size
private

Definition at line 170 of file network_layer.h.

Referenced by ArpPacket(), and get_data_size().

u_short ArpPacket::host_len
private

Definition at line 171 of file network_layer.h.

Referenced by ArpPacket(), get_sender_hard_adr(), and get_target_hard_adr().

u_short ArpPacket::op_code
private

Definition at line 174 of file network_layer.h.

Referenced by ArpPacket(), and get_message().

u_short ArpPacket::proto_len
private

Definition at line 172 of file network_layer.h.

Referenced by ArpPacket(), get_sender_prot_adr(), and get_target_prot_adr().


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

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