mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-23 21:27:45 -04:00
Sync FreeRTOS-Labs -CLI -TCP -Trace with the version in FreeRTOS-Plus.
Projects under FreeRTOS-Labs directory are in beta, developers updating projects please make sure you are using the correct version of -CLI -TCP -Trace. If you must edit -CLI -TCP and -Trace, please ensure the copies are synced.
This commit is contained in:
parent
ec6f3d77c3
commit
9fdfbf33e9
58 changed files with 4129 additions and 4415 deletions
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* FreeRTOS+TCP 191100 experimental
|
||||
* Copyright (C) 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
* 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
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue