sctp.cc & sctp.h 内部に使っているspDestのdSrttの計算式は杉山計算式と同じ。つまり、そのまま使える。自分で作る必要はない。
sctp-cmt.cc
L2751 - ( In SctpCMTAgent::ProcessChunk() after CMT Change BLOCK )
...
/****** End CMT Change ******/
Boolean_E eThisDestWasUnconfirmed = FALSE;
Boolean_E eFoundUnconfirmedDest = FALSE;
/****** Begin Sugi Code ******/
/* This code is for MAX=2 transfor path. If there are more than 2,
You have to rewrite the algorithm. */
double dSrttArray[2]; // SRTT Array. For Saving the SRTTs from NODEs
int iSrttCount = 0; // NODE Counter;
for(spCurrNode = sDestList.spHead;
spCurrNode != NULL;
spCurrNode = spCurrNode->spNext)
{
spCurrDest = (SctpDest_S *) spCurrNode->vpData;
dSrttArray[iSrttCount] = spCurrDest->dSrtt;
iSrttCount++;
}
if(iSrttCount == 2){
printf("DEBUG:There are two SRTT!!\n");
double dDeltaSrtt = dSrttArray[0] - dSrttArray[1];
if(dDeltaSrtt < 0) dDeltaSrtt *= -1.0;
if(0.01 < dDeltaSrtt && dDeltaSrtt < 0.03)
{
eUseCmtDelAck = TRUE;
eUseCmtPF = TRUE;
}
else
{
eUseCmtDelAck = FALSE;
eUseCmtPF = FALSE;
}
}
/****** End Sugi Code ******/
switch(eState)
...
0 件のコメント:
コメントを投稿