tcp: Fix trace source callback typedef names

This commit is contained in:
Tom Henderson
2018-08-02 23:03:48 -07:00
parent 94f2c034aa
commit 9a6bcd75de
2 changed files with 33 additions and 29 deletions

View File

@@ -39,39 +39,39 @@ TcpSocketState::GetTypeId (void)
.AddTraceSource ("CongestionWindow",
"The TCP connection's congestion window",
MakeTraceSourceAccessor (&TcpSocketState::m_cWnd),
"ns3::TracedValue::Uint32Callback")
"ns3::TracedValueCallback::Uint32")
.AddTraceSource ("CongestionWindowInflated",
"The TCP connection's inflated congestion window",
MakeTraceSourceAccessor (&TcpSocketState::m_cWndInfl),
"ns3::TracedValue::Uint32Callback")
"ns3::TracedValueCallback::Uint32")
.AddTraceSource ("SlowStartThreshold",
"TCP slow start threshold (bytes)",
MakeTraceSourceAccessor (&TcpSocketState::m_ssThresh),
"ns3::TracedValue::Uint32Callback")
"ns3::TracedValueCallback::Uint32")
.AddTraceSource ("CongState",
"TCP Congestion machine state",
MakeTraceSourceAccessor (&TcpSocketState::m_congState),
"ns3::TracedValue::TcpCongStatesTracedValueCallback")
"ns3::TracedValueCallback::TcpCongState")
.AddTraceSource ("EcnState",
"Trace ECN state change of socket",
MakeTraceSourceAccessor (&TcpSocketState::m_ecnState),
"ns3::TracedValue::EcnStatesTracedValueCallback")
"ns3::TracedValueCallback::EcnState")
.AddTraceSource ("HighestSequence",
"Highest sequence number received from peer",
MakeTraceSourceAccessor (&TcpSocketState::m_highTxMark),
"ns3::SequenceNumber32TracedValueCallback")
"ns3::TracedValueCallback::SequenceNumber32")
.AddTraceSource ("NextTxSequence",
"Next sequence number to send (SND.NXT)",
MakeTraceSourceAccessor (&TcpSocketState::m_nextTxSequence),
"ns3::SequenceNumber32TracedValueCallback")
"ns3::TracedValueCallback::SequenceNumber32")
.AddTraceSource ("BytesInFlight",
"The TCP connection's congestion window",
MakeTraceSourceAccessor (&TcpSocketState::m_bytesInFlight),
"ns3::TracedValue::Uint32Callback")
"ns3::TracedValueCallback::Uint32")
.AddTraceSource ("RTT",
"Last RTT sample",
MakeTraceSourceAccessor (&TcpSocketState::m_lastRtt),
"ns3::TracedValue::TimeCallback")
"ns3::TracedValueCallback::Time")
;
return tid;
}

View File

@@ -113,26 +113,6 @@ public:
* This state is used for tracing. */
} EcnState_t;
/**
* \ingroup tcp
* TracedValue Callback signature for TcpCongState_t
*
* \param [in] oldValue original value of the traced variable
* \param [in] newValue new value of the traced variable
*/
typedef void (* TcpCongStatesTracedValueCallback)(const TcpCongState_t oldValue,
const TcpCongState_t newValue);
/**
* \ingroup tcp
* TracedValue Callback signature for EcnState_t
*
* \param [in] oldValue original value of the traced variable
* \param [in] newValue new value of the traced variable
*/
typedef void (* EcnStatesTracedValueCallback)(const EcnState_t oldValue,
const EcnState_t newValue);
/**
* \brief Literal names of TCP states for use in log messages
*/
@@ -195,4 +175,28 @@ public:
}
};
namespace TracedValueCallback {
/**
* \ingroup tcp
* TracedValue Callback signature for TcpCongState_t
*
* \param [in] oldValue original value of the traced variable
* \param [in] newValue new value of the traced variable
*/
typedef void (* TcpCongState)(const TcpSocketState::TcpCongState_t oldValue,
const TcpSocketState::TcpCongState_t newValue);
/**
* \ingroup tcp
* TracedValue Callback signature for EcnState_t
*
* \param [in] oldValue original value of the traced variable
* \param [in] newValue new value of the traced variable
*/
typedef void (* EcnState)(const TcpSocketState::EcnState_t oldValue,
const TcpSocketState::EcnState_t newValue);
} // namespace TracedValueCallback
} //namespace ns3