Public Member Functions | Public Attributes

TCPStateVariables Class Reference

#include <TCPConnection.h>

Inheritance diagram for TCPStateVariables:
DumbTCPStateVariables TCPBaseAlgStateVariables TCPTahoeRenoFamilyStateVariables

List of all members.

Public Member Functions

 TCPStateVariables ()
virtual std::string info () const
virtual std::string detailedInfo () const

Public Attributes

bool active
bool fork
uint32 snd_mss
uint32 snd_una
uint32 snd_nxt
uint32 snd_max
uint32 snd_wnd
uint32 snd_up
uint32 snd_wl1
uint32 snd_wl2
uint32 iss
uint32 rcv_nxt
uint32 rcv_wnd
uint32 rcv_up
uint32 irs
uint32 rcv_adv
int syn_rexmit_count
simtime_t syn_rexmit_timeout
bool fin_ack_rcvd
bool send_fin
uint32 snd_fin_seq
bool fin_rcvd
uint32 rcv_fin_seq
uint32 sentBytes
bool nagle_enabled
bool delayed_acks_enabled
bool limited_transmit_enabled
bool increased_IW_enabled
uint32 full_sized_segment_counter
bool ack_now
bool afterRto
bool ws_support
bool ws_enabled
bool snd_ws
bool rcv_ws
uint rcv_wnd_scale
uint snd_wnd_scale
bool ts_support
bool ts_enabled
bool snd_initial_ts
bool rcv_initial_ts
uint32 ts_recent
uint32 last_ack_sent
simtime_t time_last_data_sent
bool sack_support
bool sack_enabled
bool snd_sack_perm
bool rcv_sack_perm
uint32 start_seqno
uint32 end_seqno
bool snd_sack
bool snd_dsack
Sack sacks_array [MAX_SACK_BLOCKS]
uint32 highRxt
uint32 pipe
uint32 recoveryPoint
uint32 sackedBytes
uint32 sackedBytes_old
bool lossRecovery
uint32 dupacks
uint32 snd_sacks
uint32 rcv_sacks
uint32 rcv_oooseg
uint32 maxRcvBuffer
uint32 usedRcvBuffer
uint32 freeRcvBuffer
uint32 tcpRcvQueueDrops

Detailed Description

Contains state variables ("TCB") for TCP.

TCPStateVariables is effectively a "struct" -- it only contains public data members. (Only declared as a class so that we can use cPolymorphic as base class and make it possible to inspect it in Tkenv.)

TCPStateVariables only contains variables needed to implement the "base" (RFC 793) TCP. More advanced TCP variants are encapsulated into TCPAlgorithm subclasses which can have their own state blocks, subclassed from TCPStateVariables. See TCPAlgorithm::createStateVariables().

Definition at line 144 of file TCPConnection.h.


Constructor & Destructor Documentation

TCPStateVariables::TCPStateVariables (  ) 

Definition at line 32 of file TCPConnectionBase.cc.

{
    // set everything to 0 -- real init values will be set manually
    active = false;
    fork = false;
    snd_mss = 0; // will initially be set from configureStateVariables() and probably reset during connection setup
    snd_una = 0;
    snd_nxt = 0;
    snd_max = 0;
    snd_wnd = 0;
    snd_up = 0;
    snd_wl1 = 0;
    snd_wl2 = 0;
    iss = 0;

    rcv_nxt = 0;
    rcv_wnd = 0; // will be set from configureStateVariables()
    rcv_up = 0;
    irs = 0;
    rcv_adv = 0; // will be set from configureStateVariables()

    syn_rexmit_count = 0;
    syn_rexmit_timeout = 0;

    fin_ack_rcvd = false;
    send_fin = false;
    snd_fin_seq = 0;
    fin_rcvd = false;
    rcv_fin_seq = 0;
    sentBytes = 0;

    nagle_enabled = false;      // will be set from configureStateVariables()
    delayed_acks_enabled = false; // will be set from configureStateVariables()
    limited_transmit_enabled = false; // will be set from configureStateVariables()
    increased_IW_enabled = false; // will be set from configureStateVariables()
    full_sized_segment_counter = 0;
    ack_now = false;

    afterRto = false;

    time_last_data_sent = 0;

    ws_support = false;       // will be set from configureStateVariables()
    ws_enabled = false;
    snd_ws = false;
    rcv_ws = false;
    rcv_wnd_scale = 0;        // will be set from configureStateVariables()
    snd_wnd_scale = 0;      

    ts_support = false;       // will be set from configureStateVariables()
    ts_enabled = false;
    snd_initial_ts = false;
    rcv_initial_ts = false;
    ts_recent = 0;
    last_ack_sent = 0;

    sack_support = false;       // will be set from configureStateVariables()
    sack_enabled = false;
    snd_sack_perm = false;
    rcv_sack_perm = false;

    snd_sack = false;
    snd_dsack = false;
    start_seqno = 0;
    end_seqno = 0;
    highRxt = 0;
    pipe = 0;
    recoveryPoint = 0;
    sackedBytes = 0;
    sackedBytes_old = 0;
    lossRecovery = false;

    dupacks = 0;
    snd_sacks = 0;
    rcv_sacks = 0;
    rcv_oooseg = 0;

    maxRcvBuffer  = 0;  // will be set from configureStateVariables()
    usedRcvBuffer = 0;
    freeRcvBuffer = 0;
    tcpRcvQueueDrops = 0;
}


