最佳答案
这意味着多集已通过类似于以下方式的方式进行了前向声明:
template < class T > class multiset;
multiset<double> *pointer;
multiset<double> measuredRTT;
#include <vector>
#include <map>
#include <stdint.h>
#include <queue>
#include <list>
#include <set>
#ifndef MP_TCP_TYPEDEFS_H
#define MP_TCP_TYPEDEFS_H
using namespace std;
namespace ns3 {
typedef enum {
MP_NONE, // 0
MP_MPC, // 1
MP_ADDR, // 2
MP_JOIN} MpStates_t;
// Multipath actions
// congestion control algorithm
typedef enum {
Uncoupled_TCPs, // 0
Linked_Increases, // 1
RTT_Compensator, // 2
Fully_Coupled // 3
} CongestionCtrl_t;
// connection phase
typedef enum {
Slow_Start, // 0
Congestion_Avoidance, // 1
DSACK_SS, // 2 DSACK Slow Start: a temporary slow start triggered after detecting spurious retransmission based on DSACK information
RTO_Recovery // 3 Reconvery algorithm after RTO expiration
} Phase_t;
typedef enum {
Round_Robin // 0
//Collision_Avoidance // 1
} DataDistribAlgo_t;
typedef enum {
NoPR_Algo, // 0
Eifel, // 1
TCP_DOOR, // 2 Detection of Out-of-Order and Response
D_SACK, // 3 Duplicate SACK (Selective ACKnowledgement)
F_RTO // 4 Forward RTO-Recovery: Algorithm for detecting spurious retransmission timeouts
} PacketReorder_t;
typedef enum {
Step_1, // 0
Step_2, // 1
Step_3, // 2
Step_4 // 3 In this step of F-RTO do a standard Fast Recovery algorithm
} FRtoStep_t;
class DSNMapping
{
public:
DSNMapping ();
//DSNMapping (const DSNMapping &res);
virtual ~DSNMapping();
uint64_t dataSeqNumber;
uint16_t dataLevelLength;
uint32_t subflowSeqNumber;
uint32_t acknowledgement;
uint32_t dupAckCount;
uint8_t subflowIndex;
uint8_t *packet;
bool operator < (const DSNMapping& rhs) const;
// variables for reordering simulation
// Eifel Algorithm
bool retransmited;
uint64_t tsval; // TimesTamp value
/*
private:/
bool original;
*/
};
typedef enum {
NO_ACTION, // 0
ADDR_TX,
INIT_SUBFLOWS} MpActions_t;
class MpTcpStateMachine
{
public:
MpTcpStateMachine();
virtual ~MpTcpStateMachine();
};
class MpTcpSubFlow
{
public:
MpTcpSubFlow ();
~MpTcpSubFlow ();
MpTcpSubFlow (uint32_t TxSeqNb);
void StartTracing (string traced);
void CwndTracer (double oldval, double newval);
DSNMapping * GetunAckPkt (uint32_t awnd);
uint16_t routeId;
bool connected;
Phase_t phase;
uint16_t sPort;
uint16_t dPort;
uint32_t oif;
uint32_t MSS; // Maximum Segment Size
//double cwnd;
double scwnd; // smoothed congestion window
uint32_t ssthresh;
uint32_t maxSeqNb; // it represent the highest sequence number of a sent byte. In general it's egual to ( TxSeqNumber - 1 ) until a retransmission happen
uint32_t highestAck; // hightest received ACK for the subflow level sequence number
uint64_t bandwidth;
list<DSNMapping*> mapDSN;
multiset<double> measuredRTT;
//list<double> measuredRTT;
uint32_t TxSeqNumber;
uint32_t RxSeqNumber;
// for losses simulation
double LostThreshold;
bool CanDrop;
uint64_t PktCount;
uint64_t MaxPktCount;
uint32_t DropedPktCount;
uint32_t MaxDropedPktCount;
// Reordering simulation
double savedCWND;
uint32_t savedSSThresh;
bool SpuriousRecovery;
uint32_t recover;
uint8_t ackCount; // count of received acknowledgement after an RTO expiration
uint32_t ReTxSeqNumber; // higher sequence number of the retransmitted segment
int nbRecvAck;
};
class MpTcpAddressInfo
{
public:
MpTcpAddressInfo();
~MpTcpAddressInfo();
uint8_t addrID;
};
class DataBuffer
{
public:
DataBuffer();
DataBuffer(uint32_t size);
~DataBuffer();
queue<uint8_t> buffer;
uint32_t bufMaxSize;
uint32_t Add(uint8_t* buf, uint32_t size);
uint32_t Retrieve(uint8_t* buf, uint32_t size);
bool Empty();
bool Full ();
uint32_t PendingData();
uint32_t FreeSpaceSize();
};
}//namespace ns3
#endif //MP_TCP_TYPEDEFS_H
/// Added just so that the linker does not complain about lack of missing main
int main(int argc, char* argv[] )
{
return 0;
}
https://stackoverflow.com/questions/31887223/
相关文章:
c++ - 如何检查库是否可以由特定的 g++ 版本编译?
c++ - 为什么 Visual Studio Community 2017 C++ 标准是 C++98?
linux - 如何重新配置 Kconfig 设置?
.net - Visual Studio "Any CPU"目标是什么意思?
Java:编辑并重新编译.jar?
c++ - getopt_long 不打印错误消息
c++ - 将 std::vector emplace_back() 与 std::pair 与构造函数初始化列表一起使用
android - 如何确定 AOSP 系统库二进制文件中使用了哪些源文件?
c - Windows Lua 到可执行文件
php - 在 Windows 上编译 php_excel (v1.0.0) 和 LibXL (v3.5.4.1)