INET Framework for OMNeT++/OMNEST
|
#include <SCTPAssociation.h>
SCTPPathVariables::SCTPPathVariables | ( | const IPvXAddress & | addr, |
SCTPAssociation * | assoc | ||
) |
{ InterfaceTableAccess interfaceTableAccess; association = assoc; remoteAddress = addr; activePath = true; confirmed = false; primaryPathCandidate = false; pathErrorCount = 0; pathErrorThreshold = assoc->getSctpMain()->par("pathMaxRetrans"); if (!pathErrorThreshold) { pathErrorThreshold = PATH_MAX_RETRANS; } pathRto = assoc->getSctpMain()->par("rtoInitial"); heartbeatTimeout = pathRto; double interval = (double)assoc->getSctpMain()->par("hbInterval"); if (!interval) { interval = HB_INTERVAL; } heartbeatIntervalTimeout = pathRto+interval; srtt = pathRto; lastAckTime = 0; forceHb = false; partialBytesAcked = 0; queuedBytes = 0; outstandingBytes = 0; RoutingTableAccess routingTableAccess; const InterfaceEntry* rtie = routingTableAccess.get()->getInterfaceForDestAddr(remoteAddress.get4()); if(rtie == NULL) { opp_error("No interface for remote address %s found!", remoteAddress.get4().str().c_str()); } pmtu = rtie->getMTU(); rttvar = 0.0; cwndTimeout = pathRto; cwnd = 0; ssthresh = 0; updateTime = 0.0; fastRecoveryExitPoint = 0; fastRecoveryActive = false; numberOfFastRetransmissions = 0; numberOfTimerBasedRetransmissions = 0; numberOfHeartbeatsSent = 0; numberOfHeartbeatsRcvd = 0; numberOfHeartbeatAcksSent = 0; numberOfHeartbeatAcksRcvd = 0; char str[128]; snprintf(str, sizeof(str), "HB_TIMER %d:%s",assoc->assocId,addr.str().c_str()); HeartbeatTimer = new cMessage(str); snprintf(str, sizeof(str), "HB_INT_TIMER %d:%s",assoc->assocId,addr.str().c_str()); HeartbeatIntervalTimer = new cMessage(str); snprintf(str, sizeof(str), "CWND_TIMER %d:%s",assoc->assocId,addr.str().c_str()); CwndTimer = new cMessage(str); snprintf(str, sizeof(str), "RTX_TIMER %d:%s",assoc->assocId,addr.str().c_str()); T3_RtxTimer = new cMessage(str); HeartbeatTimer->setContextPointer(association); HeartbeatIntervalTimer->setContextPointer(association); CwndTimer->setContextPointer(association); T3_RtxTimer->setContextPointer(association); snprintf(str, sizeof(str), "RTO %d:%s",assoc->assocId,addr.str().c_str()); statisticsPathRTO = new cOutVector(str); snprintf(str, sizeof(str), "RTT %d:%s",assoc->assocId,addr.str().c_str()); statisticsPathRTT = new cOutVector(str); snprintf(str, sizeof(str), "Slow Start Threshold %d:%s",assoc->assocId,addr.str().c_str()); statisticsPathSSthresh = new cOutVector(str); snprintf(str, sizeof(str), "Congestion Window %d:%s",assoc->assocId,addr.str().c_str()); statisticsPathCwnd = new cOutVector(str); snprintf(str, sizeof(str), "TSN Sent %d:%s",assoc->assocId,addr.str().c_str()); pathTSN = new cOutVector(str); snprintf(str, sizeof(str), "TSN Received %d:%s",assoc->assocId,addr.str().c_str()); pathRcvdTSN = new cOutVector(str); snprintf(str, sizeof(str), "HB Sent %d:%s",assoc->assocId,addr.str().c_str()); pathHb = new cOutVector(str); snprintf(str, sizeof(str), "HB ACK Sent %d:%s",assoc->assocId,addr.str().c_str()); pathHbAck = new cOutVector(str); snprintf(str, sizeof(str), "HB Received %d:%s",assoc->assocId,addr.str().c_str()); pathRcvdHb = new cOutVector(str); snprintf(str, sizeof(str), "HB ACK Received %d:%s",assoc->assocId,addr.str().c_str()); pathRcvdHbAck = new cOutVector(str); SCTPPathInfo* pinfo = new SCTPPathInfo("pinfo"); pinfo->setRemoteAddress(addr); T3_RtxTimer->setControlInfo(pinfo); HeartbeatTimer->setControlInfo(pinfo->dup()); HeartbeatIntervalTimer->setControlInfo(pinfo->dup()); CwndTimer->setControlInfo(pinfo->dup()); }
SCTPPathVariables::~SCTPPathVariables | ( | ) |
{ statisticsPathSSthresh->record(0); statisticsPathCwnd->record(0); delete statisticsPathSSthresh; delete statisticsPathCwnd; statisticsPathRTO->record(0); statisticsPathRTT->record(0); delete statisticsPathRTO; delete statisticsPathRTT; delete pathTSN; delete pathRcvdTSN; delete pathHb; delete pathRcvdHb; delete pathHbAck; delete pathRcvdHbAck; }
Referenced by SCTPPathVariables().
uint32 SCTPPathVariables::cwnd |
Referenced by SCTPAssociation::bytesAllowedToSend(), SCTPAssociation::cwndUpdateAfterCwndTimeout(), SCTPAssociation::cwndUpdateAfterRtxTimeout(), SCTPAssociation::cwndUpdateAfterSack(), SCTPAssociation::cwndUpdateBytesAcked(), SCTPAssociation::cwndUpdateMaxBurst(), SCTPAssociation::initCCParameters(), SCTPAssociation::printSctpPathMap(), SCTPAssociation::recordCwndUpdate(), SCTPAssociation::removePath(), and SCTPPathVariables().
simtime_t SCTPPathVariables::cwndTimeout |
Referenced by SCTPAssociation::pmDataIsSentOn(), and SCTPPathVariables().
cMessage* SCTPPathVariables::CwndTimer |
Referenced by SCTPAssociation::cwndUpdateAfterSack().
Referenced by SCTPAssociation::handleChunkReportedAsMissing(), and SCTPAssociation::processSackArrived().
unsigned int SCTPPathVariables::gapAcksInLastSACK |
Referenced by SCTPAssociation::handleChunkReportedAsMissing(), and SCTPAssociation::processSackArrived().
unsigned int SCTPPathVariables::gapNAcksInLastSACK |
Referenced by SCTPAssociation::handleChunkReportedAsMissing(), and SCTPAssociation::processSackArrived().
simtime_t SCTPPathVariables::heartbeatTimeout |
cMessage* SCTPPathVariables::HeartbeatTimer |
simtime_t SCTPPathVariables::lastAckTime |
Referenced by SCTPAssociation::handleChunkReportedAsMissing(), and SCTPAssociation::processSackArrived().
Referenced by SCTPAssociation::dequeueAckedChunks(), and SCTPAssociation::processSackArrived().
unsigned int SCTPPathVariables::numberOfDuplicates |
unsigned int SCTPPathVariables::numberOfFastRetransmissions |
Referenced by SCTPAssociation::handleChunkReportedAsMissing(), SCTP::removeAssociation(), and SCTPPathVariables().
unsigned int SCTPPathVariables::numberOfHeartbeatAcksRcvd |
Referenced by SCTPAssociation::processHeartbeatAckArrived(), SCTP::removeAssociation(), and SCTPPathVariables().
unsigned int SCTPPathVariables::numberOfHeartbeatAcksSent |
Referenced by SCTPAssociation::recordInPathVectors(), SCTP::removeAssociation(), and SCTPPathVariables().
unsigned int SCTPPathVariables::numberOfHeartbeatsRcvd |
Referenced by SCTPAssociation::process_RCV_Message(), SCTP::removeAssociation(), and SCTPPathVariables().
unsigned int SCTPPathVariables::numberOfHeartbeatsSent |
Referenced by SCTPAssociation::recordInPathVectors(), SCTP::removeAssociation(), and SCTPPathVariables().
unsigned int SCTPPathVariables::numberOfTimerBasedRetransmissions |
Referenced by SCTPAssociation::process_TIMEOUT_RTX(), SCTP::removeAssociation(), and SCTPPathVariables().
Referenced by SCTPAssociation::bytesAllowedToSend(), SCTPAssociation::cwndUpdateBytesAcked(), SCTPAssociation::cwndUpdateMaxBurst(), SCTPAssociation::decreaseOutstandingBytes(), SCTPAssociation::increaseOutstandingBytes(), SCTPAssociation::loadPacket(), SCTPAssociation::moveChunkToOtherPath(), SCTPAssociation::pmStartPathManagement(), SCTPAssociation::printSctpPathMap(), SCTPAssociation::processSackArrived(), SCTPPathVariables(), SCTPAssociation::sendOnPath(), and SCTPAssociation::storePacket().
Referenced by SCTPAssociation::cwndUpdateBytesAcked(), and SCTPAssociation::processSackArrived().
Referenced by SCTPPathVariables().
cOutVector* SCTPPathVariables::pathHb |
Referenced by SCTPAssociation::recordInPathVectors(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::pathHbAck |
Referenced by SCTPAssociation::recordInPathVectors(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::pathRcvdHb |
Referenced by SCTPAssociation::process_RCV_Message(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::pathRcvdHbAck |
Referenced by SCTPAssociation::processHeartbeatAckArrived(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::pathRcvdTSN |
Referenced by SCTPAssociation::processDataArrived(), SCTPPathVariables(), and ~SCTPPathVariables().
simtime_t SCTPPathVariables::pathRto |
Referenced by SCTPAssociation::pmDataIsSentOn(), SCTPAssociation::pmRttMeasurement(), SCTPAssociation::pmStartPathManagement(), SCTPAssociation::process_TIMEOUT_HEARTBEAT(), SCTPAssociation::process_TIMEOUT_HEARTBEAT_INTERVAL(), SCTPAssociation::process_TIMEOUT_RTX(), SCTPAssociation::processHeartbeatAckArrived(), SCTPAssociation::processSackArrived(), SCTPPathVariables(), SCTPAssociation::sendOnPath(), and SCTPAssociation::tsnWasReneged().
cOutVector* SCTPPathVariables::pathTSN |
Referenced by SCTPAssociation::recordInPathVectors(), SCTPPathVariables(), and ~SCTPPathVariables().
uint32 SCTPPathVariables::pmtu |
Referenced by SCTPAssociation::bytesAllowedToSend(), SCTPAssociation::calculateBytesToSendOnPath(), SCTPAssociation::createSack(), SCTPAssociation::cwndUpdateAfterCwndTimeout(), SCTPAssociation::cwndUpdateAfterRtxTimeout(), SCTPAssociation::cwndUpdateAfterSack(), SCTPAssociation::cwndUpdateBytesAcked(), SCTPAssociation::cwndUpdateMaxBurst(), SCTPAssociation::initCCParameters(), SCTPAssociation::pmStartPathManagement(), SCTPAssociation::processHeartbeatAckArrived(), SCTPPathVariables(), and SCTPAssociation::sendOnPath().
Referenced by SCTPAssociation::processHeartbeatAckArrived(), and SCTPPathVariables().
Referenced by SCTPPathVariables().
Referenced by SCTPAssociation::bytesAllowedToSend(), SCTPAssociation::choosePathForRetransmission(), SCTPAssociation::cwndUpdateAfterCwndTimeout(), SCTPAssociation::cwndUpdateAfterRtxTimeout(), SCTPAssociation::cwndUpdateAfterSack(), SCTPAssociation::cwndUpdateBytesAcked(), SCTPAssociation::cwndUpdateMaxBurst(), SCTPAssociation::decreaseOutstandingBytes(), SCTPAssociation::getNextAddress(), SCTPAssociation::getNextDestination(), SCTPAssociation::getOutboundDataChunk(), SCTPAssociation::handleChunkReportedAsAcked(), SCTPAssociation::handleChunkReportedAsMissing(), SCTPAssociation::increaseOutstandingBytes(), SCTPAssociation::initCCParameters(), SCTPAssociation::loadPacket(), SCTPAssociation::makeDataVarFromDataMsg(), SCTPAssociation::pathStatusIndication(), SCTPAssociation::pmClearPathCounter(), SCTPAssociation::pmDataIsSentOn(), SCTPAssociation::pmStartPathManagement(), SCTPAssociation::printSctpPathMap(), SCTPAssociation::process_TIMEOUT_HEARTBEAT(), SCTPAssociation::process_TIMEOUT_HEARTBEAT_INTERVAL(), SCTPAssociation::process_TIMEOUT_RTX(), SCTPAssociation::processHeartbeatAckArrived(), SCTPAssociation::processInitArrived(), SCTPAssociation::processSackArrived(), SCTP::removeAssociation(), SCTPAssociation::removePath(), SCTPPathVariables(), SCTPAssociation::sendHeartbeat(), SCTPAssociation::sendOnPath(), SCTPAssociation::storePacket(), SCTPAssociation::updateCounters(), and SCTPAssociation::updateFastRecoveryStatus().
simtime_t SCTPPathVariables::rttvar |
simtime_t SCTPPathVariables::rtxTimeout |
simtime_t SCTPPathVariables::srtt |
uint32 SCTPPathVariables::ssthresh |
Referenced by SCTPAssociation::cwndUpdateAfterCwndTimeout(), SCTPAssociation::cwndUpdateAfterRtxTimeout(), SCTPAssociation::cwndUpdateAfterSack(), SCTPAssociation::cwndUpdateBytesAcked(), SCTPAssociation::cwndUpdateMaxBurst(), SCTPAssociation::initCCParameters(), SCTPAssociation::processHeartbeatAckArrived(), SCTPAssociation::recordCwndUpdate(), SCTPAssociation::removePath(), and SCTPPathVariables().
cOutVector* SCTPPathVariables::statisticsPathCwnd |
Referenced by SCTPAssociation::recordCwndUpdate(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::statisticsPathRTO |
cOutVector* SCTPPathVariables::statisticsPathRTT |
Referenced by SCTPAssociation::pmRttMeasurement(), SCTPPathVariables(), and ~SCTPPathVariables().
cOutVector* SCTPPathVariables::statisticsPathSSthresh |
Referenced by SCTPAssociation::recordCwndUpdate(), SCTPPathVariables(), and ~SCTPPathVariables().
cMessage* SCTPPathVariables::T3_RtxTimer |
simtime_t SCTPPathVariables::updateTime |