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.

FreeRTOS_GetRemoteAddress()

[FreeRTOS-Plus-TCP API Reference]

FreeRTOS_sockets.h
BaseType_t FreeRTOS_GetRemoteAddress( Socket_t xSocket, struct freertos_sockaddr *pxAddress );
		

Returns the remote IP address and port of a connected TCP socket.

Parameters:

xSocket   The socket being queried.

pxAddress   A freertos_sockaddr structure in which the remote address details are returned.

Returns:

If the socket referenced by the xSocket parameter is not a TCP socket then -pdFREERTOS_ERRNO_EINVAL is returned.

In all other cases sizeof( freertos_sockaddr ) is returned, and pxAddress->sin_addr will be set to the IP address of the remote connected socket, and pxAddress->sin_port will be set to the TCP port number of the remote connected socket.

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