mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-19 14:54:28 +08:00
Sync FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP with the version in GitHub at (23665258cabe49d5d68ba23968b6845a7c80eb34).
Notes: - header has version 2.2.0. - This sync did not bring in ./test directory, though we should. - New NetworkInterfaces are introduced by this merge. - Keil compiler support. - FreeRTOS_IP.h new API xApplicationGetRandomNumber(). - FreeRTOS_IP_Private.h new eIPEvent_t eNetworkTxEvent. - FreeRTOS_Stream_Buffer.h removing static xStreamBufferIsEmpty() and xStreamBufferIsFull(). - FreeRTOSConfigDefaults.h provides default ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS. - other type changes.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* FreeRTOS+TCP V2.0.11
|
||||
* FreeRTOS+TCP V2.2.0
|
||||
* Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
@ -580,8 +580,24 @@ NetworkBufferDescriptor_t *pxNetworkBuffer;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( xIsCallingFromIPTask() != 0 )
|
||||
{
|
||||
/* Only the IP-task is allowed to call this function directly. */
|
||||
xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
IPStackEvent_t xSendEvent;
|
||||
|
||||
xNetworkInterfaceOutput( pxNetworkBuffer, pdTRUE );
|
||||
/* Send a message to the IP-task to send this ARP packet. */
|
||||
xSendEvent.eEventType = eNetworkTxEvent;
|
||||
xSendEvent.pvData = ( void * ) pxNetworkBuffer;
|
||||
if( xSendEventStructToIPTask( &xSendEvent, ( TickType_t ) portMAX_DELAY ) == pdFAIL )
|
||||
{
|
||||
/* Failed to send the message, so release the network buffer. */
|
||||
vReleaseNetworkBufferAndDescriptor( pxNetworkBuffer );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -589,6 +605,12 @@ void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffe
|
||||
{
|
||||
ARPPacket_t *pxARPPacket;
|
||||
|
||||
/* Buffer allocation ensures that buffers always have space
|
||||
for an ARP packet. See buffer allocation implementations 1
|
||||
and 2 under portable/BufferManagement. */
|
||||
configASSERT( pxNetworkBuffer );
|
||||
configASSERT( pxNetworkBuffer->xDataLength >= sizeof(ARPPacket_t) );
|
||||
|
||||
pxARPPacket = ( ARPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer;
|
||||
|
||||
/* memcpy the const part of the header information into the correct
|
||||
|
Reference in New Issue
Block a user