INET Framework for OMNeT++/OMNEST
inet::tcp::TCPStateVariables Class Reference

Contains state variables ("TCB") for TCP. More...

#include <TCPConnection.h>

Inheritance diagram for inet::tcp::TCPStateVariables:
inet::tcp::DumbTCPStateVariables inet::tcp::TCPBaseAlgStateVariables inet::tcp::TCPTahoeRenoFamilyStateVariables inet::tcp::TCPVegasStateVariables inet::tcp::TCPWestwoodStateVariables

Public Member Functions

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

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
 
int ws_manual_scale
 
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
 
SackList sacks_array
 
uint32 highRxt
 
uint32 pipe
 
uint32 recoveryPoint
 
uint32 sackedBytes
 
uint32 sackedBytes_old
 
bool lossRecovery
 
uint32 sendQueueLimit
 
bool queueUpdate
 
uint32 dupacks
 
uint32 snd_sacks
 
uint32 rcv_sacks
 
uint32 rcv_oooseg
 
uint32 rcv_naseg
 
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 cObject 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().

Constructor & Destructor Documentation

inet::tcp::TCPStateVariables::TCPStateVariables ( )
35 {
36  // set everything to 0 -- real init values will be set manually
37  active = false;
38  fork = false;
39  snd_mss = 0; // will initially be set from configureStateVariables() and probably reset during connection setup
40  snd_una = 0;
41  snd_nxt = 0;
42  snd_max = 0;
43  snd_wnd = 0;
44  snd_up = 0;
45  snd_wl1 = 0;
46  snd_wl2 = 0;
47  iss = 0;
48 
49  rcv_nxt = 0;
50  rcv_wnd = 0; // will be set from configureStateVariables()
51  rcv_up = 0;
52  irs = 0;
53  rcv_adv = 0; // will be set from configureStateVariables()
54 
55  syn_rexmit_count = 0;
57 
58  fin_ack_rcvd = false;
59  send_fin = false;
60  snd_fin_seq = 0;
61  fin_rcvd = false;
62  rcv_fin_seq = 0;
63  sentBytes = 0;
64 
65  nagle_enabled = false; // will be set from configureStateVariables()
66  delayed_acks_enabled = false; // will be set from configureStateVariables()
67  limited_transmit_enabled = false; // will be set from configureStateVariables()
68  increased_IW_enabled = false; // will be set from configureStateVariables()
70  ack_now = false;
71 
72  afterRto = false;
73 
75 
76  ws_support = false; // will be set from configureStateVariables()
77  ws_enabled = false;
78  ws_manual_scale = -1;
79 
80  snd_ws = false;
81  rcv_ws = false;
82  rcv_wnd_scale = 0; // will be set from configureStateVariables()
83  snd_wnd_scale = 0;
84 
85  ts_support = false; // will be set from configureStateVariables()
86  ts_enabled = false;
87  snd_initial_ts = false;
88  rcv_initial_ts = false;
89  ts_recent = 0;
90  last_ack_sent = 0;
91 
92  sack_support = false; // will be set from configureStateVariables()
93  sack_enabled = false;
94  snd_sack_perm = false;
95  rcv_sack_perm = false;
96 
97  snd_sack = false;
98  snd_dsack = false;
99  start_seqno = 0;
100  end_seqno = 0;
101  highRxt = 0;
102  pipe = 0;
103  recoveryPoint = 0;
104  sackedBytes = 0;
105  sackedBytes_old = 0;
106  lossRecovery = false;
107 
108  dupacks = 0;
109  snd_sacks = 0;
110  rcv_sacks = 0;
111  rcv_oooseg = 0;
112  rcv_naseg = 0;
113 
114  maxRcvBuffer = 0; // will be set from configureStateVariables()
115  usedRcvBuffer = 0;
116  freeRcvBuffer = 0;
117  tcpRcvQueueDrops = 0;
118  sendQueueLimit = 0;
119  queueUpdate = true;
120 }
bool ts_enabled
Definition: TCPConnection.h:226
int ws_manual_scale
Definition: TCPConnection.h:218
bool send_fin
Definition: TCPConnection.h:190
uint32 snd_wl1
Definition: TCPConnection.h:169
uint32 full_sized_segment_counter
Definition: TCPConnection.h:203
uint32 rcv_up
Definition: TCPConnection.h:176
simtime_t syn_rexmit_timeout
Definition: TCPConnection.h:183
bool ws_support
Definition: TCPConnection.h:216
uint32 rcv_adv
Definition: TCPConnection.h:178
uint32 sackedBytes
Definition: TCPConnection.h:246
uint32 pipe
Definition: TCPConnection.h:244
uint snd_wnd_scale
Definition: TCPConnection.h:222
uint32 sendQueueLimit
Definition: TCPConnection.h:251
bool nagle_enabled
Definition: TCPConnection.h:198
uint32 recoveryPoint
Definition: TCPConnection.h:245
uint32 start_seqno
Definition: TCPConnection.h:238
uint32 last_ack_sent
Definition: TCPConnection.h:230
bool sack_support
Definition: TCPConnection.h:234
uint32 rcv_nxt
Definition: TCPConnection.h:174
uint32 freeRcvBuffer
Definition: TCPConnection.h:264
bool fin_ack_rcvd
Definition: TCPConnection.h:188
bool increased_IW_enabled
Definition: TCPConnection.h:201
bool ws_enabled
Definition: TCPConnection.h:217
bool rcv_initial_ts
Definition: TCPConnection.h:228
uint32 rcv_oooseg
Definition: TCPConnection.h:258
bool fork
Definition: TCPConnection.h:157
bool snd_dsack
Definition: TCPConnection.h:241
uint32 rcv_naseg
Definition: TCPConnection.h:259
uint32 snd_wnd
Definition: TCPConnection.h:167
uint32 snd_mss
Definition: TCPConnection.h:159
bool active
Definition: TCPConnection.h:156
bool sack_enabled
Definition: TCPConnection.h:235
bool snd_ws
Definition: TCPConnection.h:219
bool rcv_sack_perm
Definition: TCPConnection.h:237
uint32 snd_nxt
Definition: TCPConnection.h:165
uint32 snd_wl2
Definition: TCPConnection.h:170
uint32 sackedBytes_old
Definition: TCPConnection.h:247
uint32 end_seqno
Definition: TCPConnection.h:239
uint32 dupacks
Definition: TCPConnection.h:255
bool snd_initial_ts
Definition: TCPConnection.h:227
uint32 snd_up
Definition: TCPConnection.h:168
bool snd_sack
Definition: TCPConnection.h:240
uint32 snd_fin_seq
Definition: TCPConnection.h:191
bool rcv_ws
Definition: TCPConnection.h:220
uint32 snd_una
Definition: TCPConnection.h:164
bool snd_sack_perm
Definition: TCPConnection.h:236
int syn_rexmit_count
Definition: TCPConnection.h:182
uint32 rcv_sacks
Definition: TCPConnection.h:257
uint32 tcpRcvQueueDrops
Definition: TCPConnection.h:265
bool ack_now
Definition: TCPConnection.h:204
bool fin_rcvd
Definition: TCPConnection.h:193
uint32 snd_sacks
Definition: TCPConnection.h:256
uint32 iss
Definition: TCPConnection.h:171
uint32 maxRcvBuffer
Definition: TCPConnection.h:262
bool queueUpdate
Definition: TCPConnection.h:252
bool delayed_acks_enabled
Definition: TCPConnection.h:199
uint32 irs
Definition: TCPConnection.h:177
simtime_t time_last_data_sent
Definition: TCPConnection.h:231
uint rcv_wnd_scale
Definition: TCPConnection.h:221
uint32 ts_recent
Definition: TCPConnection.h:229
uint32 rcv_wnd
Definition: TCPConnection.h:175
bool afterRto
Definition: TCPConnection.h:213
uint32 highRxt
Definition: TCPConnection.h:243
uint32 sentBytes
Definition: TCPConnection.h:196
uint32 usedRcvBuffer
Definition: TCPConnection.h:263
bool lossRecovery
Definition: TCPConnection.h:248
uint32 rcv_fin_seq
Definition: TCPConnection.h:194
uint32 snd_max
Definition: TCPConnection.h:166
bool ts_support
Definition: TCPConnection.h:225
bool limited_transmit_enabled
Definition: TCPConnection.h:200

