IT++ Logo Newcom Logo

itpp::TCP_Packet Class Reference

#include <itpp/protocol/tcp.h>

Inheritance diagram for itpp::TCP_Packet:

itpp::Packet List of all members.

Public Member Functions

 TCP_Packet ()
 TCP_Packet (const TCP_Packet &packet)
virtual ~TCP_Packet ()
virtual TCP_Packetclone () const
void set_segment (const TCP_Segment &seg)
TCP_Segment get_segment () const
void set_wnd (unsigned val)
unsigned get_wnd () const
void set_ACK (Sequence_Number val)
Sequence_Number get_ACK () const
void set_session_id (int val)
int get_session_id () const
void set_destination_port (unsigned val)
unsigned get_destination_port () const
void set_source_port (unsigned val)
unsigned get_source_port () const
void set_info (unsigned ssThresh, unsigned recWnd, unsigned cWnd, double estRTT, Sequence_Number sndUna, Sequence_Number sndNxt, bool isRtx)
virtual void print_header (std::ostream &out) const
void set_bit_size (int packet_size)
 set size of packet in bits
int bit_size ()
 get size of packet in bits

Protected Attributes

unsigned fDestinationPort
unsigned fSourcePort
TCP_Segment fSegment
 data segment to be transmitted
Sequence_Number fACK
 acknowledgment (next expected sn)
unsigned fWnd
 window size (advertised by receiver)
int fSessionId
 session identifier
TDebugInfofInfo

Friends

std::ostream & operator<< (std::ostream &, TCP_Packet &)

Classes

struct  TDebugInfo

Detailed Description

TCP_Packet is an IP packet with additional TCP header fields. Messages of this type are used for communication between TCP sender and receiver (data and ACKs).

The class contains a segment of type TCP_Segment with sequence numbers for begin and end of the segment. This is only used in data packets (i.e. from sender to receiver) while there are also fields containing sequence number for the next expected segment (used to ACK data packets, i.e. from receiver to sender) and for the advertised receiver window.

TCP_Packet has an additional field for the session id which my be compared with the pair (source port, destination port) in a real world TCP/IP packet.

Furthermore, some debug info containing state information for TCP sender or receiver may be attached to the message.

See also:
TCP_Segment

TCP_Packet::TDebugInfo

Author:
Grevent

Lorang

Bodamer

Definition at line 167 of file tcp.h.


Member Function Documentation

void itpp::Packet::set_bit_size ( int  packet_size  )  [inline, inherited]

set size of packet in bits

Definition at line 52 of file packet.h.

References it_assert.

Referenced by itpp::Packet::Packet().

int itpp::Packet::bit_size (  )  [inline, inherited]

get size of packet in bits

Definition at line 55 of file packet.h.

Referenced by itpp::Front_Drop_Queue::pop(), itpp::Front_Drop_Queue::push(), and itpp::TCP_Server_Application::write_to_net().


Member Data Documentation

TCP_Segment itpp::TCP_Packet::fSegment [protected]

data segment to be transmitted

Definition at line 198 of file tcp.h.

Referenced by get_segment(), and set_segment().

Sequence_Number itpp::TCP_Packet::fACK [protected]

acknowledgment (next expected sn)

Definition at line 199 of file tcp.h.

Referenced by get_ACK(), and set_ACK().

unsigned itpp::TCP_Packet::fWnd [protected]

window size (advertised by receiver)

Definition at line 200 of file tcp.h.

Referenced by get_wnd(), and set_wnd().

int itpp::TCP_Packet::fSessionId [protected]

session identifier

Definition at line 201 of file tcp.h.

Referenced by get_session_id(), and set_session_id().


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

Generated on Fri Jun 8 00:27:29 2007 for IT++ by Doxygen 1.5.2