Download FreeRTOS
 

Quality RTOS & Embedded Software

LIBRARIES
WHAT'S NEW
Simplifying Authenticated Cloud Connectivity for Any Device.
Designing an energy efficient and cloud-connected IoT solution with CoAP.
Introducing FreeRTOS Kernel version 11.0.0:
FreeRTOS Roadmap and Code Contribution process.
OPC-UA over TSN with FreeRTOS.

ulApplicationGetNextSequenceNumber()

[FreeRTOS-Plus-TCP API Reference]

FreeRTOS_sockets.h

uint32_t ulApplicationGetNextSequenceNumber( uint32_t ulSourceAddress,
                                             uint16_t usSourcePort,
                                             uint32_t ulDestinationAddress,
                                             uint16_t usDestinationPort );

ulApplicationGetNextSequenceNumber is an application defined hook (or callback) function that is called by the FreeRTOS-Plus-TCP stack to get a difficult to predict sequence number for the 4-value address tuple for a TCP connection.

Callback functions are implemented by the application writer, but called by the TCP/IP stack. The prototype of the callback function must exactly match the prototype above (including the function name).

Parameters:

ulSourceAddress  

The IPv4 address of the device.

usSourcePort  

The port number of the device to which the TCP socket is bound.

ulDestinationAddress  

The IPv4 address of the peer.

usDestinationPort  

The port of the peer to which the TCP connection is being made.

Return value:

A 32-bit hard to predict number should be returned by this hook to be used as the initial sequence number for the TCP connection.

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