Member Function Documentation

std::string inet::tcp::TCPStateVariables::detailedInfo ( ) const
overridevirtual

Reimplemented in inet::tcp::TCPVegasStateVariables, inet::tcp::TCPWestwoodStateVariables, inet::tcp::TCPBaseAlgStateVariables, and inet::tcp::TCPTahoeRenoFamilyStateVariables.

Referenced by inet::tcp::TCPBaseAlgStateVariables::detailedInfo().

135 {
136  std::stringstream out;
137  out << "active=" << active << "\n";
138  out << "snd_mss=" << snd_mss << "\n";
139  out << "snd_una=" << snd_una << "\n";
140  out << "snd_nxt=" << snd_nxt << "\n";
141  out << "snd_max=" << snd_max << "\n";
142  out << "snd_wnd=" << snd_wnd << "\n";
143  out << "snd_up=" << snd_up << "\n";
144  out << "snd_wl1=" << snd_wl1 << "\n";
145  out << "snd_wl2=" << snd_wl2 << "\n";
146  out << "iss=" << iss << "\n";
147  out << "rcv_nxt=" << rcv_nxt << "\n";
148  out << "rcv_wnd=" << rcv_wnd << "\n";
149  out << "rcv_up=" << rcv_up << "\n";
150  out << "irs=" << irs << "\n";
151  out << "rcv_adv=" << rcv_adv << "\n";
152  out << "fin_ack_rcvd=" << fin_ack_rcvd << "\n";
153  out << "nagle_enabled=" << nagle_enabled << "\n";
154  out << "limited_transmit_enabled=" << limited_transmit_enabled << "\n";
155  out << "increased_IW_enabled=" << increased_IW_enabled << "\n";
156  out << "delayed_acks_enabled=" << delayed_acks_enabled << "\n";
157  out << "ws_support=" << ws_support << "\n";
158  out << "ws_enabled=" << ws_enabled << "\n";
159  out << "ts_support=" << ts_support << "\n";
160  out << "ts_enabled=" << ts_enabled << "\n";
161  out << "sack_support=" << sack_support << "\n";
162  out << "sack_enabled=" << sack_enabled << "\n";
163  out << "snd_sack_perm=" << snd_sack_perm << "\n";
164  out << "snd_sacks=" << snd_sacks << "\n";
165  out << "rcv_sacks=" << rcv_sacks << "\n";
166  out << "dupacks=" << dupacks << "\n";
167  out << "rcv_oooseg=" << rcv_oooseg << "\n";
168  out << "rcv_naseg=" << rcv_naseg << "\n";
169  return out.str();
170 }
bool ts_enabled
Definition: TCPConnection.h:226
uint32 snd_wl1
Definition: TCPConnection.h:169
uint32 rcv_up
Definition: TCPConnection.h:176
bool ws_support
Definition: TCPConnection.h:216
uint32 rcv_adv
Definition: TCPConnection.h:178
bool nagle_enabled
Definition: TCPConnection.h:198
bool sack_support
Definition: TCPConnection.h:234
uint32 rcv_nxt
Definition: TCPConnection.h:174
bool fin_ack_rcvd
Definition: TCPConnection.h:188
bool increased_IW_enabled
Definition: TCPConnection.h:201
bool ws_enabled
Definition: TCPConnection.h:217
uint32 rcv_oooseg
Definition: TCPConnection.h:258
uint32 rcv_naseg
Definition: TCPConnection.h:259
uint32 snd_wnd
Definition: TCPConnection.h:167
uint32 snd_mss
Definition: TCPConnection.h:159
bool active
Definition: TCPConnection.h:156
bool sack_enabled
Definition: TCPConnection.h:235
uint32 snd_nxt
Definition: TCPConnection.h:165
uint32 snd_wl2
Definition: TCPConnection.h:170
uint32 dupacks
Definition: TCPConnection.h:255
uint32 snd_up
Definition: TCPConnection.h:168
uint32 snd_una
Definition: TCPConnection.h:164
bool snd_sack_perm
Definition: TCPConnection.h:236
uint32 rcv_sacks
Definition: TCPConnection.h:257
uint32 snd_sacks
Definition: TCPConnection.h:256
uint32 iss
Definition: TCPConnection.h:171
bool delayed_acks_enabled
Definition: TCPConnection.h:199
uint32 irs
Definition: TCPConnection.h:177
uint32 rcv_wnd
Definition: TCPConnection.h:175
uint32 snd_max
Definition: TCPConnection.h:166
bool ts_support
Definition: TCPConnection.h:225
bool limited_transmit_enabled
Definition: TCPConnection.h:200
std::string inet::tcp::TCPStateVariables::info ( ) const
overridevirtual

