ns-allinone-2.35/sctp/sctp.cc
int SctpAgent::SetLossrate(int iNsAddr, float fLossrate)
{

  Node_S *spCurrNode = NULL;
  SctpDest_S *spCurrDest = NULL;

  for(spCurrNode = sDestList.spHead;
      spCurrNode != NULL;
      spCurrNode = spCurrNode->spNext)
    {
      spCurrDest = (SctpDest_S *) spCurrNode->vpData;
      if(spCurrDest->iNsAddr == iNsAddr)
	{
	  spCurrDest->fLossrate = fLossrate;
	  return (TCL_OK);
	}
    }
  return (TCL_ERROR);
}
/* Helps maintain information passed down from the TCL script by an oracle
 * about path lossrates.  Used in RTX-LOSSRATE rtx policy for
 * CMT. Lossrate for a path is set in the dest node's datastructure.
 */
Helps maintain information passed down from the TCL script by an oracle
about path lossrates.  Used in RTX-LOSSRATE rtx policy for
CMT. Lossrate for a path is set in the dest node's datastructure.
Helps maintain information passed down from the TCL script by an oracle about path lossrates . Used in RTX - LOSSRATE rtx policy for CMT . Lossrate for a path is set in the dest node ' s datastructure .
int SctpAgent::SetLossrate(int iNsAddr, float fLossrate)
{
  Node_S *spCurrNode = NULL;
  SctpDest_S *spCurrDest = NULL;
  for(spCurrNode = sDestList.spHead;
      spCurrNode != NULL;
      spCurrNode = spCurrNode->spNext)
    {
      spCurrDest = (SctpDest_S *) spCurrNode->vpData;
      if(spCurrDest->iNsAddr == iNsAddr)
	{
	  spCurrDest->fLossrate = fLossrate;
	  return (TCL_OK);
	}
    }
  return (TCL_ERROR);
}
int SctpAgent :: SetLossrate ( int iNsAddr , float fLossrate ) { Node_S * spCurrNode = NULL ; SctpDest_S * spCurrDest = NULL ; for ( spCurrNode = sDestList . spHead ; spCurrNode != NULL ; spCurrNode = spCurrNode -> spNext ) { spCurrDest = ( SctpDest_S * ) spCurrNode -> vpData ; if ( spCurrDest -> iNsAddr == iNsAddr ) { spCurrDest -> fLossrate = fLossrate ; return ( TCL_OK ) ; } } return ( TCL_ERROR ) ; }
Helps maintain information passed down from the TCL script by an oracle
 about path lossrates.
Helps maintain information passed down from the TCL script by an oracle about path lossrates .