void FreeRTOS_SetAddressConfiguration( const uint32_t * pulIPAddress,
const uint32_t * pulNetMask,
const uint32_t * pulGatewayAddress,
const uint32_t * pulDNSServerAddress );
This function can be used to update the IPv4 address and netmask, the gateway address, and the DNS server address
used by the FreeRTOS+TCP device after the TCP stack has already been initialized with a call to
A pointer to the 32-bit IPv4 address, in network endian order, that the device should use.
This pointer can be NULL if you want to leave the IP Address unchanged.
A pointer to the 32-bit IPv4 netmask, in network endian order, that the device should use.
This pointer can be NULL if you want to leave the IP netmask unchanged.
A pointer to the 32-bit IPv4
address, in network endian order, that the device should use. This pointer can be NULL
if you want to leave the device gateway address unchanged.
A pointer to the 32-bit IPv4 DNS server address that the device should use. This pointer
can be NULL if you want to leave the DNS server IP Address in use unchanged.
This function is not thread safe and should be used with the
pair. A call to this function should be made only when there is no active connection (either UDP or TCP), or else that
connection might be severed.
void vUserTask( void *pvParameters )
uint32_t ulHostEndianIPAddress = 0xC0A8010C;
uint32_t ulNetworkEndianIPAddress = FreeRTOS_htonl( ulHostEndianIPAddress );
uint32_t ulHostEndianGatewayAddress = 0xC0A80101;
uint32_t ulNetworkEndianGatewayAddress = FreeRTOS_htonl( ulHostEndianGatewayAddress );
uint32_t ulHostEndianDNSServerAddress = 0xD043DEDE;
uint32_t ulNetworkEndianDNSServerAddress = FreeRTOS_htonl( ulHostEndianDNSServerAddress );
BaseType_t xUserWantsToUpdateConfiguration = pdFALSE;
( void ) pvParameters;
for( ; ; )
if( xUserWantsToUpdateConfiguration == pdTRUE )
FreeRTOS_SetAddressConfiguration( &ulNetworkEndianIPAddress ,
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.