Reimplemented in inet::tcp::TCPVegasStateVariables, inet::tcp::TCPWestwoodStateVariables, inet::tcp::TCPBaseAlgStateVariables, and inet::tcp::TCPTahoeRenoFamilyStateVariables.

Referenced by inet::tcp::TCPBaseAlgStateVariables::info(), and inet::tcp::TCPConnection::process_RCV_SEGMENT().

123 {
124  std::stringstream out;
125  out << "snd_una=" << snd_una;
126  out << " snd_nxt=" << snd_nxt;
127  out << " snd_max=" << snd_max;
128  out << " snd_wnd=" << snd_wnd;
129  out << " rcv_nxt=" << rcv_nxt;
130  out << " rcv_wnd=" << rcv_wnd;
131  return out.str();
132 }
uint32 rcv_nxt
Definition: TCPConnection.h:174
uint32 snd_wnd
Definition: TCPConnection.h:167
uint32 snd_nxt
Definition: TCPConnection.h:165
uint32 snd_una
Definition: TCPConnection.h:164
uint32 rcv_wnd
Definition: TCPConnection.h:175
uint32 snd_max
Definition: TCPConnection.h:166

Member Data Documentation

bool inet::tcp::TCPStateVariables::fin_rcvd
bool inet::tcp::TCPStateVariables::queueUpdate
uint32 inet::tcp::TCPStateVariables::rcv_fin_seq
bool inet::tcp::TCPStateVariables::rcv_initial_ts
uint32 inet::tcp::TCPStateVariables::rcv_naseg
uint32 inet::tcp::TCPStateVariables::rcv_oooseg
uint32 inet::tcp::TCPStateVariables::rcv_sacks
uint32 inet::tcp::TCPStateVariables::rcv_up
SackList inet::tcp::TCPStateVariables::sacks_array
bool inet::tcp::TCPStateVariables::snd_initial_ts
uint32 inet::tcp::TCPStateVariables::snd_mss