Member Function Documentation

std::string TCPStateVariables::detailedInfo ( void   )  const [virtual]

Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.

Definition at line 127 of file TCPConnectionBase.cc.

{
    std::stringstream out;
    out << "active = " << active << "\n";
    out << "snd_mss = " << snd_mss << "\n";
    out << "snd_una = " << snd_una << "\n";
    out << "snd_nxt = " << snd_nxt << "\n";
    out << "snd_max = " << snd_max << "\n";
    out << "snd_wnd = " << snd_wnd << "\n";
    out << "snd_up = " << snd_up << "\n";
    out << "snd_wl1 = " << snd_wl1 << "\n";
    out << "snd_wl2 = " << snd_wl2 << "\n";
    out << "iss = " << iss << "\n";
    out << "rcv_nxt = " << rcv_nxt << "\n";
    out << "rcv_wnd = " << rcv_wnd << "\n";
    out << "rcv_up = " << rcv_up << "\n";
    out << "irs = " << irs << "\n";
    out << "rcv_adv = " << rcv_adv << "\n";
    out << "fin_ack_rcvd = " << fin_ack_rcvd << "\n";
    out << "nagle_enabled = " << nagle_enabled << "\n";
    out << "limited_transmit_enabled = " << limited_transmit_enabled << "\n";
    out << "increased_IW_enabled = " << increased_IW_enabled << "\n";
    out << "delayed_acks_enabled = " << delayed_acks_enabled << "\n";
    out << "ws_support = " << ws_support << "\n";
    out << "ws_enabled = " << ws_enabled << "\n";
    out << "ts_support = " << ts_support << "\n";
    out << "ts_enabled = " << ts_enabled << "\n";
    out << "sack_support = " << sack_support << "\n";
    out << "sack_enabled = " << sack_enabled << "\n";
    out << "snd_sack_perm = " << snd_sack_perm << "\n";
    out << "snd_sacks = " << snd_sacks << "\n";
    out << "rcv_sacks = " << rcv_sacks << "\n";
    out << "dupacks = " << dupacks << "\n";
    out << "rcv_oooseg = " << rcv_oooseg << "\n";
    return out.str();
}

std::string TCPStateVariables::info (  )  const [virtual]

Reimplemented in TCPBaseAlgStateVariables, and TCPTahoeRenoFamilyStateVariables.

Definition at line 115 of file TCPConnectionBase.cc.

Referenced by TCPConnection::process_RCV_SEGMENT().

{
    std::stringstream out;
    out <<  "snd_una=" << snd_una;
    out << " snd_nxt=" << snd_nxt;
    out << " snd_max=" << snd_max;
    out << " snd_wnd=" << snd_wnd;
    out << " rcv_nxt=" << rcv_nxt;
    out << " rcv_wnd=" << rcv_wnd;
    return out.str();
}


Member Data Documentation

Sack TCPStateVariables::sacks_array[MAX_SACK_BLOCKS]

Definition at line 236 of file TCPConnection.h.

Referenced by TCPConnection::addSacks().


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