Public Member Functions | Public Attributes

tcp_old::TCPStateVariables Class Reference

#include <TCPConnection_old.h>

Inheritance diagram for tcp_old::TCPStateVariables:
tcp_old::DumbTCPStateVariables tcp_old::TCPBaseAlgStateVariables tcp_old::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
uint snd_mss
uint32 snd_una
uint32 snd_nxt
uint32 snd_max
uint snd_wnd
uint32 snd_up
uint32 snd_wl1
uint32 snd_wl2
uint32 iss
uint32 rcv_nxt
uint32 rcv_wnd
uint32 rcv_up
uint32 irs
short dupacks
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
bool afterRto
uint32 last_ack_sent

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 147 of file TCPConnection_old.h.


Constructor & Destructor Documentation

TCPStateVariables::TCPStateVariables (  ) 

Definition at line 31 of file old/TCPConnectionBase.cc.

{
    // set everything to 0 -- real init values will be set manually
    active = false;
    fork = false;
    snd_mss = -1; // will be set from configureStateVariables()
    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 = -1; // will be set from configureStateVariables()
    rcv_up = 0;
    irs = 0;

    dupacks = 0;

    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;
    afterRto = false;

    last_ack_sent = 0;
}


Member Function Documentation

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

Reimplemented in tcp_old::TCPBaseAlgStateVariables, and tcp_old::TCPTahoeRenoFamilyStateVariables.

Definition at line 77 of file old/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 << "fin_ack_rcvd = " << fin_ack_rcvd << "\n";
    return out.str();
}

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

Reimplemented in tcp_old::TCPBaseAlgStateVariables, and tcp_old::TCPTahoeRenoFamilyStateVariables.

Definition at line 65 of file old/TCPConnectionBase.cc.

Referenced by tcp_old::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


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