Referenced by inet::tcp::TCPConnection::configureStateVariables(), detailedInfo(), inet::tcp::TCPBaseAlg::established(), inet::tcp::TCPConnection::isLost(), inet::tcp::TCPConnection::nextSeg(), inet::tcp::TCPConnection::process_STATUS(), inet::tcp::TCPConnection::processMSSOption(), inet::tcp::TCPNewReno::processRexmitTimer(), inet::tcp::TCPReno::processRexmitTimer(), inet::tcp::TCPTahoe::processRexmitTimer(), inet::tcp::TCPWestwood::processRexmitTimer(), inet::tcp::TCPVegas::processRexmitTimer(), inet::tcp::TCPConnection::processSegment1stThru8th(), inet::tcp::TCPNewReno::recalculateSlowStartThreshold(), inet::tcp::TCPReno::recalculateSlowStartThreshold(), inet::tcp::TCPTahoe::recalculateSlowStartThreshold(), inet::tcp::TCPVegas::recalculateSlowStartThreshold(), inet::tcp::TCPNewReno::receivedDataAck(), inet::tcp::TCPReno::receivedDataAck(), inet::tcp::TCPTahoe::receivedDataAck(), inet::tcp::TCPWestwood::receivedDataAck(), inet::tcp::TCPVegas::receivedDataAck(), inet::tcp::TCPNewReno::receivedDuplicateAck(), inet::tcp::TCPReno::receivedDuplicateAck(), inet::tcp::TCPTahoe::receivedDuplicateAck(), inet::tcp::TCPWestwood::receivedDuplicateAck(), inet::tcp::TCPVegas::receivedDuplicateAck(), inet::tcp::TCPConnection::retransmitData(), inet::tcp::TCPConnection::retransmitOneSegment(), inet::tcp::TCPBaseAlg::sendData(), inet::tcp::TCPConnection::sendData(), inet::tcp::TCPConnection::sendDataDuringLossRecoveryPhase(), inet::tcp::TCPConnection::sendOneNewSegment(), inet::tcp::TCPConnection::sendSegment(), inet::tcp::TCPConnection::sendSegmentDuringLossRecoveryPhase(), TCPStateVariables(), and inet::tcp::TCPConnection::writeHeaderOptions().

uint32 inet::tcp::TCPStateVariables::snd_sacks
uint32 inet::tcp::TCPStateVariables::snd_up
simtime_t inet::tcp::TCPStateVariables::syn_rexmit_timeout

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