Real time embedded FreeRTOS RSS feed 
Homepage FreeRTOS+ Products FreeRTOS Labs Support Forum Contact / Enquiries
FreeRTOS+UDP was removed from the FreeRTOS kernel download from FreeRTOS V10.1.0. See the FreeRTOS+TCP stack, which can be configured for UDP only use, as an alternative.

FreeRTOS_GetUDPPayloadBuffer()

[FreeRTOS Embedded IP Stack API]

FreeRTOS_sockets.h
void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );
		

Obtains a buffer from the IP stack for use with the zero copy interface.

The zero copy interface for transmitting data is described on the FreeRTOS_sendto() documentation page.

Parameters:

xRequestedSizeBytes   The size of the buffer being requested. The size is specified in bytes.

xBlockTimeTicks   The maximum time the calling task is prepared to wait for a buffer if one is not immediately available.

If a buffer is not available then the calling task will be held in the Blocked state (so other tasks can execute) until either a buffer becomes available or the block time expires.

The block time is specified in ticks. Milliseconds can be converted to ticks by dividing the time in milliseconds by portTICK_PERIOD_MS.

To prevent deadlocks the maximum block time is capped to ipconfigMAX_SEND_BLOCK_TIME_TICKS. ipconfigMAX_SEND_BLOCK_TIME_TICKS is defined in FreeRTOSIPConfig.h

Returns:

If a buffer was obtained then a pointer to the obtained buffer is returned.

If a buffer could not be obtained then NULL is returned.

Example usage:

The FreeRTOS_sendto() documentation page contains an example zero copy send operation that includes a call to FreeRTOS_GetUDPPayloadBuffer().


[ Back to the top ]    [ About FreeRTOS ]    [ Privacy ]    [ FreeRTOS+ Sitemap ]    [ Main FreeRTOS Sitemap ]    [ ]


Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.