ns-allinone-2.35/sctp/sctp.cc
int SctpAgent::GenMultipleDataChunks(u_char *ucpOutData, int iTotalOutDataSize)
{
  DBG_I(GenMultipleDataChunks);
  
  int iChunkSize = 0;
  int iStartingTotalSize = iTotalOutDataSize;

  while((iTotalOutDataSize + GetNextDataChunkSize()  <= uiMaxDataSize) &&
	(GetNextDataChunkSize()                      <= uiPeerRwnd) &&
	(eDataSource == DATA_SOURCE_INFINITE || sAppLayerBuffer.uiLength != 0))
    {
      iChunkSize = GenOneDataChunk(ucpOutData);
      ucpOutData += iChunkSize;
      iTotalOutDataSize += iChunkSize;
    }
  
  DBG_X(GenMultipleDataChunks);
  return iTotalOutDataSize - iStartingTotalSize;
}
/* This function fills a packet with as many chunks that can fit into the PMTU 
 * and the peer's rwnd.
 *
 * Since, this function is called the first time a chunk(s) is sent, all chunks
 * generated here are added to the sSendBuffer.
 *
 * returns the resulting size of the packet
 */
This function fills a packet with as many chunks that can fit into the PMTU
and the peer's rwnd.

Since, this function is called the first time a chunk(s) is sent, all chunks
generated here are added to the sSendBuffer.

returns the resulting size of the packet
This function fills a packet with as many chunks that can fit into the PMTU and the peer ' s rwnd . Since this function is called the first time a chunk ( s ) is sent all chunks generated here are added to the sSendBuffer . returns the resulting size of the packet
int SctpAgent::GenMultipleDataChunks(u_char *ucpOutData, int iTotalOutDataSize)
{
  DBG_I(GenMultipleDataChunks);
  int iChunkSize = 0;
  int iStartingTotalSize = iTotalOutDataSize;
  while((iTotalOutDataSize + GetNextDataChunkSize()  <= uiMaxDataSize) &&
	(GetNextDataChunkSize()                      <= uiPeerRwnd) &&
	(eDataSource == DATA_SOURCE_INFINITE || sAppLayerBuffer.uiLength != 0))
    {
      iChunkSize = GenOneDataChunk(ucpOutData);
      ucpOutData += iChunkSize;
      iTotalOutDataSize += iChunkSize;
    }
  DBG_X(GenMultipleDataChunks);
  return iTotalOutDataSize - iStartingTotalSize;
}
int SctpAgent :: GenMultipleDataChunks ( u_char * ucpOutData , int iTotalOutDataSize ) { DBG_I ( GenMultipleDataChunks ) ; int iChunkSize = 0 ; int iStartingTotalSize = iTotalOutDataSize ; while ( ( iTotalOutDataSize + GetNextDataChunkSize ( ) <= uiMaxDataSize ) && ( GetNextDataChunkSize ( ) <= uiPeerRwnd ) && ( eDataSource == DATA_SOURCE_INFINITE || sAppLayerBuffer . uiLength != 0 ) ) { iChunkSize = GenOneDataChunk ( ucpOutData ) ; ucpOutData += iChunkSize ; iTotalOutDataSize += iChunkSize ; } DBG_X ( GenMultipleDataChunks ) ; return iTotalOutDataSize - iStartingTotalSize ; }
This function fills a packet with as many chunks that can fit into the PMTU
 and the peer's rwnd.
This function fills a packet with as many chunks that can fit into the PMTU and the peer ' s rwnd .