mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Update TimerDemo.c to test the new vTimerSetTimerID() function.
Update WinPCap NetworkInterface.c for FreeRTOS+UDP to correctly store a pointer to the network buffer structure at the beginning of the network buffer.
This commit is contained in:
parent
03213b9e4a
commit
d39c0d5926
6 changed files with 62 additions and 19 deletions
|
@ -630,6 +630,7 @@ static uint8_t *prvCreatePartDHCPMessage( struct freertos_sockaddr *pxAddress, x
|
|||
xDHCPMessage_t *pxDHCPMessage;
|
||||
const size_t xRequiredBufferSize = sizeof( xDHCPMessage_t ) + xOptionsArraySize;
|
||||
uint8_t *pucUDPPayloadBuffer;
|
||||
static uint8_t ucUseBroadcastFlag = pdFALSE;
|
||||
|
||||
/* Get a buffer. This uses a maximum delay, but the delay will be capped
|
||||
to ipconfigMAX_SEND_BLOCK_TIME_TICKS so the return value still needs to be
|
||||
|
@ -649,7 +650,19 @@ uint8_t *pucUDPPayloadBuffer;
|
|||
pxDHCPMessage->ucAddressLength = dhcpETHERNET_ADDRESS_LENGTH;
|
||||
pxDHCPMessage->ulTransactionID = ulTransactionId;
|
||||
pxDHCPMessage->ulDHCPCookie = dhcpCOOKIE;
|
||||
pxDHCPMessage->usFlags = dhcpBROADCAST;
|
||||
|
||||
/* For maximum possibility of success, alternate between broadcast and non
|
||||
broadcast. */
|
||||
ucUseBroadcastFlag = !ucUseBroadcastFlag;
|
||||
if( ucUseBroadcastFlag == pdTRUE )
|
||||
{
|
||||
pxDHCPMessage->usFlags = dhcpBROADCAST;
|
||||
}
|
||||
else
|
||||
{
|
||||
pxDHCPMessage->usFlags = 0;
|
||||
}
|
||||
|
||||
memcpy( ( void * ) &( pxDHCPMessage->ucClientHardwareAddress[ 0 ] ), ( void * ) pxMACAddress, sizeof( xMACAddress_t ) );
|
||||
|
||||
/* Copy in the const part of the options options. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue