summaryrefslogtreecommitdiff
path: root/FreeRTOS-Plus/Demo/Common
diff options
context:
space:
mode:
Diffstat (limited to 'FreeRTOS-Plus/Demo/Common')
-rw-r--r--FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c8
-rw-r--r--FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c22
-rw-r--r--FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c20
-rw-r--r--FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c5
-rw-r--r--FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c8
-rw-r--r--FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c2
6 files changed, 42 insertions, 23 deletions
diff --git a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c
index ec75c77af..9fb2feed1 100644
--- a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c
+++ b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/Common/FreeRTOS_TCP_server.c
@@ -1,6 +1,6 @@
/*
- * FreeRTOS+TCP V2.0.3
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * FreeRTOS V202212.00
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -19,8 +19,9 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * https://aws.amazon.com/freertos
* https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
*/
@@ -102,6 +103,7 @@ SocketSet_t xSocketSet;
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
xAddress.sin_port = FreeRTOS_htons( xPortNumber );
+ xAddress.sin_family = FREERTOS_AF_INET;
FreeRTOS_bind( xSocket, &xAddress, sizeof( xAddress ) );
FreeRTOS_listen( xSocket, pxConfigs[ xIndex ].xBackLog );
diff --git a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c
index 59e21b7e5..f0f251beb 100644
--- a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c
+++ b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/FTP/FreeRTOS_FTP_server.c
@@ -1,11 +1,6 @@
/*
- *!
- *! The protocols implemented in this file are intended to be demo quality only,
- *! and not for production devices.
- *!
- *
- * FreeRTOS+TCP V2.0.3
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * FreeRTOS V202212.00
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,8 +19,16 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * https://aws.amazon.com/freertos
* https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
+ */
+
+/*
+ *!
+ *! The protocols implemented in this file are intended to be demo quality only,
+ *! and not for production devices.
+ *!
*/
/* Standard includes. */
@@ -874,6 +877,7 @@ BaseType_t xResult;
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
xAddress.sin_port = FreeRTOS_htons( 0 ); /* Bind to any available port number */
+ xAddress.sin_family = FREERTOS_AF_INET;
BaseType_t xBindResult;
xBindResult = FreeRTOS_bind( xSocket, &xAddress, sizeof( xAddress ) );
@@ -963,6 +967,8 @@ BaseType_t xResult;
xAddress.sin_port = FreeRTOS_htons( pxClient->usClientPort );
+ xAddress.sin_family = FREERTOS_AF_INET;
+
/* Start an active connection for this data socket */
xResult = FreeRTOS_connect( pxClient->xTransferSocket, &xAddress, sizeof( xAddress ) );
}
diff --git a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c
index 1bf86697e..93d90e5bf 100644
--- a/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c
+++ b/FreeRTOS-Plus/Demo/Common/Demo_IP_Protocols/NTP/NTPDemo.c
@@ -1,11 +1,6 @@
/*
- *!
- *! The protocols implemented in this file are intended to be demo quality only,
- *! and not for production devices.
- *!
- *
- * FreeRTOS+TCP V2.0.3
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * FreeRTOS V202212.00
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -24,11 +19,17 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
- * https://aws.amazon.com/freertos
* https://www.FreeRTOS.org
+ * https://github.com/FreeRTOS
+ *
*/
/*
+ *!
+ *! The protocols implemented in this file are intended to be demo quality only,
+ *! and not for production devices.
+ *!
+ *
* NTPDemo.c
*
* An example of how to lookup a domain using DNS
@@ -160,6 +161,7 @@ void vStartNTPTask( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority )
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
xAddress.sin_port = FreeRTOS_htons( NTP_PORT );
+ xAddress.sin_family = FREERTOS_AF_INET;
FreeRTOS_bind( xUDPSocket, &xAddress, sizeof( xAddress ) );
FreeRTOS_setsockopt( xUDPSocket, 0, FREERTOS_SO_RCVTIMEO, &xReceiveTimeOut, sizeof( xReceiveTimeOut ) );
@@ -409,6 +411,8 @@ struct freertos_sockaddr xAddress;
FreeRTOS_inet_ntoa( xAddress.sin_addr, pcBuf );
}
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
+
+ xAddress.sin_family = FREERTOS_AF_INET;
FreeRTOS_printf( ( "Sending UDP message to %s:%u\n",
pcBuf,
diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c
index 0be8f5c9c..10730610a 100644
--- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c
+++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c
@@ -1,6 +1,6 @@
/*
* FreeRTOS V202212.00
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -20,7 +20,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
- * https://aws.amazon.com/freertos
+ * https://github.com/FreeRTOS
*
*/
@@ -190,6 +190,7 @@ xSocket_t xSocket = FREERTOS_INVALID_SOCKET;
/* Set family and port. */
xServer.sin_port = FreeRTOS_htons( usPort );
+ xServer.sin_family = FREERTOS_AF_INET;
/* Bind the address to the socket. */
if( FreeRTOS_bind( xSocket, &xServer, sizeof( xServer ) ) == -1 )
diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c
index 6cba51074..c40e350e2 100644
--- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c
+++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c
@@ -1,6 +1,6 @@
/*
* FreeRTOS V202212.00
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
+ * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
@@ -20,7 +20,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* https://www.FreeRTOS.org
- * https://aws.amazon.com/freertos
+ * https://github.com/FreeRTOS
*
*/
@@ -147,6 +147,8 @@ uint32_t xAddressLength = sizeof( xEchoServerAddress );
}
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
+ xEchoServerAddress.sin_family = FREERTOS_AF_INET;
+
for( ;; )
{
/* Create a socket. */
@@ -267,6 +269,8 @@ const size_t xBufferLength = strlen( pcStringToSend ) + 15;
}
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
+ xEchoServerAddress.sin_family = FREERTOS_AF_INET;
+
for( ;; )
{
/* Create a socket. */
diff --git a/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c b/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c
index f9122e3d9..0b2244381 100644
--- a/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c
+++ b/FreeRTOS-Plus/Demo/Common/Logging/windows/Logging_WinSim.c
@@ -191,6 +191,8 @@ void vLoggingInit( BaseType_t xLogToStdout,
xPrintUDPAddress.sin_addr = ulRemoteIPAddress;
}
#endif /* defined( ipconfigIPv4_BACKWARD_COMPATIBLE ) && ( ipconfigIPv4_BACKWARD_COMPATIBLE == 0 ) */
+
+ xPrintUDPAddress.sin_family = FREERTOS_AF_INET;
}