RINASim  October 2016
Documentation of framework for OMNeT++
TxControlPolicyTCPTahoe.h
Go to the documentation of this file.
1 //
2 // This program is free software: you can redistribute it and/or modify
3 // it under the terms of the GNU Lesser General Public License as published by
4 // the Free Software Foundation, either version 3 of the License, or
5 // (at your option) any later version.
6 //
7 // This program is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 // GNU Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public License
13 // along with this program. If not, see http://www.gnu.org/licenses/.
14 //
22 #ifndef TXCONTROLPOLICYTCPTAHOE_H_
23 #define TXCONTROLPOLICYTCPTAHOE_H_
24 
25 #include <omnetpp.h>
26 
27 #include "TxControlPolicyBase.h"
28 #include "SenderAckPolicyTCP.h"
29 #include "DTPState.h"
30 #include "DTCPState.h"
31 
32 #define MAX_SSTHRESH 1000000000
33 #define RST_WND 1
34 #define INL_WND 3
35 #define SMSS 1500
36 
37 //state
38 #define STATE_STARTING_SLOW_START 0
39 #define STATE_SLOW_START 1
40 #define STATE_CNG_AVOID 2
41 
43 public:
44  float snd_cwnd;
45  float ssthresh;
46 
47  uint32_t state;
48  uint32_t rxSent;
49  uint32_t ackRcvd;
50  uint32_t packetSize;
51  uint32_t flightSize;
52 
53  bool slowedDown;
54 
56  virtual ~TxControlPolicyTCPTahoe();
57 
58  virtual bool run(DTPState* dtpState, DTCPState* dtcpState);
59 
60  void slowDown();
61 protected:
63 
64  //Statistic signals
65  simsignal_t sigStatTCPTahoeCWND;
67  virtual void initialize(int step);
68 };
69 
70 #endif /* TXCONTROLPOLICYTCPTAHOE_H_ */
SenderAckPolicyTCP * ackPolicy
virtual bool run(DTPState *dtpState, DTCPState *dtcpState)
float snd_cwnd
congestion window
float ssthresh
slow start threshold
virtual void initialize()