summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c
diff options
context:
space:
mode:
authorTony Josi <tonyjosi@amazon.com>2023-05-12 10:39:24 +0000
committerGitHub <noreply@github.com>2023-05-12 16:09:24 +0530
commitcc463b15ed0766aef8ba3c3ef6084cc6e835e61a (patch)
tree0e28e390b630d40df5fd2248b39e66ef9c370f5e /FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c
parentc6ebab30feb8d382938348abdfaf577df2ded06b (diff)
downloadfreertos-git-devIPv6.tar.gz
TCP demo changes post build separation (#1011)devIPv6
* adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash
Diffstat (limited to 'FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c')
-rw-r--r--FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c
index 08958605f..5ed5a060c 100644
--- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c
+++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_TCP_Minimal_Windows_Simulator/DemoTasks/SimpleUDPClientAndServer.c
@@ -125,6 +125,7 @@ const TickType_t x150ms = 150UL / portTICK_PERIOD_MS;
xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port );
+ xDestinationAddress.sin_family = FREERTOS_AF_INET;
for( ;; )
{
@@ -183,6 +184,7 @@ Socket_t xListeningSocket;
so the IP address is valid here. */
xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );
+ xBindAddress.sin_family = FREERTOS_AF_INET;
/* Bind the socket to the port that the client task will send to. */
FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );
@@ -244,6 +246,7 @@ const size_t xStringLength = strlen( pcStringToSend ) + 15;
xDestinationAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xDestinationAddress.sin_port = FreeRTOS_htons( xDestinationAddress.sin_port );
+ xDestinationAddress.sin_family = FREERTOS_AF_INET;
for( ;; )
{
@@ -352,6 +355,7 @@ Socket_t xListeningSocket;
xBindAddress.sin_port = ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL;
xBindAddress.sin_port = FreeRTOS_htons( xBindAddress.sin_port );
+ xBindAddress.sin_family = FREERTOS_AF_INET;
/* Bind the socket to the port that the client task will send to. */
FreeRTOS_bind( xListeningSocket, &xBindAddress, sizeof( xBindAddress ) );