Update TCP/IP tack to latest form Git.

This commit is contained in:
Richard Barry 2019-07-14 22:07:41 +00:00
parent a6a0403fd6
commit 2e18203bb7
29 changed files with 4619 additions and 393 deletions

View file

@ -292,7 +292,7 @@ void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem
pxWhere->pxPrevious = pxNewListItem;
/* Remember which list the item is in. */
pxNewListItem->pvContainer = ( void * ) pxList; /* If this line fails to build then ensure configENABLE_BACKWARD_COMPATIBILITY is set to 1 in FreeRTOSConfig.h. */
listLIST_ITEM_CONTAINER( pxNewListItem ) = ( void * ) pxList;
( pxList->uxNumberOfItems )++;
}
@ -675,17 +675,17 @@ const int32_t l500ms = 500;
#if( ipconfigUSE_TCP_WIN == 1 )
void vTCPSegmentCleanup( void )
{
/* Free and clear the TCP segments pointer. This function should only be called
* once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this
* function. */
if( xTCPSegments != NULL )
{
vPortFreeLarge( xTCPSegments );
xTCPSegments = NULL;
}
}
void vTCPSegmentCleanup( void )
{
/* Free and clear the TCP segments pointer. This function should only be called
* once FreeRTOS+TCP will no longer be used. No thread-safety is provided for this
* function. */
if( xTCPSegments != NULL )
{
vPortFreeLarge( xTCPSegments );
xTCPSegments = NULL;
}
}
#endif /* ipconfgiUSE_TCP_WIN == 1 */
/*-----------------------------------------------------------*/
@ -805,20 +805,20 @@ const int32_t l500ms = 500;
{
ulSavedSequenceNumber = ulCurrentSequenceNumber;
/* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.
If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.
So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just
clean them out. */
do
{
pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );
/* Clean up all sequence received between ulSequenceNumber and ulSequenceNumber + ulLength since they are duplicated.
If the server is forced to retransmit packets several time in a row it might send a batch of concatenated packet for speed.
So we cannot rely on the packets between ulSequenceNumber and ulSequenceNumber + ulLength to be sequential and it is better to just
clean them out. */
do
{
pxFound = xTCPWindowRxConfirm( pxWindow, ulSequenceNumber, ulLength );
if ( pxFound != NULL )
{
/* Remove it because it will be passed to user directly. */
vTCPWindowFree( pxFound );
}
} while ( pxFound );
if ( pxFound != NULL )
{
/* Remove it because it will be passed to user directly. */
vTCPWindowFree( pxFound );
}
} while ( pxFound );
/* Check for following segments that are already in the
queue and increment ulCurrentSequenceNumber. */