ns-allinone-2.35/sctp/sctp.cc
void SctpAgent::NextChunk(u_char **ucpChunk, int *ipRemainingDataLen)
{
  DBG_I(NextChunk);
  unsigned long ulSize = ((SctpChunkHdr_S *) *ucpChunk)->usLength;

  /* the chunk length field does not include the padded bytes, so we need to
   * account for these extra bytes.
   */
  if( (ulSize % 4) != 0 ) 
    ulSize += 4 - (ulSize % 4);

  *ipRemainingDataLen -= ulSize;

  if(*ipRemainingDataLen > 0)
    *ucpChunk += ulSize;
  else
    *ucpChunk = NULL;

  DBG_X(NextChunk);
}
/* Moves the pointer to the next chunk.
 * If there is no next chunk, then sent pointer to NULL. 
 */
Moves the pointer to the next chunk.
If there is no next chunk, then sent pointer to NULL.
Moves the pointer to the next chunk . If there is no next chunk then sent pointer to NULL .
void SctpAgent::NextChunk(u_char **ucpChunk, int *ipRemainingDataLen)
{
  DBG_I(NextChunk);
  unsigned long ulSize = ((SctpChunkHdr_S *) *ucpChunk)->usLength;
  if( (ulSize % 4) != 0 ) 
    ulSize += 4 - (ulSize % 4);
  *ipRemainingDataLen -= ulSize;
  if(*ipRemainingDataLen > 0)
    *ucpChunk += ulSize;
  else
    *ucpChunk = NULL;
  DBG_X(NextChunk);
}
void SctpAgent :: NextChunk ( u_char * * ucpChunk , int * ipRemainingDataLen ) { DBG_I ( NextChunk ) ; unsigned long ulSize = ( ( SctpChunkHdr_S * ) * ucpChunk ) -> usLength ; if ( ( ulSize % 4 ) != 0 ) ulSize += 4 - ( ulSize % 4 ) ; * ipRemainingDataLen -= ulSize ; if ( * ipRemainingDataLen > 0 ) * ucpChunk += ulSize ; else * ucpChunk = NULL ; DBG_X ( NextChunk ) ; }
Moves the pointer to the next chunk.
Moves the pointer to the next chunk .
/* the chunk length field does not include the padded bytes, so we need to
   * account for these extra bytes.
   */