From 1a6e94b5a68e34b1d8919e34b3d6400e205145b1 Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Tue, 14 Mar 2023 12:51:10 -0700 Subject: [PATCH 01/10] cmake: Remove add_subdirectory( cbmc ) call CBMC proofs cannot currently be run using CMake. fixes #753 --- test/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 97d4459107..fb71ba3463 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,7 +1,6 @@ add_subdirectory(build-combination) if(FREERTOS_PLUS_TCP_BUILD_TEST) - add_subdirectory(cbmc) add_subdirectory(Coverity) add_subdirectory(unit-test) endif() From 63fe99f9c628b1ce34f895eac0429662911d8acb Mon Sep 17 00:00:00 2001 From: Paul Bartell Date: Tue, 14 Mar 2023 13:02:44 -0700 Subject: [PATCH 02/10] FreeRTOS_IP.h: Fix build error introduced by 55658e1 in FreeRTOS-Kernel --- source/include/FreeRTOS_IP.h | 27 ++++++++++++++++++------- test/unit-test/CMakeLists.txt | 38 ++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 14 deletions(-) diff --git a/source/include/FreeRTOS_IP.h b/source/include/FreeRTOS_IP.h index 14d54956e7..ef2de2d3d2 100644 --- a/source/include/FreeRTOS_IP.h +++ b/source/include/FreeRTOS_IP.h @@ -277,15 +277,28 @@ uint32_t FreeRTOS_round_down( uint32_t a, #define pdMS_TO_MIN_TICKS( xTimeInMs ) ipMS_TO_MIN_TICKS( xTimeInMs ) #ifndef pdTRUE_SIGNED - /* Temporary solution: eventually the defines below will appear in 'Source\include\projdefs.h' */ - #define pdTRUE_SIGNED pdTRUE - #define pdFALSE_SIGNED pdFALSE - #define pdTRUE_UNSIGNED ( 1U ) + #define pdTRUE_SIGNED pdTRUE +#endif /* pdTRUE_SIGNED */ + +#ifndef pdFALSE_SIGNED + #define pdFALSE_SIGNED pdFALSE +#endif /* pdFALSE_SIGNED */ + +#ifndef pdTRUE_UNSIGNED + #define pdTRUE_UNSIGNED ( 1U ) +#endif /* pdTRUE_UNSIGNED */ + +#ifndef pdFALSE_UNSIGNED #define pdFALSE_UNSIGNED ( 0U ) -#endif +#endif /* pdFALSE_UNSIGNED */ + +#ifndef ipTRUE_BOOL + #define ipTRUE_BOOL ( 1 == 1 ) +#endif /* ipTRUE_BOOL */ -#define ipTRUE_BOOL ( 1 == 1 ) -#define ipFALSE_BOOL ( 1 == 2 ) +#ifndef ipFALSE_BOOL + #define ipFALSE_BOOL ( 1 == 2 ) +#endif /* ipFALSE_BOOL */ /* * FULL, UP-TO-DATE AND MAINTAINED REFERENCE DOCUMENTATION FOR ALL THESE diff --git a/test/unit-test/CMakeLists.txt b/test/unit-test/CMakeLists.txt index a676b71d6f..6371f92362 100644 --- a/test/unit-test/CMakeLists.txt +++ b/test/unit-test/CMakeLists.txt @@ -126,9 +126,23 @@ foreach( file ${TCP_INCLUDES} ) execute_process( COMMAND mv ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp2.h ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp.h ) endif() + + # Use this tool to process all conditional declarations. if(${MODIFIED_FILE} STREQUAL "FreeRTOS_Routing" OR ${MODIFIED_FILE} STREQUAL "FreeRTOS_IP_Private" ) - execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT -UpdTRUE_SIGNED -UFreeRTOS_htonl -D__COVERITY__ -DTEST -DipconfigUSE_IPv6 -DipconfigUSE_RA -I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src + execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT + -UpdTRUE_SIGNED + -UpdFALSE_SIGNED + -UpdTRUE_UNSIGNED + -UpdFALSE_UNSIGNED + -UipTRUE_BOOL + -UipFALSE_BOOL + -UFreeRTOS_htonl + -D__COVERITY__ + -DTEST + -DipconfigUSE_IPv6 + -DipconfigUSE_RA + -I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src -I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/include -I ${UNIT_TEST_DIR}/ConfigFiles -I ${MODULE_ROOT_DIR}/source/include @@ -139,12 +153,22 @@ foreach( file ${TCP_INCLUDES} ) OUTPUT_QUIET ERROR_QUIET ) else() - execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT -UpdTRUE_SIGNED -UFreeRTOS_htonl -D__COVERITY__ -DTEST -I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src - -I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/include - -I ${UNIT_TEST_DIR}/ConfigFiles - -I ${MODULE_ROOT_DIR}/source/include - -I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/portable/ThirdParty/GCC/Posix - ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp.h + execute_process( COMMAND unifdefall -U${Guard} -USEND_REPEATED_COUNT + -UpdTRUE_SIGNED + -UpdFALSE_SIGNED + -UpdTRUE_UNSIGNED + -UpdFALSE_UNSIGNED + -UipTRUE_BOOL + -UipFALSE_BOOL + -UFreeRTOS_htonl + -D__COVERITY__ + -DTEST + -I ${MODULE_ROOT_DIR}/tools/CMock/vendor/unity/src + -I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/include + -I ${UNIT_TEST_DIR}/ConfigFiles + -I ${MODULE_ROOT_DIR}/source/include + -I ${MODULE_ROOT_DIR}/test/FreeRTOS-Kernel/portable/ThirdParty/GCC/Posix + ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}_tmp.h WORKING_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_FILE ${CMAKE_BINARY_DIR}/Annexed_TCP/${MODIFIED_FILE}.h OUTPUT_QUIET From ded3d27f62528f2d20b8cdcf837e4cfd9264a5ef Mon Sep 17 00:00:00 2001 From: Kody Stribrny <89810515+kstribrnAmzn@users.noreply.github.com> Date: Tue, 21 Mar 2023 09:32:59 -0700 Subject: [PATCH 03/10] Correct GCC warnings (#798) * Correct GCC warnings Corrects warnings with current GCC flags for GCC 7.5.0. The only suppressed warning pertains to function to object pointer conversion which is required and common for socket callbacks. * PR feedback --------- Co-authored-by: Ubuntu Co-authored-by: Nikhil Kamath <110539926+amazonKamath@users.noreply.github.com> --- CMakeLists.txt | 7 +--- source/CMakeLists.txt | 7 ++-- source/FreeRTOS_IP.c | 2 +- source/FreeRTOS_TCP_IP_IPV4.c | 34 +++++++++++-------- source/FreeRTOS_UDP_IPv4.c | 3 +- .../BufferManagement/BufferAllocation_2.c | 3 +- .../build-combination/Common/FreeRTOSConfig.h | 11 ++++-- 7 files changed, 35 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index af76aa226c..fb77d37752 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -161,11 +161,6 @@ else() endif() endif() -######################################################################## -# Requirements -set(CMAKE_C_STANDARD 90) # Note FreeRTOS-Kernel uses C99 constructs. -set(CMAKE_C_STANDARD_REQUIRED ON) - ######################################################################## # Overall Compile Options # Note the compile option strategy is to error on everything and then @@ -195,10 +190,10 @@ add_compile_options( $<$:-Wall> $<$:-Wextra> - $<$:-Wpedantic> $<$:-Werror> $<$:-Wunused-variable> $<$:-Weverything> + $<$:-Wpedantic> # TODO: Add in other Compilers here. ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 5e096d5f85..dad2e11689 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,5 +1,7 @@ add_library( freertos_plus_tcp STATIC ) +set_property(TARGET freertos_plus_tcp PROPERTY C_STANDARD 90) + target_sources( freertos_plus_tcp PRIVATE include/FreeRTOSIPConfigDefaults.h @@ -108,10 +110,7 @@ target_compile_options( freertos_plus_tcp $<$:-Wno-shorten-64-to-32> $<$:-Wno-sign-conversion> $<$:-Wno-unused-macros> - $<$:-Wno-unused-but-set-variable> - $<$:-Wno-unused-parameter> - $<$:-Wno-unused-variable> - $<$:-Wno-pedantic> + $<$:-Wno-unused-parameter> ) target_link_libraries( freertos_plus_tcp diff --git a/source/FreeRTOS_IP.c b/source/FreeRTOS_IP.c index 180bb221d1..49d49addfe 100755 --- a/source/FreeRTOS_IP.c +++ b/source/FreeRTOS_IP.c @@ -1254,10 +1254,10 @@ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, static uint16_t usSequenceNumber = 0; uint8_t * pucChar; size_t uxTotalLength; + BaseType_t xEnoughSpace; IPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; uxTotalLength = uxNumberOfBytesToSend + sizeof( ICMPPacket_t ); - BaseType_t xEnoughSpace; if( uxNumberOfBytesToSend < ( ipconfigNETWORK_MTU - ( sizeof( IPHeader_t ) + sizeof( ICMPHeader_t ) ) ) ) { diff --git a/source/FreeRTOS_TCP_IP_IPV4.c b/source/FreeRTOS_TCP_IP_IPV4.c index a56f4d6678..4ff2e079ac 100644 --- a/source/FreeRTOS_TCP_IP_IPV4.c +++ b/source/FreeRTOS_TCP_IP_IPV4.c @@ -98,28 +98,32 @@ { /* Function might modify the parameter. */ NetworkBufferDescriptor_t * pxNetworkBuffer = pxDescriptor; + FreeRTOS_Socket_t * pxSocket; + uint16_t ucTCPFlags; + uint32_t ulLocalIP; + uint16_t usLocalPort; + uint16_t usRemotePort; + IP_Address_t ulRemoteIP; + uint32_t ulSequenceNumber; + uint32_t ulAckNumber; + BaseType_t xResult = pdPASS; + + const IPHeader_t * pxIPHeader; configASSERT( pxNetworkBuffer != NULL ); configASSERT( pxNetworkBuffer->pucEthernetBuffer != NULL ); - /* Map the buffer onto a ProtocolHeaders_t struct for easy access to the fields. */ - /* MISRA Ref 11.3.1 [Misaligned access] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ /* coverity[misra_c_2012_rule_11_3_violation] */ - const ProtocolHeaders_t * pxProtocolHeaders = ( ( const ProtocolHeaders_t * ) - &( pxNetworkBuffer->pucEthernetBuffer[ ipSIZE_OF_ETH_HEADER + uxIPHeaderSizePacket( pxNetworkBuffer ) ] ) ); - FreeRTOS_Socket_t * pxSocket; - uint16_t ucTCPFlags = pxProtocolHeaders->xTCPHeader.ucTCPFlags; - uint32_t ulLocalIP; - uint16_t usLocalPort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usDestinationPort ); - uint16_t usRemotePort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usSourcePort ); - IP_Address_t ulRemoteIP; - uint32_t ulSequenceNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulSequenceNumber ); - uint32_t ulAckNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulAckNr ); - BaseType_t xResult = pdPASS; - - const IPHeader_t * pxIPHeader; + pxProtocolHeaders = ( ( ProtocolHeaders_t * ) + &( pxNetworkBuffer->pucEthernetBuffer[ ipSIZE_OF_ETH_HEADER + xIPHeaderSize( pxNetworkBuffer ) ] ) ); + + ucTCPFlags = pxProtocolHeaders->xTCPHeader.ucTCPFlags; + usLocalPort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usDestinationPort ); + usRemotePort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usSourcePort ); + ulSequenceNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulSequenceNumber ); + ulAckNumber = FreeRTOS_ntohl( pxProtocolHeaders->xTCPHeader.ulAckNr ); /* Check for a minimum packet size. */ if( pxNetworkBuffer->xDataLength < ( ipSIZE_OF_ETH_HEADER + uxIPHeaderSizePacket( pxNetworkBuffer ) + ipSIZE_OF_TCP_HEADER ) ) diff --git a/source/FreeRTOS_UDP_IPv4.c b/source/FreeRTOS_UDP_IPv4.c index b286ce9890..67f6d26f8b 100644 --- a/source/FreeRTOS_UDP_IPv4.c +++ b/source/FreeRTOS_UDP_IPv4.c @@ -337,6 +337,7 @@ BaseType_t xProcessReceivedUDPPacket_IPv4( NetworkBufferDescriptor_t * pxNetwork { BaseType_t xReturn = pdPASS; FreeRTOS_Socket_t * pxSocket; + const UDPPacket_t * pxUDPPacket; configASSERT( pxNetworkBuffer != NULL ); configASSERT( pxNetworkBuffer->pucEthernetBuffer != NULL ); @@ -346,7 +347,7 @@ BaseType_t xProcessReceivedUDPPacket_IPv4( NetworkBufferDescriptor_t * pxNetwork /* MISRA Ref 11.3.1 [Misaligned access] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ /* coverity[misra_c_2012_rule_11_3_violation] */ - const UDPPacket_t * pxUDPPacket = ( ( const UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer ); + pxUDPPacket = ( ( UDPPacket_t * ) pxNetworkBuffer->pucEthernetBuffer ); const NetworkEndPoint_t * pxEndpoint = pxNetworkBuffer->pxEndPoint; /* Caller must check for minimum packet size. */ diff --git a/source/portable/BufferManagement/BufferAllocation_2.c b/source/portable/BufferManagement/BufferAllocation_2.c index 77a9a32d67..075cdf0a7b 100644 --- a/source/portable/BufferManagement/BufferAllocation_2.c +++ b/source/portable/BufferManagement/BufferAllocation_2.c @@ -73,11 +73,10 @@ #define ASSERT_CONCAT_( a, b ) a ## b #define ASSERT_CONCAT( a, b ) ASSERT_CONCAT_( a, b ) #define STATIC_ASSERT( e ) \ - ; enum { ASSERT_CONCAT( assert_line_, __LINE__ ) = 1 / ( !!( e ) ) } + enum { ASSERT_CONCAT( assert_line_, __LINE__ ) = 1 / ( !!( e ) ) } STATIC_ASSERT( ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE ); #endif - /* A list of free (available) NetworkBufferDescriptor_t structures. */ static List_t xFreeBuffersList; diff --git a/test/build-combination/Common/FreeRTOSConfig.h b/test/build-combination/Common/FreeRTOSConfig.h index 432b82b9db..9b68fb1b0d 100644 --- a/test/build-combination/Common/FreeRTOSConfig.h +++ b/test/build-combination/Common/FreeRTOSConfig.h @@ -111,13 +111,18 @@ /* The function that implements FreeRTOS printf style output, and the macro * that maps the configPRINTF() macros to that function. */ -#define configPRINTF( X ) +void vLoggingPrintf( char const * pcFormat, + ... ); + +/* The function that implements FreeRTOS printf style output, and the macro + * that maps the configPRINTF() macros to that function. */ +#define configPRINTF( X ) vLoggingPrintf X /* Non-format version thread-safe print. */ -#define configPRINT( X ) +#define configPRINT( X ) vLoggingPrintf X /* Non-format version thread-safe print. */ -#define configPRINT_STRING( X ) +#define configPRINT_STRING( X ) vLoggingPrintf X /* Application specific definitions follow. **********************************/ From 7ac0b651f1f39ec919821e73f47f36bd365fd43b Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Tue, 18 Apr 2023 04:38:00 +0000 Subject: [PATCH 04/10] Fix build error --- source/FreeRTOS_DHCPv6.c | 1 + source/FreeRTOS_Routing.c | 27 --------------------------- source/FreeRTOS_TCP_IP_IPV4.c | 3 ++- 3 files changed, 3 insertions(+), 28 deletions(-) diff --git a/source/FreeRTOS_DHCPv6.c b/source/FreeRTOS_DHCPv6.c index 6c58214ce0..d5decbf838 100644 --- a/source/FreeRTOS_DHCPv6.c +++ b/source/FreeRTOS_DHCPv6.c @@ -1094,6 +1094,7 @@ static void prvDHCPv6_subOption( uint16_t usOption, ( void ) ulIAID; ( void ) ulTime_1; ( void ) ulTime_2; + ( void ) usOption; if( pxSet->uxOptionLength > uxUsed ) { diff --git a/source/FreeRTOS_Routing.c b/source/FreeRTOS_Routing.c index 1d48c0e806..bfcd5fca25 100644 --- a/source/FreeRTOS_Routing.c +++ b/source/FreeRTOS_Routing.c @@ -1407,33 +1407,6 @@ IPv6_Type_t xIPv6_GetIPType( const IPv6_Address_t * pxAddress ) } } - #if ( ipconfigHAS_DEBUG_PRINTF != 0 ) - const char * pcName = "unknown enum"; - - switch( eResult ) - { - case eIPv6_Global: - pcName = "Global"; - break; - - case eIPv6_LinkLocal: - pcName = "LinkLocal"; - break; - - case eIPv6_SiteLocal: - pcName = "SiteLocal"; - break; - - case eIPv6_Multicast: - pcName = "Multicast"; - break; - - case eIPv6_Unknown: - pcName = "Unknown"; - break; - } - #endif /* if ( ipconfigHAS_DEBUG_PRINTF != 0 ) */ - return eResult; } /*-----------------------------------------------------------*/ diff --git a/source/FreeRTOS_TCP_IP_IPV4.c b/source/FreeRTOS_TCP_IP_IPV4.c index 4ff2e079ac..df819801cd 100644 --- a/source/FreeRTOS_TCP_IP_IPV4.c +++ b/source/FreeRTOS_TCP_IP_IPV4.c @@ -98,6 +98,7 @@ { /* Function might modify the parameter. */ NetworkBufferDescriptor_t * pxNetworkBuffer = pxDescriptor; + ProtocolHeaders_t * pxProtocolHeaders; FreeRTOS_Socket_t * pxSocket; uint16_t ucTCPFlags; uint32_t ulLocalIP; @@ -117,7 +118,7 @@ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-113 */ /* coverity[misra_c_2012_rule_11_3_violation] */ pxProtocolHeaders = ( ( ProtocolHeaders_t * ) - &( pxNetworkBuffer->pucEthernetBuffer[ ipSIZE_OF_ETH_HEADER + xIPHeaderSize( pxNetworkBuffer ) ] ) ); + &( pxNetworkBuffer->pucEthernetBuffer[ ipSIZE_OF_ETH_HEADER + uxIPHeaderSizePacket( pxNetworkBuffer ) ] ) ); ucTCPFlags = pxProtocolHeaders->xTCPHeader.ucTCPFlags; usLocalPort = FreeRTOS_htons( pxProtocolHeaders->xTCPHeader.usDestinationPort ); From f15537303cc92b2b611de890669db95a1486a720 Mon Sep 17 00:00:00 2001 From: Kody Stribrny <89810515+kstribrnAmzn@users.noreply.github.com> Date: Fri, 24 Mar 2023 15:19:54 -0700 Subject: [PATCH 05/10] Fix Clang warnings (#809) Corrects several warnings from Clang flags for Clang 13. Inspired by @phelter's bug report https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/issues/558 --- .github/lexicon.txt | 1 + CMakeLists.txt | 1 - source/CMakeLists.txt | 18 - source/FreeRTOS_ARP.c | 70 +-- source/FreeRTOS_DHCP.c | 60 +-- source/FreeRTOS_DNS.c | 46 +- source/FreeRTOS_DNS_Cache.c | 26 +- source/FreeRTOS_DNS_Networking.c | 2 +- source/FreeRTOS_DNS_Parser.c | 34 +- source/FreeRTOS_ICMP.c | 8 +- source/FreeRTOS_IP.c | 110 ++--- source/FreeRTOS_IP_Timers.c | 36 +- source/FreeRTOS_IP_Utils.c | 82 ++-- source/FreeRTOS_IPv4.c | 2 +- source/FreeRTOS_Sockets.c | 402 +++++++++--------- source/FreeRTOS_Stream_Buffer.c | 54 +-- source/FreeRTOS_TCP_IP.c | 20 +- source/FreeRTOS_TCP_Reception.c | 32 +- source/FreeRTOS_TCP_State_Handling.c | 36 +- source/FreeRTOS_TCP_Transmission.c | 62 +-- source/FreeRTOS_TCP_Utils.c | 6 +- source/FreeRTOS_TCP_WIN.c | 168 ++++---- source/FreeRTOS_Tiny_TCP.c | 50 +-- source/FreeRTOS_UDP_IPv4.c | 8 +- source/include/FreeRTOS_IP_Private.h | 4 +- .../build-combination/Common/FreeRTOSConfig.h | 2 - 26 files changed, 661 insertions(+), 679 deletions(-) diff --git a/.github/lexicon.txt b/.github/lexicon.txt index 81d2eff379..1e2df9759f 100644 --- a/.github/lexicon.txt +++ b/.github/lexicon.txt @@ -1829,6 +1829,7 @@ xlastalivetime xlastgratuitousarptime xlastround xlastsource +xleasetime xlength xlinkstatustimer xlistend diff --git a/CMakeLists.txt b/CMakeLists.txt index fb77d37752..dedcc0b400 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,6 @@ add_compile_options( $<$:-Werror> $<$:-Wunused-variable> $<$:-Weverything> - $<$:-Wpedantic> # TODO: Add in other Compilers here. ) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index dad2e11689..289aaea261 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -95,24 +95,6 @@ target_include_directories( freertos_plus_tcp SYSTEM include ) -#TODO(phelter): Investigate and fix in freertos_plus_tcp if not already fixed. -target_compile_options( freertos_plus_tcp - PRIVATE - $<$:-Wno-bad-function-cast> - $<$:-Wno-cast-qual> - $<$:-Wno-conditional-uninitialized> - $<$:-Wno-covered-switch-default> - $<$:-Wno-documentation> - $<$:-Wno-extra-semi-stmt> - $<$:-Wno-implicit-int-conversion> - $<$:-Wno-missing-noreturn> - $<$:-Wno-reserved-identifier> - $<$:-Wno-shorten-64-to-32> - $<$:-Wno-sign-conversion> - $<$:-Wno-unused-macros> - $<$:-Wno-unused-parameter> -) - target_link_libraries( freertos_plus_tcp PUBLIC freertos_config diff --git a/source/FreeRTOS_ARP.c b/source/FreeRTOS_ARP.c index 9d5d93e770..80fb3be57e 100644 --- a/source/FreeRTOS_ARP.c +++ b/source/FreeRTOS_ARP.c @@ -132,7 +132,7 @@ static TickType_t xLastGratuitousARPTime = 0U; /** * @brief Process the ARP packets. * - * @param[in] pxNetworkBuffer: : The network buffer with the packet to be processed. + * @param[in] pxNetworkBuffer The network buffer with the packet to be processed. * * @return An enum which says whether to return the frame or to release it. */ @@ -320,9 +320,9 @@ eFrameProcessingResult_t eARPProcessPacket( const NetworkBufferDescriptor_t * px /** * @brief Process an ARP request packets. * - * @param[in] pxARPFrame: the complete ARP-frame. - * @param[in] pxTargetEndPoint: the end-point that handles the peer's address. - * @param[in] ulSenderProtocolAddress: the IP-address of the sender. + * @param[in] pxARPFrame the complete ARP-frame. + * @param[in] pxTargetEndPoint the end-point that handles the peer's address. + * @param[in] ulSenderProtocolAddress the IP-address of the sender. * */ static void vARPProcessPacketRequest( ARPPacket_t * pxARPFrame, @@ -395,9 +395,9 @@ static void vARPProcessPacketRequest( ARPPacket_t * pxARPFrame, /** * @brief A device has sent an ARP reply, process it. - * @param[in] pxARPFrame: The ARP packet received. - * @param[in] pxTargetEndPoint: The end-point on which it is received. - * @param[in] ulSenderProtocolAddress: The IPv4 address involved. + * @param[in] pxARPFrame The ARP packet received. + * @param[in] pxTargetEndPoint The end-point on which it is received. + * @param[in] ulSenderProtocolAddress The IPv4 address involved. */ static void vARPProcessPacketReply( const ARPPacket_t * pxARPFrame, NetworkEndPoint_t * pxTargetEndPoint, @@ -452,7 +452,7 @@ static void vARPProcessPacketReply( const ARPPacket_t * pxARPFrame, /** * @brief Check whether an IP address is in the ARP cache. * - * @param[in] ulAddressToLookup: The 32-bit representation of an IP address to + * @param[in] ulAddressToLookup The 32-bit representation of an IP address to * check for. * * @return When the IP-address is found: pdTRUE, else pdFALSE. @@ -487,7 +487,7 @@ BaseType_t xIsIPInARPCache( uint32_t ulAddressToLookup ) /** * @brief Check whether a packet needs ARP resolution if it is on local subnet. If required send an ARP request. * - * @param[in] pxNetworkBuffer: The network buffer with the packet to be checked. + * @param[in] pxNetworkBuffer The network buffer with the packet to be checked. * * @return pdTRUE if the packet needs ARP resolution, pdFALSE otherwise. */ @@ -574,7 +574,7 @@ BaseType_t xCheckRequiresARPResolution( NetworkBufferDescriptor_t * pxNetworkBuf /** * @brief Remove an ARP cache entry that matches with .pxMACAddress. * - * @param[in] pxMACAddress: Pointer to the MAC address whose entry shall + * @param[in] pxMACAddress Pointer to the MAC address whose entry shall * be removed. * @return When the entry was found and remove: the IP-address, otherwise zero. */ @@ -605,11 +605,11 @@ BaseType_t xCheckRequiresARPResolution( NetworkBufferDescriptor_t * pxNetworkBuf /** * @brief Add/update the ARP cache entry MAC-address to IP-address mapping. * - * @param[in] pxMACAddress: Pointer to the MAC address whose mapping is being + * @param[in] pxMACAddress Pointer to the MAC address whose mapping is being * updated. - * @param[in] ulIPAddress: 32-bit representation of the IP-address whose mapping + * @param[in] ulIPAddress 32-bit representation of the IP-address whose mapping * is being updated. - * @param[in] pxEndPoint: The end-point stored in the table. + * @param[in] pxEndPoint The end-point stored in the table. */ void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress, @@ -692,10 +692,10 @@ void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress, /** * @brief The results of an ARP look-up shall be stored in the ARP cache. * This helper function looks up the location. - * @param[in] pxMACAddress: The MAC-address belonging to the IP-address. - * @param[in] ulIPAddress: The IP-address of the entry. - * @param[in] pxEndPoint: The end-point that will stored in the table. - * @param[out] pxLocation: The results of this search are written in this struct. + * @param[in] pxMACAddress The MAC-address belonging to the IP-address. + * @param[in] ulIPAddress The IP-address of the entry. + * @param[in] pxEndPoint The end-point that will stored in the table. + * @param[out] pxLocation The results of this search are written in this struct. */ static BaseType_t prvFindCacheEntry( const MACAddress_t * pxMACAddress, const uint32_t ulIPAddress, @@ -813,8 +813,8 @@ static BaseType_t prvFindCacheEntry( const MACAddress_t * pxMACAddress, /** * @brief Retrieve an entry from the cache table * - * @param[in] pxMACAddress: The MAC-address of the entry of interest. - * @param[out] pulIPAddress: set to the IP-address found, or unchanged when not found. + * @param[in] pxMACAddress The MAC-address of the entry of interest. + * @param[out] pulIPAddress set to the IP-address found, or unchanged when not found. * * @return Either eARPCacheMiss or eARPCacheHit. */ @@ -862,10 +862,10 @@ static BaseType_t prvFindCacheEntry( const MACAddress_t * pxMACAddress, /** * @brief Look for ulIPAddress in the ARP cache. * - * @param[in,out] pulIPAddress: Pointer to the IP-address to be queried to the ARP cache. - * @param[in,out] pxMACAddress: Pointer to a MACAddress_t variable where the MAC address + * @param[in,out] pulIPAddress Pointer to the IP-address to be queried to the ARP cache. + * @param[in,out] pxMACAddress Pointer to a MACAddress_t variable where the MAC address * will be stored, if found. - * @param[out] ppxEndPoint: Pointer to the end-point of the gateway will be stored. + * @param[out] ppxEndPoint Pointer to the end-point of the gateway will be stored. * * @return If the IP address exists, copy the associated MAC address into pxMACAddress, * refresh the ARP cache entry's age, and return eARPCacheHit. If the IP @@ -935,11 +935,11 @@ eARPLookupResult_t eARPGetCacheEntry( uint32_t * pulIPAddress, /** * @brief The IPv4 address is apparently a web-address. Find a gateway.. - * @param[in] pulIPAddress: The target IP-address. It may be replaced with the IP + * @param[in] pulIPAddress The target IP-address. It may be replaced with the IP * address of a gateway. - * @param[in] pxMACAddress: In case the MAC-address is found in cache, it will be + * @param[in] pxMACAddress In case the MAC-address is found in cache, it will be * stored to the buffer provided. - * @param[out] ppxEndPoint: The end-point of the gateway will be copy to the pointee. + * @param[out] ppxEndPoint The end-point of the gateway will be copy to the pointee. */ static eARPLookupResult_t eARPGetCacheEntryGateWay( uint32_t * pulIPAddress, MACAddress_t * const pxMACAddress, @@ -1026,12 +1026,12 @@ static eARPLookupResult_t eARPGetCacheEntryGateWay( uint32_t * pulIPAddress, /** * @brief Lookup an IP address in the ARP cache. * - * @param[in] ulAddressToLookup: The 32-bit representation of an IP address to + * @param[in] ulAddressToLookup The 32-bit representation of an IP address to * lookup. - * @param[out] pxMACAddress: A pointer to MACAddress_t variable where, if there + * @param[out] pxMACAddress A pointer to MACAddress_t variable where, if there * is an ARP cache hit, the MAC address corresponding to * the IP address will be stored. - * @param[in,out] ppxEndPoint: a pointer to the end-point will be stored. + * @param[in,out] ppxEndPoint a pointer to the end-point will be stored. * * @return When the IP-address is found: eARPCacheHit, when not found: eARPCacheMiss, * and when waiting for a ARP reply: eCantSendPacket. @@ -1173,7 +1173,7 @@ void vARPSendGratuitous( void ) /** * @brief Create and send an ARP request packet. * - * @param[in] ulIPAddress: A 32-bit representation of the IP-address whose + * @param[in] ulIPAddress A 32-bit representation of the IP-address whose * physical (MAC) address is required. */ void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ) @@ -1252,8 +1252,8 @@ void FreeRTOS_OutputARPRequest( uint32_t ulIPAddress ) * needed send an ARP request, and wait for a reply. This function is useful when * called before FreeRTOS_sendto(). * - * @param[in] ulIPAddress: The IP-address to look-up. - * @param[in] uxTicksToWait: The maximum number of clock ticks to wait for a reply. + * @param[in] ulIPAddress The IP-address to look-up. + * @param[in] uxTicksToWait The maximum number of clock ticks to wait for a reply. * * @return Zero when successful. */ @@ -1312,7 +1312,7 @@ BaseType_t xARPWaitResolution( uint32_t ulIPAddress, * @brief Generate an ARP request packet by copying various constant details to * the buffer. * - * @param[in,out] pxNetworkBuffer: Pointer to the buffer which has to be filled with + * @param[in,out] pxNetworkBuffer Pointer to the buffer which has to be filled with * the ARP request packet details. */ void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) @@ -1395,7 +1395,7 @@ void vARPGenerateRequestPacket( NetworkBufferDescriptor_t * const pxNetworkBuffe /** * @brief A call to this function will clear the ARP cache. - * @param[in] pxEndPoint: only clean entries with this end-point, or when NULL, + * @param[in] pxEndPoint only clean entries with this end-point, or when NULL, * clear the entire ARP cache. */ void FreeRTOS_ClearARP( const struct xNetworkEndPoint * pxEndPoint ) @@ -1426,8 +1426,8 @@ void FreeRTOS_ClearARP( const struct xNetworkEndPoint * pxEndPoint ) * If so, the packet will be passed to the IP-stack, who will answer it. * The function is to be called within the function xNetworkInterfaceOutput(). * - * @param[in] pxDescriptor: The network buffer which is to be checked for loop-back. - * @param[in] bReleaseAfterSend: pdTRUE: Driver is allowed to transfer ownership of descriptor. + * @param[in] pxDescriptor The network buffer which is to be checked for loop-back. + * @param[in] bReleaseAfterSend pdTRUE: Driver is allowed to transfer ownership of descriptor. * pdFALSE: Driver is not allowed to take ownership of descriptor, * make a copy of it. * diff --git a/source/FreeRTOS_DHCP.c b/source/FreeRTOS_DHCP.c index aaa2eec18f..e308ea1cd8 100644 --- a/source/FreeRTOS_DHCP.c +++ b/source/FreeRTOS_DHCP.c @@ -153,7 +153,7 @@ /** * @brief Check whether a given socket is the DHCP socket or not. * - * @param[in] xSocket: The socket to be checked. + * @param[in] xSocket The socket to be checked. * * @return If the socket given as parameter is the DHCP socket - return * pdTRUE, else pdFALSE. @@ -178,7 +178,7 @@ /** * @brief Returns the current state of a DHCP process. * - * @param[in] pxEndPoint: the end-point which is going through the DHCP process. + * @param[in] pxEndPoint the end-point which is going through the DHCP process. */ eDHCPState_t eGetDHCPState( const struct xNetworkEndPoint * pxEndPoint ) { @@ -190,8 +190,8 @@ /** * @brief Process the DHCP state machine based on current state. * - * @param[in] xReset: Is the DHCP state machine starting over? pdTRUE/pdFALSE. - * @param[in] pxEndPoint: The end-point for which the DHCP state machine should + * @param[in] xReset Is the DHCP state machine starting over? pdTRUE/pdFALSE. + * @param[in] pxEndPoint The end-point for which the DHCP state machine should * make one cycle. */ void vDHCPProcess( BaseType_t xReset, @@ -312,8 +312,8 @@ * @brief Called by vDHCPProcessEndPoint(), this function handles the state 'eWaitingOffer'. * If there is a reply, it will be examined, if there is a time-out, there may be a new * new attempt, or it will give up. - * @param[in] pxEndPoint: The end-point that is getting an IP-address from a DHCP server - * @param[in] xDoCheck: When true, the function must handle any replies. + * @param[in] pxEndPoint The end-point that is getting an IP-address from a DHCP server + * @param[in] xDoCheck When true, the function must handle any replies. * @return It returns pdTRUE in case the DHCP process must be given up. */ static BaseType_t xHandleWaitingOffer( NetworkEndPoint_t * pxEndPoint, @@ -454,8 +454,8 @@ * If there is a reply, it will be examined, if there is a time-out, there may be a new * new attempt, or it will give up. * After the acknowledge, the leasing of an IP-address will start. - * @param[in] pxEndPoint: The end-point that is getting an IP-address from a DHCP server - * @param[in] xDoCheck: When true, the function must handle any replies. + * @param[in] pxEndPoint The end-point that is getting an IP-address from a DHCP server + * @param[in] xDoCheck When true, the function must handle any replies. */ static void vHandleWaitingAcknowledge( NetworkEndPoint_t * pxEndPoint, BaseType_t xDoCheck ) @@ -544,7 +544,7 @@ /** * @brief Called by vDHCPProcessEndPoint(), this function handles the state 'eWaitingSendFirstDiscover'. * If will send a DISCOVER message to a DHCP server, and move to the next status 'eWaitingOffer'. - * @param[in] pxEndPoint: The end-point that is getting an IP-address from a DHCP server + * @param[in] pxEndPoint The end-point that is getting an IP-address from a DHCP server * @return xGivingUp: when pdTRUE, there was a fatal error and the process can not continue; */ static BaseType_t xHandleWaitingFirstDiscover( NetworkEndPoint_t * pxEndPoint ) @@ -612,7 +612,7 @@ /** * @brief Called by vDHCPProcessEndPoint(), this function handles the state 'eLeasedAddress'. * If waits until the lease must be renewed, and then send a new request. - * @param[in] pxEndPoint: The end-point that is getting an IP-address from a DHCP server + * @param[in] pxEndPoint The end-point that is getting an IP-address from a DHCP server */ static void prvHandleWaitingeLeasedAddress( NetworkEndPoint_t * pxEndPoint ) { @@ -661,10 +661,10 @@ /** * @brief Process the DHCP state machine based on current state. * - * @param[in] xReset: Is the DHCP state machine starting over? pdTRUE/pdFALSE. - * @param[in] xDoCheck: true when an incoming message is to be expected, and + * @param[in] xReset Is the DHCP state machine starting over? pdTRUE/pdFALSE. + * @param[in] xDoCheck true when an incoming message is to be expected, and * prvProcessDHCPReplies() will be called. - * @param[in] pxEndPoint: The end-point for which the DHCP state machine should + * @param[in] pxEndPoint The end-point for which the DHCP state machine should * make one cycle. */ static void vDHCPProcessEndPoint( BaseType_t xReset, @@ -830,7 +830,7 @@ /** * @brief Close the DHCP socket, but only when there are no other end-points * using it. - * @param[in] pxEndPoint: The end-point that stops using the socket. + * @param[in] pxEndPoint The end-point that stops using the socket. */ static void prvCloseDHCPSocket( const NetworkEndPoint_t * pxEndPoint ) { @@ -924,7 +924,7 @@ * @brief Initialise the DHCP state machine by creating DHCP socket and * begin the transaction. * - * @param[in] pxEndPoint: The end-point that needs DHCP. + * @param[in] pxEndPoint The end-point that needs DHCP. */ static void prvInitialiseDHCP( NetworkEndPoint_t * pxEndPoint ) { @@ -955,9 +955,9 @@ /** * @brief Called by prvProcessDHCPReplies(), which walks through an array of DHCP options, * this function will check a single option. - * @param[in] pxEndPoint: The end-point that needs an IP-address. - * @param[in] pxSet: A set of variables that describe the parsing process. - * @param[in] xExpectedMessageType: The type of message expected in the + * @param[in] pxEndPoint The end-point that needs an IP-address. + * @param[in] pxSet A set of variables that describe the parsing process. + * @param[in] xExpectedMessageType The type of message expected in the * dhcpIPv4_MESSAGE_TYPE_OPTION_CODE option. */ static void vProcessHandleOption( NetworkEndPoint_t * pxEndPoint, @@ -1123,7 +1123,7 @@ * invariant parameters and valid (non broadcast and non localhost) * IP address being assigned to the device. * - * @param[in] pxDHCPMessage: The DHCP message. + * @param[in] pxDHCPMessage The DHCP message. * * @return pdPASS if the DHCP response has correct parameters; pdFAIL otherwise. */ @@ -1154,7 +1154,7 @@ /** * @brief Check an incoming DHCP option. * - * @param[in] pxSet: A set of variables needed to parse the DHCP reply. + * @param[in] pxSet A set of variables needed to parse the DHCP reply. * * @return pdPASS: 1 when the option must be analysed, 0 when the option * must be skipped, and -1 when parsing must stop. @@ -1237,9 +1237,9 @@ /** * @brief Process the DHCP replies. * - * @param[in] xExpectedMessageType: The type of the message the DHCP state machine is expecting. + * @param[in] xExpectedMessageType The type of the message the DHCP state machine is expecting. * Messages of different type will be dropped. - * @param[in] pxEndPoint: The end-point to whom the replies are addressed. + * @param[in] pxEndPoint The end-point to whom the replies are addressed. * * @return pdPASS: if DHCP options are received correctly; pdFAIL: Otherwise. */ @@ -1349,11 +1349,11 @@ /** * @brief Create a partial DHCP message by filling in all the 'constant' fields. * - * @param[out] pxAddress: Address to be filled in. - * @param[out] xOpcode: Opcode to be filled in the packet. Will always be 'dhcpREQUEST_OPCODE'. - * @param[in] pucOptionsArray: The options to be added to the packet. - * @param[in,out] pxOptionsArraySize: Byte count of the options. Its value might change. - * @param[in] pxEndPoint: The end-point for which the request will be sent. + * @param[out] pxAddress Address to be filled in. + * @param[out] xOpcode Opcode to be filled in the packet. Will always be 'dhcpREQUEST_OPCODE'. + * @param[in] pucOptionsArray The options to be added to the packet. + * @param[in,out] pxOptionsArraySize Byte count of the options. Its value might change. + * @param[in] pxEndPoint The end-point for which the request will be sent. * * @return Ethernet buffer of the partially created DHCP packet. */ @@ -1480,7 +1480,7 @@ /** * @brief Create and send a DHCP request message through the DHCP socket. * - * @param[in] pxEndPoint: The end-point for which the request will be sent. + * @param[in] pxEndPoint The end-point for which the request will be sent. */ static BaseType_t prvSendDHCPRequest( NetworkEndPoint_t * pxEndPoint ) { @@ -1556,7 +1556,7 @@ /** * @brief Create and send a DHCP discover packet through the DHCP socket. * - * @param[in] pxEndPoint: the end-point for which the discover message will be sent. + * @param[in] pxEndPoint the end-point for which the discover message will be sent. * * @return: pdPASS if the DHCP discover message was sent successfully, pdFAIL otherwise. */ @@ -1645,7 +1645,7 @@ * @brief When DHCP has failed, the code can assign a Link-Layer address, and check if * another device already uses the IP-address. * - * param[in] pxEndPoint: The end-point that wants to obtain a link-layer address. + * param[in] pxEndPoint The end-point that wants to obtain a link-layer address. */ void prvPrepareLinkLayerIPLookUp( NetworkEndPoint_t * pxEndPoint ) { diff --git a/source/FreeRTOS_DNS.c b/source/FreeRTOS_DNS.c index 121bef175d..21afc325ea 100644 --- a/source/FreeRTOS_DNS.c +++ b/source/FreeRTOS_DNS.c @@ -441,7 +441,7 @@ /** * @brief Get the IP-address corresponding to the given hostname. - * @param[in] pcHostName: The hostname whose IP address is being queried. + * @param[in] pcHostName The hostname whose IP address is being queried. * @return The IP-address corresponding to the hostname. 0 is returned in * case of failure. */ @@ -453,14 +453,14 @@ /** * @brief Get the IP-address corresponding to the given hostname. - * @param[in] pcHostName: The hostname whose IP address is being queried. - * @param[in] pCallback: The callback function which will be called upon DNS response. It will be called + * @param[in] pcHostName The hostname whose IP address is being queried. + * @param[in] pCallback The callback function which will be called upon DNS response. It will be called * with pcHostName, pvSearchID and pxAddressInfo which points to address info. * The pxAddressInfo should be freed by the application once the callback * has been called by the FreeRTOS_freeaddrinfo(). * In case of timeouts pxAddressInfo can be NULL. - * @param[in] pvSearchID: Search ID for the callback function. - * @param[in] uxTimeout: Timeout for the callback function. + * @param[in] pvSearchID Search ID for the callback function. + * @param[in] uxTimeout Timeout for the callback function. * @return The IP-address corresponding to the hostname. 0 is returned in case of * failure. */ @@ -546,14 +546,14 @@ /** * @brief Check if hostname is already known. If not, call prvGetHostByName() to send a DNS request. * - * @param[in] pcHostName: The hostname whose IP address is being queried. - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in] pcHostName The hostname whose IP address is being queried. + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. * @param [in] xFamily indicate what type of record is needed: * FREERTOS_AF_INET4 or FREERTOS_AF_INET6. - * @param[in] pCallbackFunction: The callback function which will be called upon DNS response. - * @param[in] pvSearchID: Search ID for the callback function. - * @param[in] uxTimeout: Timeout for the callback function. + * @param[in] pCallbackFunction The callback function which will be called upon DNS response. + * @param[in] pvSearchID Search ID for the callback function. + * @param[in] uxTimeout Timeout for the callback function. * @return The IP-address corresponding to the hostname. */ static uint32_t prvPrepareLookup( const char * pcHostName, @@ -566,7 +566,7 @@ /** * @brief Check if hostname is already known. If not, call prvGetHostByName() to send a DNS request. - * @param[in] pcHostName: The hostname whose IP address is being queried. + * @param[in] pcHostName The hostname whose IP address is being queried. * @return The IP-address corresponding to the hostname. */ static uint32_t prvPrepareLookup( const char * pcHostName, @@ -700,7 +700,7 @@ /** * @brief Increment the field 'ucDNSIndex', which is an index in the array * of DNS addresses. - * @param[in] pxEndPoint: The end-point of which the DNS index should be + * @param[in] pxEndPoint The end-point of which the DNS index should be * incremented. */ static void prvIncreaseDNS6Index( NetworkEndPoint_t * pxEndPoint ) @@ -733,7 +733,7 @@ /** * @brief Increment the field 'ucDNSIndex', which is an index in the array * of DNS addresses. - * @param[in] pxEndPoint: The end-point of which the DNS index should be + * @param[in] pxEndPoint The end-point of which the DNS index should be * incremented. */ static void prvIncreaseDNS4Index( NetworkEndPoint_t * pxEndPoint ) @@ -1045,7 +1045,7 @@ /*! * @brief prepare the buffer before sending - * @param [in] pcHostName + * @param [in] pcHostName hostname to be looked up * @param [in] uxIdentifier matches sent and received packets * @param [in] xDNSSocket a valid socket * @param [in] xFamily indicate what type of record is needed: @@ -1155,7 +1155,7 @@ * @param [in] xDNSSocket socket * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results * will be stored. - * @param[in] xFamily: Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. + * @param[in] xFamily Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. * @param[in] uxReadTimeOut_ticks The timeout in ticks for waiting. In case the user has supplied * a call-back function, this value should be zero. * @returns ip address or zero on error @@ -1274,9 +1274,9 @@ * @param [in] pcHostName hostname to get its ip address * @param [in] uxIdentifier Identifier to match sent and received packets * @param [in] xDNSSocket socket - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. - * @param[in] xFamily: Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. + * @param[in] xFamily Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. * @param[in] uxReadTimeOut_ticks The timeout in ticks for waiting. In case the user has supplied * a call-back function, this value should be zero. * @returns ip address or zero on error @@ -1289,7 +1289,7 @@ BaseType_t xFamily, TickType_t uxReadTimeOut_ticks ) { - uint32_t ulIPAddress; + uint32_t ulIPAddress = 0; BaseType_t xAttempt; for( xAttempt = 0; xAttempt < ipconfigDNS_REQUEST_ATTEMPTS; xAttempt++ ) @@ -1319,9 +1319,9 @@ * @param[in] uxIdentifier Identifier to match sent and received packets * @param[in] uxReadTimeOut_ticks The timeout in ticks for waiting. In case the user has supplied * a call-back function, this value should be zero. - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. - * @param[in] xFamily: Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. + * @param[in] xFamily Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. * @return The IPv4 IP address for the hostname being queried. It will be zero if there is no reply. */ static uint32_t prvGetHostByName( const char * pcHostName, @@ -1371,7 +1371,7 @@ * @param[in,out] pucUDPPayloadBuffer The zero copy buffer where the DNS message will be created. * @param[in] pcHostName Hostname to be looked up. * @param[in] uxIdentifier Identifier to match sent and received packets - * @param[in] uxHostType: dnsTYPE_A_HOST ( IPv4 ) or dnsTYPE_AAAA_HOST ( IPv6 ). + * @param[in] uxHostType dnsTYPE_A_HOST ( IPv4 ) or dnsTYPE_AAAA_HOST ( IPv6 ). * @return Total size of the generated message, which is the space from the last written byte * to the beginning of the buffer. */ @@ -1486,7 +1486,7 @@ /** * @brief Perform some preliminary checks and then parse the DNS packet. - * @param[in] pxNetworkBuffer: The network buffer to be parsed. + * @param[in] pxNetworkBuffer The network buffer to be parsed. * @return Always pdFAIL to indicate that the packet was not consumed and must * be released by the caller. */ @@ -1531,7 +1531,7 @@ /** * @brief Handle an NBNS packet. - * @param[in] pxNetworkBuffer: The network buffer holding the NBNS packet. + * @param[in] pxNetworkBuffer The network buffer holding the NBNS packet. * @return pdFAIL to show that the packet was not consumed. */ uint32_t ulNBNSHandlePacket( NetworkBufferDescriptor_t * pxNetworkBuffer ) diff --git a/source/FreeRTOS_DNS_Cache.c b/source/FreeRTOS_DNS_Cache.c index a0b013a9a2..c0772cad2b 100644 --- a/source/FreeRTOS_DNS_Cache.c +++ b/source/FreeRTOS_DNS_Cache.c @@ -200,13 +200,13 @@ /** * @brief process a DNS Cache request (get, update, or insert) * - * @param[in] pcName: the name of the host - * @param[in,out] pxIP: when doing a lookup, will be set, when doing an update, + * @param[in] pcName the name of the host + * @param[in,out] pxIP when doing a lookup, will be set, when doing an update, * will be read. - * @param[in] ulTTL: Time To Live (in seconds) - * @param[in] xLookUp: pdTRUE if a look-up is expected, pdFALSE, when the DNS cache must + * @param[in] ulTTL Time To Live (in seconds) + * @param[in] xLookUp pdTRUE if a look-up is expected, pdFALSE, when the DNS cache must * be updated. - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. * @return whether the operation was successful * @post the global structure \a xDNSCache might be modified @@ -231,7 +231,7 @@ pxIP->ulIPAddress = 0U; } - ulCurrentTimeSeconds = ( xCurrentTickCount / portTICK_PERIOD_MS ) / 1000U; + ulCurrentTimeSeconds = ( uint32_t ) ( ( xCurrentTickCount / portTICK_PERIOD_MS ) / 1000U ); xResult = prvFindEntryIndex( pcName, pxIP, &uxIndex ); if( xResult == pdTRUE ) @@ -347,7 +347,7 @@ /** * @brief get entry at \p index from the cache - * @param[in] uxIndex : index in the cache + * @param[in] uxIndex index in the cache * @param[out] pxIP fill it with the result * @param[in] ulCurrentTimeSeconds current time * @param[out] ppxAddressInfo Target to store the DNS entries. @@ -407,7 +407,7 @@ /** * @brief update entry at \p index in the cache - * @param[in] uxIndex : index in the cache + * @param[in] uxIndex index in the cache * @param[in] ulTTL time to live (in seconds) * @param[in] pxIP ip to update the cache with * @param[in] ulCurrentTimeSeconds current time @@ -482,8 +482,8 @@ /** * @brief Copy DNS cache entries at uxIndex to a linked struct addrinfo. - * @param[in] uxIndex: The index from where entries must be copied. - * @param[out] ppxAddressInfo: Target to store the DNS entries. + * @param[in] uxIndex The index from where entries must be copied. + * @param[out] ppxAddressInfo Target to store the DNS entries. */ static void prvReadDNSCache( BaseType_t uxIndex, struct freertos_addrinfo ** ppxAddressInfo ) @@ -538,9 +538,9 @@ /** * @brief Lookup the given hostname in the DNS cache - * @param[in] pcHostName: THe host name to lookup - * @param[in] xFamily: IP type FREERTOS_AF_INET6 / FREERTOS_AF_INET4 - * @param[out] ppxAddressInfo: Target to store the DNS entries. + * @param[in] pcHostName THe host name to lookup + * @param[in] xFamily IP type FREERTOS_AF_INET6 / FREERTOS_AF_INET4 + * @param[out] ppxAddressInfo Target to store the DNS entries. * @returns This function returns either a valid IPv4 address, or * in case of an IPv6 lookup, it will return a non-zero. */ diff --git a/source/FreeRTOS_DNS_Networking.c b/source/FreeRTOS_DNS_Networking.c index 1406e8ef88..15c5ad5adb 100644 --- a/source/FreeRTOS_DNS_Networking.c +++ b/source/FreeRTOS_DNS_Networking.c @@ -163,7 +163,7 @@ /** * @brief perform a DNS network close - * @param xDNSSocket + * @param xDNSSocket the DNS socket to close */ void DNS_CloseSocket( Socket_t xDNSSocket ) { diff --git a/source/FreeRTOS_DNS_Parser.c b/source/FreeRTOS_DNS_Parser.c index b93eae9c2c..f8ad5ecc24 100644 --- a/source/FreeRTOS_DNS_Parser.c +++ b/source/FreeRTOS_DNS_Parser.c @@ -54,7 +54,7 @@ /** * @brief Find the best matching end-point given a reply that was received. - * @param[in] pxNetworkBuffer: The Ethernet packet that was received. + * @param[in] pxNetworkBuffer The Ethernet packet that was received. * @return An end-point. */ static NetworkEndPoint_t * prvFindEndPointOnNetMask( NetworkBufferDescriptor_t * pxNetworkBuffer ) @@ -89,8 +89,8 @@ /** * @brief Read the Name field out of a DNS response packet. * - * @param[in,out] pxSet: a set of variables that are shared among the helper functions. - * @param[in] uxDestLen: Size of the pcName array. + * @param[in,out] pxSet a set of variables that are shared among the helper functions. + * @param[in] uxDestLen Size of the pcName array. * * @return If a fully formed name was found, then return the number of bytes processed in pucByte. */ @@ -210,8 +210,8 @@ /** * @brief Simple routine that jumps over the NAME field of a resource record. * - * @param[in] pucByte: The pointer to the resource record. - * @param[in] uxLength: Length of the resource record. + * @param[in] pucByte The pointer to the resource record. + * @param[in] uxLength Length of the resource record. * * @return It returns the number of bytes read, or zero when an error has occurred. */ @@ -282,14 +282,14 @@ /** * @brief Process a response packet from a DNS server, or an LLMNR reply. * - * @param[in] pucUDPPayloadBuffer: The DNS response received as a UDP + * @param[in] pucUDPPayloadBuffer The DNS response received as a UDP * payload. - * @param[in] uxBufferLength: Length of the UDP payload buffer. - * @param[in] ppxAddressInfo: A pointer to a pointer where the results will be stored. - * @param[in] xExpected: indicates whether the identifier in the reply + * @param[in] uxBufferLength Length of the UDP payload buffer. + * @param[in] ppxAddressInfo A pointer to a pointer where the results will be stored. + * @param[in] xExpected indicates whether the identifier in the reply * was expected, and thus if the DNS cache may be * updated with the reply. - * @param[in] usPort: The server port number in order to identify the protocol. + * @param[in] usPort The server port number in order to identify the protocol. * * * @return The IP address in the DNS response if present and if xExpected is set to pdTRUE. @@ -634,8 +634,8 @@ /** * @brief perform a dns lookup in the local cache {TODO WRONG} - * @param[in] pxSet: a set of variables that are shared among the helper functions. - * @param[out] ppxAddressInfo: a linked list storing the DNS answers. + * @param[in] pxSet a set of variables that are shared among the helper functions. + * @param[out] ppxAddressInfo a linked list storing the DNS answers. * @param[out] uxBytesRead total bytes consumed by the function * @return pdTRUE when successful, otherwise pdFALSE. */ @@ -919,8 +919,8 @@ /** * @brief Send a DNS message to be used in NBNS or LLMNR * - * @param[in] pxNetworkBuffer: The network buffer descriptor with the DNS message. - * @param[in] lNetLength: The length of the DNS message. + * @param[in] pxNetworkBuffer The network buffer descriptor with the DNS message. + * @param[in] lNetLength The length of the DNS message. */ void prepareReplyDNSMessage( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t lNetLength ) @@ -1025,9 +1025,9 @@ /** * @brief Respond to an NBNS query or an NBNS reply. * - * @param[in] pucPayload: the UDP payload of the NBNS message. - * @param[in] uxBufferLength: Length of the Buffer. - * @param[in] ulIPAddress: IP address of the sender. + * @param[in] pucPayload the UDP payload of the NBNS message. + * @param[in] uxBufferLength Length of the Buffer. + * @param[in] ulIPAddress IP address of the sender. */ void DNS_TreatNBNS( uint8_t * pucPayload, size_t uxBufferLength, diff --git a/source/FreeRTOS_ICMP.c b/source/FreeRTOS_ICMP.c index d042fbf7cc..1c54cbaa72 100644 --- a/source/FreeRTOS_ICMP.c +++ b/source/FreeRTOS_ICMP.c @@ -74,7 +74,7 @@ /** * @brief Process an ICMP packet. Only echo requests and echo replies are recognised and handled. * - * @param[in,out] pxNetworkBuffer: The pointer to the network buffer descriptor + * @param[in,out] pxNetworkBuffer The pointer to the network buffer descriptor * that contains the ICMP message. * * @return eReleaseBuffer when the message buffer should be released, or eReturnEthernetFrame @@ -133,8 +133,8 @@ /** * @brief Process an ICMP echo request. * - * @param[in,out] pxICMPPacket: The IP packet that contains the ICMP message. - * @param pxNetworkBuffer: Pointer to the network buffer containing the ICMP packet. + * @param[in,out] pxICMPPacket The IP packet that contains the ICMP message. + * @param pxNetworkBuffer Pointer to the network buffer containing the ICMP packet. * @returns Function returns eReturnEthernetFrame. */ static eFrameProcessingResult_t prvProcessICMPEchoRequest( ICMPPacket_t * const pxICMPPacket, @@ -202,7 +202,7 @@ /** * @brief Process an ICMP echo reply. * - * @param[in] pxICMPPacket: The IP packet that contains the ICMP message. + * @param[in] pxICMPPacket The IP packet that contains the ICMP message. */ static void prvProcessICMPEchoReply( ICMPPacket_t * const pxICMPPacket ) { diff --git a/source/FreeRTOS_IP.c b/source/FreeRTOS_IP.c index 49d49addfe..26de7888e2 100755 --- a/source/FreeRTOS_IP.c +++ b/source/FreeRTOS_IP.c @@ -224,7 +224,7 @@ static BaseType_t xIPTaskInitialised = pdFALSE; * 'xNetworkEventQueue'. prvIPTask() is the only task which has access to * the data of the IP-stack, and so it has no need of using mutexes. * - * @param[in] pvParameters: Not used. + * @param[in] pvParameters Not used. */ /** @brief Stores interface structures. */ @@ -550,7 +550,7 @@ static void prvIPTask_CheckPendingEvents( void ) /** * @brief Call the state machine of either DHCP, DHCPv6, or RA, whichever is activated. * - * @param[in] pxEndPoint: The end-point for which the state-machine will be called. + * @param[in] pxEndPoint The end-point for which the state-machine will be called. */ static void prvCallDHCP_RA_Handler( NetworkEndPoint_t * pxEndPoint ) { @@ -612,7 +612,7 @@ TaskHandle_t FreeRTOS_GetIPTaskHandle( void ) /** * @brief Perform all the required tasks when the network gets connected. * - * @param pxEndPoint: The end-point which goes up. + * @param pxEndPoint The end-point which goes up. */ void vIPNetworkUpCalls( NetworkEndPoint_t * pxEndPoint ) { @@ -647,7 +647,7 @@ void vIPNetworkUpCalls( NetworkEndPoint_t * pxEndPoint ) /** * @brief Handle the incoming Ethernet packets. * - * @param[in] pxBuffer: Linked/un-linked network buffer descriptor(s) + * @param[in] pxBuffer Linked/un-linked network buffer descriptor(s) * to be processed. */ static void prvHandleEthernetPacket( NetworkBufferDescriptor_t * pxBuffer ) @@ -690,8 +690,8 @@ static void prvHandleEthernetPacket( NetworkBufferDescriptor_t * pxBuffer ) /** * @brief Send a network packet. * - * @param[in] pxNetworkBuffer: The message buffer. - * @param[in] xReleaseAfterSend: When true, the network interface will own the buffer and is responsible for it's release. + * @param[in] pxNetworkBuffer The message buffer. + * @param[in] xReleaseAfterSend When true, the network interface will own the buffer and is responsible for it's release. */ static void prvForwardTxPacket( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ) @@ -710,7 +710,7 @@ static void prvForwardTxPacket( NetworkBufferDescriptor_t * pxNetworkBuffer, * the failure will be noted in the variable 'xNetworkDownEventPending' * and later on a 'network-down' event, it will be executed. * - * @param[in] pxNetworkInterface: The interface that goes down. + * @param[in] pxNetworkInterface The interface that goes down. */ void FreeRTOS_NetworkDown( struct xNetworkInterface * pxNetworkInterface ) { @@ -743,7 +743,7 @@ void FreeRTOS_NetworkDown( struct xNetworkInterface * pxNetworkInterface ) * This function is supposed to be called form an ISR. It is recommended * - * use 'FreeRTOS_NetworkDown()', when calling from a normal task. * - * @param[in] pxNetworkInterface: The interface that goes down. + * @param[in] pxNetworkInterface The interface that goes down. * * @return If the event was processed successfully, then return pdTRUE. * Else pdFALSE. @@ -785,8 +785,8 @@ BaseType_t FreeRTOS_NetworkDownFromISR( struct xNetworkInterface * pxNetworkInte * FreeRTOS_GetUDPPayloadBuffer_Multi(), which can * allocate a IPv4 or IPv6 buffer based on ucIPType parameter . * - * @param[in] uxRequestedSizeBytes: The size of the UDP payload. - * @param[in] uxBlockTimeTicks: Maximum amount of time for which this call + * @param[in] uxRequestedSizeBytes The size of the UDP payload. + * @param[in] uxBlockTimeTicks Maximum amount of time for which this call * can block. This value is capped internally. * * @return If a buffer was created then the pointer to that buffer is returned, @@ -804,10 +804,10 @@ BaseType_t FreeRTOS_NetworkDownFromISR( struct xNetworkInterface * pxNetworkInte * @brief Obtain a buffer big enough for a UDP payload of given size and * given IP type. * - * @param[in] uxRequestedSizeBytes: The size of the UDP payload. - * @param[in] uxBlockTimeTicks: Maximum amount of time for which this call + * @param[in] uxRequestedSizeBytes The size of the UDP payload. + * @param[in] uxBlockTimeTicks Maximum amount of time for which this call * can block. This value is capped internally. - * @param[in] ucIPType: Either ipTYPE_IPv4 (0x40) or ipTYPE_IPv6 (0x60) + * @param[in] ucIPType Either ipTYPE_IPv4 (0x40) or ipTYPE_IPv6 (0x60) * * @return If a buffer was created then the pointer to that buffer is returned, * else a NULL pointer is returned. @@ -1028,7 +1028,7 @@ BaseType_t FreeRTOS_IPInit_Multi( void ) /** * @brief Release the UDP payload buffer. * - * @param[in] pvBuffer: Pointer to the UDP buffer that is to be released. + * @param[in] pvBuffer Pointer to the UDP buffer that is to be released. */ void FreeRTOS_ReleaseUDPPayloadBuffer( void const * pvBuffer ) { @@ -1044,11 +1044,11 @@ void FreeRTOS_ReleaseUDPPayloadBuffer( void const * pvBuffer ) * @brief Get the current IPv4 address configuration. Only non-NULL pointers will * be filled in. pxEndPoint must be non-NULL. * - * @param[out] pulIPAddress: The current IP-address assigned. - * @param[out] pulNetMask: The netmask used for current subnet. - * @param[out] pulGatewayAddress: The gateway address. - * @param[out] pulDNSServerAddress: The DNS server address. - * @param[in] pxEndPoint: The end-point which is being questioned. + * @param[out] pulIPAddress The current IP-address assigned. + * @param[out] pulNetMask The netmask used for current subnet. + * @param[out] pulGatewayAddress The gateway address. + * @param[out] pulDNSServerAddress The DNS server address. + * @param[in] pxEndPoint The end-point which is being questioned. */ void FreeRTOS_GetEndPointConfiguration( uint32_t * pulIPAddress, uint32_t * pulNetMask, @@ -1091,10 +1091,10 @@ void FreeRTOS_GetEndPointConfiguration( uint32_t * pulIPAddress, * NOTE: This function is kept for backward compatibility. Newer * designs should use FreeRTOS_SetEndPointConfiguration(). * - * @param[out] pulIPAddress: The current IP-address assigned. - * @param[out] pulNetMask: The netmask used for current subnet. - * @param[out] pulGatewayAddress: The gateway address. - * @param[out] pulDNSServerAddress: The DNS server address. + * @param[out] pulIPAddress The current IP-address assigned. + * @param[out] pulNetMask The netmask used for current subnet. + * @param[out] pulGatewayAddress The gateway address. + * @param[out] pulDNSServerAddress The DNS server address. */ void FreeRTOS_GetAddressConfiguration( uint32_t * pulIPAddress, uint32_t * pulNetMask, @@ -1115,11 +1115,11 @@ void FreeRTOS_GetEndPointConfiguration( uint32_t * pulIPAddress, * @brief Set the current IPv4 network address configuration. Only non-NULL pointers will * pointers will be used. pxEndPoint must pointer to a valid end-point. * - * @param[in] pulIPAddress: The current IP-address assigned. - * @param[in] pulNetMask: The netmask used for current subnet. - * @param[in] pulGatewayAddress: The gateway address. - * @param[in] pulDNSServerAddress: The DNS server address. - * @param[in] pxEndPoint: The end-point which is being questioned. + * @param[in] pulIPAddress The current IP-address assigned. + * @param[in] pulNetMask The netmask used for current subnet. + * @param[in] pulGatewayAddress The gateway address. + * @param[in] pulDNSServerAddress The DNS server address. + * @param[in] pxEndPoint The end-point which is being questioned. */ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, const uint32_t * pulNetMask, @@ -1162,10 +1162,10 @@ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, * NOTE: This function is kept for backward compatibility. Newer * designs should use FreeRTOS_SetEndPointConfiguration(). * - * @param[in] pulIPAddress: The current IP-address assigned. - * @param[in] pulNetMask: The netmask used for current subnet. - * @param[in] pulGatewayAddress: The gateway address. - * @param[in] pulDNSServerAddress: The DNS server address. + * @param[in] pulIPAddress The current IP-address assigned. + * @param[in] pulNetMask The netmask used for current subnet. + * @param[in] pulGatewayAddress The gateway address. + * @param[in] pulDNSServerAddress The DNS server address. */ void FreeRTOS_SetAddressConfiguration( const uint32_t * pulIPAddress, const uint32_t * pulNetMask, @@ -1188,9 +1188,9 @@ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, * @brief Release the memory that was previously obtained by calling FreeRTOS_recv() * with the flag 'FREERTOS_ZERO_COPY'. * - * @param[in] xSocket: The socket that was read from. - * @param[in] pvBuffer: The buffer returned in the call to FreeRTOS_recv(). - * @param[in] xByteCount: The number of bytes that have been used. + * @param[in] xSocket The socket that was read from. + * @param[in] pvBuffer The buffer returned in the call to FreeRTOS_recv(). + * @param[in] xByteCount The number of bytes that have been used. * * @return pdPASS if the buffer was released successfully, otherwise pdFAIL is returned. */ @@ -1236,9 +1236,9 @@ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, * @brief Send a ping request to the given IP address. After receiving a reply, * IP-task will call a user-supplied function 'vApplicationPingReplyHook()'. * - * @param[in] ulIPAddress: The IP address to which the ping is to be sent. - * @param[in] uxNumberOfBytesToSend: Number of bytes in the ping request. - * @param[in] uxBlockTimeTicks: Maximum number of ticks to wait. + * @param[in] ulIPAddress The IP address to which the ping is to be sent. + * @param[in] uxNumberOfBytesToSend Number of bytes in the ping request. + * @param[in] uxBlockTimeTicks Maximum number of ticks to wait. * * @return If successfully sent to IP task for processing then the sequence * number of the ping packet or else, pdFAIL. @@ -1330,7 +1330,7 @@ void FreeRTOS_SetEndPointConfiguration( const uint32_t * pulIPAddress, /** * @brief Send an event to the IP task. It calls 'xSendEventStructToIPTask' internally. * - * @param[in] eEvent: The event to be sent. + * @param[in] eEvent The event to be sent. * * @return pdPASS if the event was sent (or the desired effect was achieved). Else, pdFAIL. */ @@ -1349,8 +1349,8 @@ BaseType_t xSendEventToIPTask( eIPEvent_t eEvent ) /** * @brief Send an event (in form of struct) to the IP task to be processed. * - * @param[in] pxEvent: The event to be sent. - * @param[in] uxTimeout: Timeout for waiting in case the queue is full. 0 for non-blocking calls. + * @param[in] pxEvent The event to be sent. + * @param[in] uxTimeout Timeout for waiting in case the queue is full. 0 for non-blocking calls. * * @return pdPASS if the event was sent (or the desired effect was achieved). Else, pdFAIL. */ @@ -1422,7 +1422,7 @@ BaseType_t xSendEventStructToIPTask( const IPStackEvent_t * pxEvent, /** * @brief Decide whether this packet should be processed or not based on the IP address in the packet. * - * @param[in] pucEthernetBuffer: The ethernet packet under consideration. + * @param[in] pucEthernetBuffer The ethernet packet under consideration. * * @return Enum saying whether to release or to process the packet. */ @@ -1508,7 +1508,7 @@ eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucE /** * @brief Process the Ethernet packet. * - * @param[in,out] pxNetworkBuffer: the network buffer containing the ethernet packet. If the + * @param[in,out] pxNetworkBuffer the network buffer containing the ethernet packet. If the * buffer is large enough, it may be reused to send a reply. */ static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetworkBuffer ) @@ -1643,7 +1643,7 @@ static void prvProcessEthernetPacket( NetworkBufferDescriptor_t * const pxNetwor /** * @brief Check the sizes of the UDP packet and forward it to the UDP module * ( xProcessReceivedUDPPacket() ) - * @param[in] pxNetworkBuffer: The network buffer containing the UDP packet. + * @param[in] pxNetworkBuffer The network buffer containing the UDP packet. * @return eReleaseBuffer ( please release the buffer ). * eFrameConsumed ( the buffer has now been released ). */ @@ -1750,8 +1750,8 @@ static eFrameProcessingResult_t prvProcessUDPPacket( NetworkBufferDescriptor_t * /** * @brief Process an IP-packet. * - * @param[in] pxIPPacket: The IP packet to be processed. - * @param[in] pxNetworkBuffer: The networkbuffer descriptor having the IP packet. + * @param[in] pxIPPacket The IP packet to be processed. + * @param[in] pxNetworkBuffer The networkbuffer descriptor having the IP packet. * * @return An enum to show whether the packet should be released/kept/processed etc. */ @@ -1941,8 +1941,8 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke /** * @brief Send the Ethernet frame after checking for some conditions. * - * @param[in,out] pxNetworkBuffer: The network buffer which is to be sent. - * @param[in] xReleaseAfterSend: Whether this network buffer is to be released or not. + * @param[in,out] pxNetworkBuffer The network buffer which is to be sent. + * @param[in] xReleaseAfterSend Whether this network buffer is to be released or not. */ void vReturnEthernetFrame( NetworkBufferDescriptor_t * pxNetworkBuffer, BaseType_t xReleaseAfterSend ) @@ -2111,7 +2111,7 @@ uint32_t FreeRTOS_GetIPAddress( void ) /** * @brief Sets the IP address of the NIC. * - * @param[in] ulIPAddress: IP address of the NIC to be set. + * @param[in] ulIPAddress IP address of the NIC to be set. */ void FreeRTOS_SetIPAddress( uint32_t ulIPAddress ) { @@ -2186,7 +2186,7 @@ uint32_t FreeRTOS_GetIPAddress( void ) /** * @brief Update the MAC address. * - * @param[in] ucMACAddress: the MAC address to be set. + * @param[in] ucMACAddress the MAC address to be set. */ void FreeRTOS_UpdateMACAddress( const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ) { @@ -2223,7 +2223,7 @@ uint32_t FreeRTOS_GetIPAddress( void ) /** * @brief Set the netmask for the subnet. * - * @param[in] ulNetmask: The 32 bit netmask of the subnet. + * @param[in] ulNetmask The 32 bit netmask of the subnet. */ void FreeRTOS_SetNetmask( uint32_t ulNetmask ) { @@ -2239,7 +2239,7 @@ uint32_t FreeRTOS_GetIPAddress( void ) /** * @brief Set the gateway address. * - * @param[in] ulGatewayAddress: The gateway address. + * @param[in] ulGatewayAddress The gateway address. */ void FreeRTOS_SetGatewayAddress( uint32_t ulGatewayAddress ) { @@ -2316,7 +2316,7 @@ BaseType_t FreeRTOS_IsEndPointUp( const struct xNetworkEndPoint * pxEndPoint ) * @brief Return pdTRUE if all end-points belonging to a given interface are up. When * pxInterface is null, all end-points will be checked. * - * @param[in] pxInterface: The network interface of interest, or NULL to check all end-points. + * @param[in] pxInterface The network interface of interest, or NULL to check all end-points. * * @return pdTRUE if all end-points are up, otherwise pdFALSE; */ @@ -2361,7 +2361,7 @@ BaseType_t FreeRTOS_AllEndPointsUp( const struct xNetworkInterface * pxInterface /** * @brief Get the size of the IP-header, by checking the type of the network buffer. - * @param[in] pxNetworkBuffer: The network buffer. + * @param[in] pxNetworkBuffer The network buffer. * @return The size of the corresponding IP-header. */ size_t uxIPHeaderSizePacket( const NetworkBufferDescriptor_t * pxNetworkBuffer ) @@ -2388,7 +2388,7 @@ size_t uxIPHeaderSizePacket( const NetworkBufferDescriptor_t * pxNetworkBuffer ) /** * @brief Get the size of the IP-header, by checking if the socket bIsIPv6 set. - * @param[in] pxSocket: The socket. + * @param[in] pxSocket The socket. * @return The size of the corresponding IP-header. */ size_t uxIPHeaderSizeSocket( const FreeRTOS_Socket_t * pxSocket ) diff --git a/source/FreeRTOS_IP_Timers.c b/source/FreeRTOS_IP_Timers.c index a40f456700..10bdbb66ee 100644 --- a/source/FreeRTOS_IP_Timers.c +++ b/source/FreeRTOS_IP_Timers.c @@ -338,9 +338,9 @@ void vCheckNetworkTimers( void ) * @brief Start an IP timer. The IP-task has its own implementation of a timer * called 'IPTimer_t', which is based on the FreeRTOS 'TimeOut_t'. * - * @param[in] pxTimer: Pointer to the IP timer. When zero, the timer is marked + * @param[in] pxTimer Pointer to the IP timer. When zero, the timer is marked * as expired. - * @param[in] xTime: Time to be loaded into the IP timer. + * @param[in] xTime Time to be loaded into the IP timer. */ static void prvIPTimerStart( IPTimer_t * pxTimer, TickType_t xTime ) @@ -364,7 +364,7 @@ static void prvIPTimerStart( IPTimer_t * pxTimer, /** * @brief Start an ARP Resolution timer. * - * @param[in] xTime: Time to be loaded into the ARP Resolution timer. + * @param[in] xTime Time to be loaded into the ARP Resolution timer. */ void vIPTimerStartARPResolution( TickType_t xTime ) { @@ -375,8 +375,8 @@ void vIPTimerStartARPResolution( TickType_t xTime ) /** * @brief Sets the reload time of an IP timer and restarts it. * - * @param[in] pxTimer: Pointer to the IP timer. - * @param[in] xTime: Time to be reloaded into the IP timer. + * @param[in] pxTimer Pointer to the IP timer. + * @param[in] xTime Time to be reloaded into the IP timer. */ static void prvIPTimerReload( IPTimer_t * pxTimer, TickType_t xTime ) @@ -391,7 +391,7 @@ static void prvIPTimerReload( IPTimer_t * pxTimer, /** * @brief Sets the reload time of the TCP timer and restarts it. * - * @param[in] xTime: Time to be reloaded into the TCP timer. + * @param[in] xTime Time to be reloaded into the TCP timer. */ void vTCPTimerReload( TickType_t xTime ) { @@ -403,7 +403,7 @@ static void prvIPTimerReload( IPTimer_t * pxTimer, /** * @brief Sets the reload time of the ARP timer and restarts it. * - * @param[in] xTime: Time to be reloaded into the ARP timer. + * @param[in] xTime Time to be reloaded into the ARP timer. */ void vARPTimerReload( TickType_t xTime ) { @@ -417,7 +417,7 @@ void vARPTimerReload( TickType_t xTime ) /** * @brief Reload the DNS timer. * - * @param[in] ulCheckTime: The reload value. + * @param[in] ulCheckTime The reload value. */ void vDNSTimerReload( uint32_t ulCheckTime ) { @@ -431,8 +431,8 @@ void vARPTimerReload( TickType_t xTime ) /** * @brief Set the reload time of the DHCP/DHCPv6/RA timer. * - * @param[in] pxEndPoint: The end-point that needs to acquire an IP-address. - * @param[in] uxClockTicks: The number of clock-ticks after which the timer should expire. + * @param[in] pxEndPoint The end-point that needs to acquire an IP-address. + * @param[in] uxClockTicks The number of clock-ticks after which the timer should expire. */ void vDHCP_RATimerReload( NetworkEndPoint_t * pxEndPoint, @@ -447,7 +447,7 @@ void vARPTimerReload( TickType_t xTime ) /** * @brief Reload the Network timer. * - * @param[in] xTime: Time to be reloaded into the Network timer. + * @param[in] xTime Time to be reloaded into the Network timer. */ void vNetworkTimerReload( TickType_t xTime ) { @@ -458,7 +458,7 @@ void vNetworkTimerReload( TickType_t xTime ) /** * @brief Check the IP timer to see whether an IP event should be processed or not. * - * @param[in] pxTimer: Pointer to the IP timer. + * @param[in] pxTimer Pointer to the IP timer. * * @return If the timer is expired then pdTRUE is returned. Else pdFALSE. */ @@ -503,7 +503,7 @@ static BaseType_t prvIPTimerCheck( IPTimer_t * pxTimer ) /** * @brief Enable/disable the TCP timer. * - * @param[in] xExpiredState: pdTRUE - set as expired; pdFALSE - set as non-expired. + * @param[in] xExpiredState pdTRUE - set as expired; pdFALSE - set as non-expired. */ void vIPSetTCPTimerExpiredState( BaseType_t xExpiredState ) { @@ -524,7 +524,7 @@ static BaseType_t prvIPTimerCheck( IPTimer_t * pxTimer ) /** * @brief Enable/disable the ARP timer. * - * @param[in] xEnableState: pdTRUE - enable timer; pdFALSE - disable timer. + * @param[in] xEnableState pdTRUE - enable timer; pdFALSE - disable timer. */ void vIPSetARPTimerEnableState( BaseType_t xEnableState ) { @@ -542,7 +542,7 @@ void vIPSetARPTimerEnableState( BaseType_t xEnableState ) /** * @brief Enable or disable the ARP resolution timer. * - * @param[in] xEnableState: pdTRUE if the timer must be enabled, pdFALSE otherwise. + * @param[in] xEnableState pdTRUE if the timer must be enabled, pdFALSE otherwise. */ void vIPSetARPResolutionTimerEnableState( BaseType_t xEnableState ) { @@ -562,8 +562,8 @@ void vIPSetARPResolutionTimerEnableState( BaseType_t xEnableState ) /** * @brief Enable or disable the DHCP/DHCPv6/RA timer. * - * @param[in] pxEndPoint: The end-point that needs to acquire an IP-address. - * @param[in] xEnableState: pdTRUE if the timer must be enabled, pdFALSE otherwise. + * @param[in] pxEndPoint The end-point that needs to acquire an IP-address. + * @param[in] xEnableState pdTRUE if the timer must be enabled, pdFALSE otherwise. */ void vIPSetDHCP_RATimerEnableState( NetworkEndPoint_t * pxEndPoint, BaseType_t xEnableState ) @@ -588,7 +588,7 @@ void vIPSetARPResolutionTimerEnableState( BaseType_t xEnableState ) /** * @brief Enable/disable the DNS timer. * - * @param[in] xEnableState: pdTRUE - enable timer; pdFALSE - disable timer. + * @param[in] xEnableState pdTRUE - enable timer; pdFALSE - disable timer. */ void vIPSetDNSTimerEnableState( BaseType_t xEnableState ) { diff --git a/source/FreeRTOS_IP_Utils.c b/source/FreeRTOS_IP_Utils.c index bcfdc76ee0..66d7673e41 100644 --- a/source/FreeRTOS_IP_Utils.c +++ b/source/FreeRTOS_IP_Utils.c @@ -90,22 +90,22 @@ /** * Used in checksum calculation. */ -typedef union _xUnion32 +typedef union xUnion32 { uint32_t u32; /**< The 32-bit member of the union. */ uint16_t u16[ 2 ]; /**< The array of 2 16-bit members of the union. */ uint8_t u8[ 4 ]; /**< The array of 4 8-bit members of the union. */ -} xUnion32; +} xUnion32_t; /** * Used in checksum calculation. */ -typedef union _xUnionPtr +typedef union xUnionPtr { const uint32_t * u32ptr; /**< The pointer member to a 32-bit variable. */ const uint16_t * u16ptr; /**< The pointer member to a 16-bit variable. */ const uint8_t * u8ptr; /**< The pointer member to an 8-bit variable. */ -} xUnionPtr; +} xUnionPtr_t; /* * Returns the network buffer descriptor that owns a given packet buffer. @@ -244,8 +244,8 @@ static uint16_t prvGetChecksumFromPacket( const struct xPacketSummary * pxSet ) /** * @brief Duplicate the given network buffer descriptor with a modified length. * - * @param[in] pxNetworkBuffer: The network buffer to be duplicated. - * @param[in] uxNewLength: The length for the new buffer. + * @param[in] pxNetworkBuffer The network buffer to be duplicated. + * @param[in] uxNewLength The length for the new buffer. * * @return If properly duplicated, then the duplicate network buffer or else, NULL. */ @@ -295,8 +295,8 @@ NetworkBufferDescriptor_t * pxDuplicateNetworkBufferWithDescriptor( const Networ /** * @brief Get the network buffer descriptor from the packet buffer. * - * @param[in] pvBuffer: The pointer to packet buffer. - * @param[in] uxOffset: Additional offset (such as the packet length of UDP packet etc.). + * @param[in] pvBuffer The pointer to packet buffer. + * @param[in] uxOffset Additional offset (such as the packet length of UDP packet etc.). * * @return The network buffer descriptor if the alignment is correct. Else a NULL is returned. */ @@ -658,7 +658,7 @@ static void prvChecksumProtocolSetChecksum( BaseType_t xOutgoingPacket, /** * @brief Get the network buffer from the packet buffer. * - * @param[in] pvBuffer: Pointer to the packet buffer. + * @param[in] pvBuffer Pointer to the packet buffer. * * @return The network buffer if the alignment is correct. Else a NULL is returned. */ @@ -673,7 +673,7 @@ static void prvChecksumProtocolSetChecksum( BaseType_t xOutgoingPacket, /** * @brief Get the network buffer from the UDP Payload buffer. * - * @param[in] pvBuffer: Pointer to the UDP payload buffer. + * @param[in] pvBuffer Pointer to the UDP payload buffer. * * @return The network buffer if the alignment is correct. Else a NULL is returned. */ @@ -943,13 +943,13 @@ void vPreCheckConfigs( void ) * At the same time, the length of the packet and the length of the different layers * will be checked. * - * @param[in] pucEthernetBuffer: The Ethernet buffer for which the checksum is to be calculated + * @param[in] pucEthernetBuffer The Ethernet buffer for which the checksum is to be calculated * or checked. 'pucEthernetBuffer' is now non-const because the * function will set the checksum fields, in case 'xOutgoingPacket' * is pdTRUE. - * @param[in] uxBufferLength: the total number of bytes received, or the number of bytes written + * @param[in] uxBufferLength the total number of bytes received, or the number of bytes written * in the packet buffer. - * @param[in] xOutgoingPacket: Whether this is an outgoing packet or not. + * @param[in] xOutgoingPacket Whether this is an outgoing packet or not. * * @return When xOutgoingPacket is false: the error code can be either: ipINVALID_LENGTH, * ipUNHANDLED_PROTOCOL, ipWRONG_CRC, or ipCORRECT_CRC. @@ -1119,9 +1119,9 @@ uint16_t usGenerateProtocolChecksum( uint8_t * pucEthernetBuffer, /** * @brief Calculates the 16-bit checksum of an array of bytes * - * @param[in] usSum: The initial sum, obtained from earlier data. - * @param[in] pucNextData: The actual data. - * @param[in] uxByteCount: The number of bytes. + * @param[in] usSum The initial sum, obtained from earlier data. + * @param[in] pucNextData The actual data. + * @param[in] uxByteCount The number of bytes. * * @return The 16-bit one's complement of the one's complement sum of all 16-bit * words in the header @@ -1132,10 +1132,10 @@ uint16_t usGenerateChecksum( uint16_t usSum, { /* MISRA/PC-lint doesn't like the use of unions. Here, they are a great * aid though to optimise the calculations. */ - xUnion32 xSum2; - xUnion32 xSum; - xUnion32 xTerm; - xUnionPtr xSource; + xUnion32_t xSum2; + xUnion32_t xSum; + xUnion32_t xTerm; + xUnionPtr_t xSource; uintptr_t uxAlignBits; uint32_t ulCarry = 0U; uint16_t usTemp; @@ -1382,9 +1382,9 @@ uint16_t usGenerateChecksum( uint16_t usSum, * @brief Utility function: Convert error number to a human readable * string. Declaration in FreeRTOS_errno_TCP.h. * - * @param[in] xErrnum: The error number. - * @param[in] pcBuffer: Buffer big enough to be filled with the human readable message. - * @param[in] uxLength: Maximum length of the buffer. + * @param[in] xErrnum The error number. + * @param[in] pcBuffer Buffer big enough to be filled with the human readable message. + * @param[in] uxLength Maximum length of the buffer. * * @return The buffer filled with human readable error string. */ @@ -1491,8 +1491,8 @@ const char * FreeRTOS_strerror_r( BaseType_t xErrnum, /** * @brief Get the highest value of two int32's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The highest of the two values. */ int32_t FreeRTOS_max_int32( int32_t a, @@ -1504,8 +1504,8 @@ int32_t FreeRTOS_max_int32( int32_t a, /** * @brief Get the highest value of two uint32_t's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The highest of the two values. */ uint32_t FreeRTOS_max_uint32( uint32_t a, @@ -1517,8 +1517,8 @@ uint32_t FreeRTOS_max_uint32( uint32_t a, /** * @brief Get the highest value of two size_t's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The highest of the two values. */ size_t FreeRTOS_max_size_t( size_t a, @@ -1530,8 +1530,8 @@ size_t FreeRTOS_max_size_t( size_t a, /** * @brief Get the lowest value of two int32_t's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The lowest of the two values. */ int32_t FreeRTOS_min_int32( int32_t a, @@ -1543,8 +1543,8 @@ int32_t FreeRTOS_min_int32( int32_t a, /** * @brief Get the lowest value of two uint32_t's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The lowest of the two values. */ uint32_t FreeRTOS_min_uint32( uint32_t a, @@ -1556,8 +1556,8 @@ uint32_t FreeRTOS_min_uint32( uint32_t a, /** * @brief Get the lowest value of two size_t's. - * @param[in] a: the first value. - * @param[in] b: the second value. + * @param[in] a the first value. + * @param[in] b the second value. * @return The lowest of the two values. */ size_t FreeRTOS_min_size_t( size_t a, @@ -1569,8 +1569,8 @@ size_t FreeRTOS_min_size_t( size_t a, /** * @brief Round-up a number to a multiple of 'd'. - * @param[in] a: the first value. - * @param[in] d: the second value. + * @param[in] a the first value. + * @param[in] d the second value. * @return A multiple of d. */ uint32_t FreeRTOS_round_up( uint32_t a, @@ -1591,8 +1591,8 @@ uint32_t FreeRTOS_round_up( uint32_t a, /** * @brief Round-down a number to a multiple of 'd'. - * @param[in] a: the first value. - * @param[in] d: the second value. + * @param[in] a the first value. + * @param[in] d the second value. * @return A multiple of d. */ uint32_t FreeRTOS_round_down( uint32_t a, @@ -1613,7 +1613,7 @@ uint32_t FreeRTOS_round_down( uint32_t a, /** * @brief Convert character array (of size 4) to equivalent 32-bit value. - * @param[in] pucPtr: The character array. + * @param[in] pucPtr The character array. * @return 32-bit equivalent value extracted from the character array. * * @note Going by MISRA rules, these utility functions should not be defined @@ -1631,7 +1631,7 @@ uint32_t ulChar2u32( const uint8_t * pucPtr ) /** * @brief Convert character array (of size 2) to equivalent 16-bit value. - * @param[in] pucPtr: The character array. + * @param[in] pucPtr The character array. * @return 16-bit equivalent value extracted from the character array. * * @note Going by MISRA rules, these utility functions should not be defined diff --git a/source/FreeRTOS_IPv4.c b/source/FreeRTOS_IPv4.c index 50a22de329..cec08bd05b 100644 --- a/source/FreeRTOS_IPv4.c +++ b/source/FreeRTOS_IPv4.c @@ -101,7 +101,7 @@ break; } - ucVersionHeaderLength = ( ucVersionHeaderLength & ( uint8_t ) 0x0FU ) << 2; + ucVersionHeaderLength = ( uint16_t ) ( ( ucVersionHeaderLength & ( uint8_t ) 0x0FU ) << 2U ); uxIPHeaderLength = ( UBaseType_t ) ucVersionHeaderLength; /* Check if the complete IP-header is transferred. */ diff --git a/source/FreeRTOS_Sockets.c b/source/FreeRTOS_Sockets.c index 04d839df2b..d4b0a13047 100644 --- a/source/FreeRTOS_Sockets.c +++ b/source/FreeRTOS_Sockets.c @@ -384,9 +384,9 @@ List_t xBoundUDPSocketsList; /** * @brief Check whether the socket is valid or not. * - * @param[in] pxSocket: The socket being checked. - * @param[in] xProtocol: The protocol for which the socket was created. - * @param[in] xIsBound: pdTRUE when the socket should be bound, otherwise pdFALSE. + * @param[in] pxSocket The socket being checked. + * @param[in] xProtocol The protocol for which the socket was created. + * @param[in] xIsBound pdTRUE when the socket should be bound, otherwise pdFALSE. * * @return If the socket is valid, then pdPASS is returned or else, pdFAIL * is returned. @@ -438,10 +438,10 @@ void vNetworkSocketsInit( void ) /** * @brief Determine the socket size for the given protocol. * - * @param[in] xDomain: The domain for which the size of socket is being determined. - * @param[in] xType: Is this a datagram socket or a stream socket. - * @param[in] xProtocol: The protocol being used. - * @param[out] pxSocketSize: Pointer to a variable in which the size shall be returned + * @param[in] xDomain The domain for which the size of socket is being determined. + * @param[in] xType Is this a datagram socket or a stream socket. + * @param[in] xProtocol The protocol being used. + * @param[out] pxSocketSize Pointer to a variable in which the size shall be returned * if all checks pass. * * @return pdPASS if socket size was determined and put in the parameter pxSocketSize @@ -526,8 +526,8 @@ static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, /** * @brief Called by FreeRTOS_socket(), it will initialise some essential TCP * fields in the socket. - * @param[in] pxSocket: the TCP socket to be initialised. - * @param[in] uxSocketSize: The calculated size of the socket, only used to + * @param[in] pxSocket the TCP socket to be initialised. + * @param[in] uxSocketSize The calculated size of the socket, only used to * gather memory usage statistics. */ static void prvInitialiseTCPFields( FreeRTOS_Socket_t * pxSocket, @@ -575,9 +575,9 @@ static BaseType_t prvDetermineSocketSize( BaseType_t xDomain, /** * @brief allocate and initialise a socket. * - * @param[in] xDomain: The domain in which the socket should be created. - * @param[in] xType: The type of the socket. - * @param[in] xProtocol: The protocol of the socket. + * @param[in] xDomain The domain in which the socket should be created. + * @param[in] xType The type of the socket. + * @param[in] xProtocol The protocol of the socket. * * @return FREERTOS_INVALID_SOCKET if the allocation failed, or if there was * a parameter error, otherwise a valid socket. @@ -768,7 +768,7 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, /** * @brief Delete a given socket set. * - * @param[in] xSocketSet: The socket set being deleted. + * @param[in] xSocketSet The socket set being deleted. */ void FreeRTOS_DeleteSocketSet( SocketSet_t xSocketSet ) { @@ -792,9 +792,9 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, /** * @brief Add a socket to a set. * - * @param[in] xSocket: The socket being added. - * @param[in] xSocketSet: The socket set being added to. - * @param[in] xBitsToSet: The event bits to set, a combination of the values defined + * @param[in] xSocket The socket being added. + * @param[in] xSocketSet The socket set being added to. + * @param[in] xBitsToSet The event bits to set, a combination of the values defined * in 'eSelectEvent_t', for read, write, exception, etc. */ void FreeRTOS_FD_SET( Socket_t xSocket, @@ -832,9 +832,9 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, * @brief Clear select bits for a socket. If the mask becomes 0, * remove the socket from the set. * - * @param[in] xSocket: The socket whose select bits are being cleared. - * @param[in] xSocketSet: The socket set of the socket. - * @param[in] xBitsToClear: The bits to be cleared. Every '1' means that the + * @param[in] xSocket The socket whose select bits are being cleared. + * @param[in] xSocketSet The socket set of the socket. + * @param[in] xBitsToClear The bits to be cleared. Every '1' means that the * corresponding bit will be cleared. See 'eSelectEvent_t' for * the possible values. */ @@ -871,8 +871,8 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, * @brief Test if a socket belongs to a socket-set and if so, which event bit(s) * are set. * - * @param[in] xSocket: The socket of interest. - * @param[in] xSocketSet: The socket set to which the socket belongs. + * @param[in] xSocket The socket of interest. + * @param[in] xSocketSet The socket set to which the socket belongs. * * @return If the socket belongs to the socket set: the event bits, otherwise zero. */ @@ -909,9 +909,9 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, * @brief The select() statement: wait for an event to occur on any of the sockets * included in a socket set and return its event bits when the event occurs. * - * @param[in] xSocketSet: The socket set including the sockets on which we are + * @param[in] xSocketSet The socket set including the sockets on which we are * waiting for an event to occur. - * @param[in] xBlockTimeTicks: Maximum time ticks to wait for an event to occur. + * @param[in] xBlockTimeTicks Maximum time ticks to wait for an event to occur. * If the value is 'portMAX_DELAY' then the function will wait * indefinitely for an event to occur. * @@ -984,7 +984,7 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, * @brief Send a message to the IP-task to have it check all sockets belonging to * 'pxSocketSet' * - * @param[in] pxSocketSet: The socket set being asked to check. + * @param[in] pxSocketSet The socket set being asked to check. */ static void prvFindSelectedSocket( SocketSelect_t * pxSocketSet ) { @@ -1040,9 +1040,9 @@ Socket_t FreeRTOS_socket( BaseType_t xDomain, /** * @brief : called from FreeRTOS_recvfrom(). This function waits for an incoming * UDP packet, or until a time-out occurs. - * @param[in] pxSocket : The socket that receives UDP packets. - * @param[in] xFlags : The flags as passed to FreeRTOS_recvfrom(). - * @param[in,out] pxEventBits : The last even received in this function, + * @param[in] pxSocket The socket that receives UDP packets. + * @param[in] xFlags The flags as passed to FreeRTOS_recvfrom(). + * @param[in,out] pxEventBits The last even received in this function, * either eSOCKET_INTR or eSOCKET_RECEIVE. */ static NetworkBufferDescriptor_t * prvRecvFromWaitForPacket( FreeRTOS_Socket_t const * pxSocket, @@ -1154,11 +1154,11 @@ static NetworkBufferDescriptor_t * prvRecvFromWaitForPacket( FreeRTOS_Socket_t c * @brief Called by FreeRTOS_recvfrom(). it will copy the received data * or just a pointer to the received data in case of zero-copy, * to the buffer provided by the caller. - * @param[in] pucEthernetBuffer: The packet that was received. - * @param[in] pvBuffer: The user-supplied buffer. - * @param[in] uxBufferLength: The size of the user-supplied buffer. - * @param[in] xFlags: Only 'FREERTOS_ZERO_COPY' will be tested. - * @param[in] lDataLength: The number of bytes in the UDP payload. + * @param[in] pucEthernetBuffer The packet that was received. + * @param[in] pvBuffer The user-supplied buffer. + * @param[in] uxBufferLength The size of the user-supplied buffer. + * @param[in] xFlags Only 'FREERTOS_ZERO_COPY' will be tested. + * @param[in] lDataLength The number of bytes in the UDP payload. * @return The number of bytes copied to the use buffer. */ static int32_t prvRecvFrom_CopyPacket( uint8_t * pucEthernetBuffer, @@ -1203,14 +1203,14 @@ static int32_t prvRecvFrom_CopyPacket( uint8_t * pucEthernetBuffer, * can only be used with connection-less sockets (UDP). For TCP sockets, * please use FreeRTOS_recv(). * - * @param[in] xSocket: The socket to which the data is sent i.e. the + * @param[in] xSocket The socket to which the data is sent i.e. the * listening socket. - * @param[out] pvBuffer: The buffer in which the data being received is to + * @param[out] pvBuffer The buffer in which the data being received is to * be stored. - * @param[in] uxBufferLength: The length of the buffer. - * @param[in] xFlags: The flags to indicate preferences while calling this function. - * @param[out] pxSourceAddress: The source address from which the data is being sent. - * @param[out] pxSourceAddressLength: The length of the source address structure. + * @param[in] uxBufferLength The length of the buffer. + * @param[in] xFlags The flags to indicate preferences while calling this function. + * @param[out] pxSourceAddress The source address from which the data is being sent. + * @param[out] pxSourceAddressLength The length of the source address structure. * This would always be a constant - 24 (in case of no error) as * FreeRTOS+TCP makes the sizes of IPv4 and IPv6 structures equal * (24-bytes) for compatibility. @@ -1300,7 +1300,7 @@ int32_t FreeRTOS_recvfrom( const ConstSocket_t xSocket, /** * @brief Check if a socket is a valid UDP socket. In case it is not * yet bound, bind it to port 0 ( random port ). - * @param[in] pxSocket: The socket that must be bound to a port number. + * @param[in] pxSocket The socket that must be bound to a port number. * @return Returns pdTRUE if the socket was already bound, or if the * socket has been bound successfully. */ @@ -1326,13 +1326,13 @@ static BaseType_t prvMakeSureSocketIsBound( FreeRTOS_Socket_t * pxSocket ) /** * @brief Forward a UDP packet to the IP-task, so it will be sent. - * @param[in] pxSocket : The socket on which a packet is sent. - * @param[in] pxNetworkBuffer : The packet to be sent. - * @param[in] uxTotalDataLength : The total number of payload bytes in the packet. - * @param[in] xFlags : The flag 'FREERTOS_ZERO_COPY' will be checked. - * @param[in] pxDestinationAddress : The address of the destination. - * @param[in] xTicksToWait : Number of ticks to wait, in case the IP-queue is full. - * @param[in] uxPayloadOffset : The number of bytes in the packet before the payload. + * @param[in] pxSocket The socket on which a packet is sent. + * @param[in] pxNetworkBuffer The packet to be sent. + * @param[in] uxTotalDataLength The total number of payload bytes in the packet. + * @param[in] xFlags The flag 'FREERTOS_ZERO_COPY' will be checked. + * @param[in] pxDestinationAddress The address of the destination. + * @param[in] xTicksToWait Number of ticks to wait, in case the IP-queue is full. + * @param[in] uxPayloadOffset The number of bytes in the packet before the payload. * @return The number of bytes sent on success, otherwise zero. */ static int32_t prvSendUDPPacket( const FreeRTOS_Socket_t * pxSocket, @@ -1398,14 +1398,14 @@ static int32_t prvSendUDPPacket( const FreeRTOS_Socket_t * pxSocket, /** * @brief Called by FreeRTOS_sendto(), it will actually send a UDP packet. - * @param[in] pxSocket: The socket used for sending. - * @param[in] pvBuffer: The character buffer as provided by the caller. - * @param[in] uxTotalDataLength: The number of byte in the buffer. - * @param[in] xFlags: The flags that were passed to FreeRTOS_sendto() + * @param[in] pxSocket The socket used for sending. + * @param[in] pvBuffer The character buffer as provided by the caller. + * @param[in] uxTotalDataLength The number of byte in the buffer. + * @param[in] xFlags The flags that were passed to FreeRTOS_sendto() * It will test for FREERTOS_MSG_DONTWAIT and for * FREERTOS_ZERO_COPY. - * @param[in] pxDestinationAddress: The IP-address to which the packet must be sent. - * @param[in] uxPayloadOffset: The calculated UDP payload offset, which depends + * @param[in] pxDestinationAddress The IP-address to which the packet must be sent. + * @param[in] uxPayloadOffset The calculated UDP payload offset, which depends * on the IP type: IPv4 or IPv6. * @return The number of bytes stored in the socket for transmission. */ @@ -1487,13 +1487,13 @@ static int32_t prvSendTo_ActualSend( const FreeRTOS_Socket_t * pxSocket, * @brief Send data to a socket. The socket must have already been created by a * successful call to FreeRTOS_socket(). It works for UDP-sockets only. * - * @param[in] xSocket: The socket being sent to. - * @param[in] pvBuffer: Pointer to the data being sent. - * @param[in] uxTotalDataLength: Length (in bytes) of the data being sent. - * @param[in] xFlags: Flags used to communicate preferences to the function. + * @param[in] xSocket The socket being sent to. + * @param[in] pvBuffer Pointer to the data being sent. + * @param[in] uxTotalDataLength Length (in bytes) of the data being sent. + * @param[in] xFlags Flags used to communicate preferences to the function. * Possibly FREERTOS_MSG_DONTWAIT and/or FREERTOS_ZERO_COPY. - * @param[in] pxDestinationAddress: The address to which the data is to be sent. - * @param[in] xDestinationAddressLength: This parameter is present to adhere to the + * @param[in] pxDestinationAddress The address to which the data is to be sent. + * @param[in] xDestinationAddressLength This parameter is present to adhere to the * Berkeley sockets standard. Else, it is not used. * * @return When positive: the total number of bytes sent, when negative an error @@ -1561,10 +1561,10 @@ int32_t FreeRTOS_sendto( Socket_t xSocket, * will be performed by the IP-task to avoid mutual access to the * bound-socket-lists (xBoundUDPSocketsList or xBoundTCPSocketsList). * - * @param[in] xSocket: The socket being bound. - * @param[in] pxAddress: The address struct carrying the port number to which + * @param[in] xSocket The socket being bound. + * @param[in] pxAddress The address struct carrying the port number to which * this socket is to be bound. - * @param[in] xAddressLength: This parameter is not used internally. The + * @param[in] xAddressLength This parameter is not used internally. The * function signature is used to adhere to standard * Berkeley sockets API. * @@ -1654,11 +1654,11 @@ BaseType_t FreeRTOS_bind( Socket_t xSocket, /** * @brief : Bind a socket to a port number. - * @param[in] pxSocket : The socket to be bound. - * @param[in] pxAddress : The socket will be bound to this address. - * @param[in] pxSocketList : will either point to xBoundUDPSocketsList or + * @param[in] pxSocket The socket to be bound. + * @param[in] pxAddress The socket will be bound to this address. + * @param[in] pxSocketList will either point to xBoundUDPSocketsList or * xBoundTCPSocketsList. - * @param[in] xInternal : pdTRUE if this function is called 'internally', i.e. + * @param[in] xInternal pdTRUE if this function is called 'internally', i.e. * by the IP-task. */ static BaseType_t prvSocketBindAdd( FreeRTOS_Socket_t * pxSocket, @@ -1744,10 +1744,10 @@ static BaseType_t prvSocketBindAdd( FreeRTOS_Socket_t * pxSocket, * 'xInternal' is used for TCP sockets only: it allows to have several * (connected) child sockets bound to the same server port. * - * @param[in] pxSocket: The socket is to be bound. - * @param[in] pxBindAddress: The port to which this socket should be bound. - * @param[in] uxAddressLength: The address length. - * @param[in] xInternal: pdTRUE is calling internally, else pdFALSE. + * @param[in] pxSocket The socket is to be bound. + * @param[in] pxBindAddress The port to which this socket should be bound. + * @param[in] uxAddressLength The address length. + * @param[in] xInternal pdTRUE is calling internally, else pdFALSE. * * @return If the socket was bound to a port successfully, then a 0 is returned. * Or else, an error code is returned. @@ -1854,7 +1854,7 @@ BaseType_t vSocketBind( FreeRTOS_Socket_t * pxSocket, * will actually close the socket, after receiving a 'eSocketCloseEvent' * message. * - * @param[in] xSocket: the socket being closed. + * @param[in] xSocket the socket being closed. * * @return There are three distinct values which can be returned: * 0: If the xSocket is NULL/invalid. @@ -1926,7 +1926,7 @@ BaseType_t FreeRTOS_closesocket( Socket_t xSocket ) * @brief This is the internal version of FreeRTOS_closesocket(). It will * be called by the IPtask only to avoid problems with synchronicity. * - * @param[in] pxSocket: The socket descriptor of the socket being closed. + * @param[in] pxSocket The socket descriptor of the socket being closed. * * @return Returns NULL, always. */ @@ -2104,7 +2104,7 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * parent. When a listening parent socket is closed, make sure to close also * all orphaned child-sockets. * - * @param[in] pxSocketToDelete: The socket being closed. + * @param[in] pxSocketToDelete The socket being closed. */ /* MISRA Ref 17.2.1 [Sockets and limited recursion] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-172 */ @@ -2179,10 +2179,10 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) /** * @brief Set the value of receive/send buffer after some preliminary checks. * - * @param[in] pxSocket: The socket whose options are being set. - * @param[in] lOptionName: The option name: either FREERTOS_SO_SNDBUF or + * @param[in] pxSocket The socket whose options are being set. + * @param[in] lOptionName The option name: either FREERTOS_SO_SNDBUF or * FREERTOS_SO_SNDBUF. - * @param[in] pvOptionValue: The value of the option being set. + * @param[in] pvOptionValue The value of the option being set. * * @return If there is no error, then 0 is returned. Or a negative errno * value is returned. @@ -2237,9 +2237,9 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * The callback function will be called on-connect, on-send * or on-receive. * - * @param[in] pxSocket: The socket whose options are being set. - * @param[in] lOptionName: The option name like FREERTOS_SO_xxx_HANDLER. - * @param[in] pvOptionValue: A pointer to a 'F_TCP_UDP_Handler_t', + * @param[in] pxSocket The socket whose options are being set. + * @param[in] lOptionName The option name like FREERTOS_SO_xxx_HANDLER. + * @param[in] pvOptionValue A pointer to a 'F_TCP_UDP_Handler_t', * which defines the handler. * * @return If there is no error, then 0 is returned. Or a negative errno @@ -2320,8 +2320,8 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * @brief Handle the socket option FREERTOS_SO_WIN_PROPERTIES, which sets * the sizes of the TCP windows and the sizes of the stream buffers. * - * @param[in] pxSocket: The socket whose options are being set. - * @param[in] pvOptionValue: The pointer that is passed by the application. + * @param[in] pxSocket The socket whose options are being set. + * @param[in] pvOptionValue The pointer that is passed by the application. */ static BaseType_t prvSetOptionTCPWindows( FreeRTOS_Socket_t * pxSocket, const void * pvOptionValue ) @@ -2396,8 +2396,8 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * the low- and the high-water values for TCP reception. Useful when * streaming music. * - * @param[in] pxSocket: The socket whose options are being set. - * @param[in] pvOptionValue: The pointer that is passed by the application. + * @param[in] pxSocket The socket whose options are being set. + * @param[in] pvOptionValue The pointer that is passed by the application. */ static BaseType_t prvSetOptionLowHighWater( FreeRTOS_Socket_t * pxSocket, const void * pvOptionValue ) @@ -2437,8 +2437,8 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * When enabled, the IP-stack will only send packets when * there are at least MSS bytes to send. * - * @param[in] pxSocket: The socket whose options are being set. - * @param[in] pvOptionValue: The option name like FREERTOS_SO_xxx_HANDLER. + * @param[in] pxSocket The socket whose options are being set. + * @param[in] pvOptionValue The option name like FREERTOS_SO_xxx_HANDLER. */ static BaseType_t prvSetOptionSetFullSize( FreeRTOS_Socket_t * pxSocket, const void * pvOptionValue ) @@ -2480,8 +2480,8 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * Used in applications with streaming audio: tell the peer * to stop or continue sending data. * - * @param[in] pxSocket: The TCP socket used for the connection. - * @param[in] pvOptionValue: The option name like FREERTOS_SO_xxx_HANDLER. + * @param[in] pxSocket The TCP socket used for the connection. + * @param[in] pvOptionValue The option name like FREERTOS_SO_xxx_HANDLER. */ static BaseType_t prvSetOptionStopRX( FreeRTOS_Socket_t * pxSocket, const void * pvOptionValue ) @@ -2517,9 +2517,9 @@ void * vSocketClose( FreeRTOS_Socket_t * pxSocket ) * Used in applications with streaming audio: tell the peer * to stop or continue sending data. * - * @param[in] pxSocket: The TCP socket used for the connection. - * @param[in] pvOptionValue: The option name like FREERTOS_SO_xxx_HANDLER. - * @param[in] xForSend: when true, handle 'FREERTOS_SO_SNDTIMEO', + * @param[in] pxSocket The TCP socket used for the connection. + * @param[in] pvOptionValue The option name like FREERTOS_SO_xxx_HANDLER. + * @param[in] xForSend when true, handle 'FREERTOS_SO_SNDTIMEO', * otherwise handle the option `FREERTOS_SO_RCVTIMEO`. */ static void prvSetOptionTimeout( FreeRTOS_Socket_t * pxSocket, @@ -2564,8 +2564,8 @@ static void prvSetOptionTimeout( FreeRTOS_Socket_t * pxSocket, * When set, a listening socket will turn itself into a child * socket when it receives a connection. * - * @param[in] pxSocket: The TCP socket used for the connection. - * @param[in] pvOptionValue: The option name like FREERTOS_SO_xxx_HANDLER. + * @param[in] pxSocket The TCP socket used for the connection. + * @param[in] pvOptionValue The option name like FREERTOS_SO_xxx_HANDLER. */ static BaseType_t prvSetOptionReuseListenSocket( FreeRTOS_Socket_t * pxSocket, const void * pvOptionValue ) @@ -2598,8 +2598,8 @@ static void prvSetOptionTimeout( FreeRTOS_Socket_t * pxSocket, * As soon as the last byte has been transmitted, initiate * a graceful closure of the TCP connection. * - * @param[in] pxSocket: The TCP socket used for the connection. - * @param[in] pvOptionValue: A pointer to a binary value of size + * @param[in] pxSocket The TCP socket used for the connection. + * @param[in] pvOptionValue A pointer to a binary value of size * BaseType_t. */ static BaseType_t prvSetOptionCloseAfterSend( FreeRTOS_Socket_t * pxSocket, @@ -2632,12 +2632,12 @@ static void prvSetOptionTimeout( FreeRTOS_Socket_t * pxSocket, /** * @brief Set the socket options for the given socket. * - * @param[in] xSocket: The socket for which the options are to be set. - * @param[in] lLevel: Not used. Parameter is used to maintain the Berkeley sockets + * @param[in] xSocket The socket for which the options are to be set. + * @param[in] lLevel Not used. Parameter is used to maintain the Berkeley sockets * standard. - * @param[in] lOptionName: The name of the option to be set. - * @param[in] pvOptionValue: The value of the option to be set. - * @param[in] uxOptionLength: Not used. Parameter is used to maintain the Berkeley + * @param[in] lOptionName The name of the option to be set. + * @param[in] pvOptionValue The value of the option to be set. + * @param[in] uxOptionLength Not used. Parameter is used to maintain the Berkeley * sockets standard. * * @return If the option can be set with the given value, then 0 is returned. Else, @@ -2800,7 +2800,7 @@ BaseType_t FreeRTOS_setsockopt( Socket_t xSocket, /** * @brief Find an available port number per https://tools.ietf.org/html/rfc6056. * - * @param[in] xProtocol: FREERTOS_IPPROTO_TCP/FREERTOS_IPPROTO_UDP. + * @param[in] xProtocol FREERTOS_IPPROTO_TCP/FREERTOS_IPPROTO_UDP. * * @return If an available protocol port is found then that port number is returned. * Or else, 0 is returned. @@ -2868,8 +2868,8 @@ static uint16_t prvGetPrivatePortNumber( BaseType_t xProtocol ) /** * @brief Find a list item associated with the wanted-item. * - * @param[in] pxList: The list through which the search is to be conducted. - * @param[in] xWantedItemValue: The wanted item whose association is to be found. + * @param[in] pxList The list through which the search is to be conducted. + * @param[in] xWantedItemValue The wanted item whose association is to be found. * * @return The list item holding the value being searched for. If nothing is found, * then a NULL is returned. @@ -2908,7 +2908,7 @@ static const ListItem_t * pxListFindListItemWithValue( const List_t * pxList, /** * @brief Find the UDP socket corresponding to the port number. * - * @param[in] uxLocalPort: The port whose corresponding bound UDP socket + * @param[in] uxLocalPort The port whose corresponding bound UDP socket * is to be found. * * @return The socket owning the port if found or else NULL. @@ -2943,8 +2943,8 @@ FreeRTOS_Socket_t * pxUDPSocketLookup( UBaseType_t uxLocalPort ) * notation after some checks. * A safe alternative is FreeRTOS_inet_ntop4(). * - * @param[in] ulIPAddress: 32-bit representation of the IP-address. - * @param[out] pcBuffer: The buffer where the dotted decimal representation will be + * @param[in] ulIPAddress 32-bit representation of the IP-address. + * @param[out] pcBuffer The buffer where the dotted decimal representation will be * stored if all checks pass. The buffer must be at least 16 * bytes long. * @@ -3014,11 +3014,11 @@ const char * FreeRTOS_inet_ntoa( uint32_t ulIPAddress, /** * @brief Convert the dotted decimal format of the IP-address to the 32-bit representation. * - * @param[in] xAddressFamily: The Address family to which the IP-address belongs to. Only + * @param[in] xAddressFamily The Address family to which the IP-address belongs to. Only * FREERTOS_AF_INET (IPv4) is supported. - * @param[in] pcSource: Pointer to the string holding the dotted decimal representation of + * @param[in] pcSource Pointer to the string holding the dotted decimal representation of * the IP-address. - * @param[out] pvDestination: The pointer to the address struct/variable where the converted + * @param[out] pvDestination The pointer to the address struct/variable where the converted * IP-address will be stored. The buffer must be 4 bytes long * in case of a IPv4 address. * @@ -3055,11 +3055,11 @@ BaseType_t FreeRTOS_inet_pton( BaseType_t xAddressFamily, * decimal format based on the Address Family. (Only FREERTOS_AF_INET * is allowed). * - * @param[in] xAddressFamily: The address family of the IP-address. - * @param[in] pvSource: Pointer to the 32-bit representation of IP-address. - * @param[out] pcDestination: The pointer to the character array where the dotted + * @param[in] xAddressFamily The address family of the IP-address. + * @param[in] pvSource Pointer to the 32-bit representation of IP-address. + * @param[out] pcDestination The pointer to the character array where the dotted * decimal address will be stored if every check does pass. - * @param[in] uxSize: Size of the character array. This value makes sure that the code + * @param[in] uxSize Size of the character array. This value makes sure that the code * doesn't write beyond it's bounds. * * @return If every check does pass, then the pointer to the pcDestination is returned @@ -3097,7 +3097,7 @@ const char * FreeRTOS_inet_ntop( BaseType_t xAddressFamily, * @brief Convert an ASCII character to its corresponding hexadecimal value. * Accepted characters are 0-9, a-f, and A-F. * - * @param[in] cChar: The character to be converted. + * @param[in] cChar The character to be converted. * * @return The hexadecimal value, between 0 and 15. * When the character is not valid, socketINVALID_HEX_CHAR will be returned. @@ -3142,11 +3142,11 @@ uint8_t ucASCIIToHex( char cChar ) /** * @brief This function converts a 48-bit MAC address to a human readable string. * - * @param[in] pucSource: A pointer to an array of 6 bytes. - * @param[out] pcTarget: A buffer that is 18 bytes long, it will contain the resulting string. - * @param[in] cTen: Either an 'A' or an 'a'. It determines whether the hex numbers will use + * @param[in] pucSource A pointer to an array of 6 bytes. + * @param[out] pcTarget A buffer that is 18 bytes long, it will contain the resulting string. + * @param[in] cTen Either an 'A' or an 'a'. It determines whether the hex numbers will use * capital or small letters. - * @param[in] cSeparator: The separator that should appear between the bytes, either ':' or '-'. + * @param[in] cSeparator The separator that should appear between the bytes, either ':' or '-'. */ void FreeRTOS_EUI48_ntop( const uint8_t * pucSource, char * pcTarget, @@ -3178,12 +3178,12 @@ void FreeRTOS_EUI48_ntop( const uint8_t * pucSource, if( ucNibble <= 0x09U ) { cResult = '0'; - cResult = cResult + ucNibble; + cResult = ( char ) ( ( uint8_t ) cResult + ucNibble ); } else { cResult = cTen; /* Either 'a' or 'A' */ - cResult = cResult + ( ucNibble - 10U ); + cResult = ( char ) ( ( uint8_t ) cResult + ( ucNibble - 10U ) ); } pcTarget[ uxTarget ] = cResult; @@ -3208,8 +3208,8 @@ void FreeRTOS_EUI48_ntop( const uint8_t * pucSource, * @brief This function converts a human readable string, representing an 48-bit MAC address, * into a 6-byte address. Valid inputs are e.g. "62:48:5:83:A0:b2" and "0-12-34-fe-dc-ba". * - * @param[in] pcSource: The null terminated string to be parsed. - * @param[out] pucTarget: A buffer that is 6 bytes long, it will contain the MAC address. + * @param[in] pcSource The null terminated string to be parsed. + * @param[out] pucTarget A buffer that is 6 bytes long, it will contain the MAC address. * * @return pdTRUE in case the string got parsed correctly, otherwise pdFALSE. */ @@ -3282,7 +3282,7 @@ BaseType_t FreeRTOS_EUI48_pton( const char * pcSource, /** * @brief Convert the IP address from "w.x.y.z" (dotted decimal) format to the 32-bit format. * - * @param[in] pcIPAddress: The character string pointer holding the IP-address in the "W.X.Y.Z" + * @param[in] pcIPAddress The character string pointer holding the IP-address in the "W.X.Y.Z" * (dotted decimal) format. * * @return The 32-bit representation of IP(v4) address. @@ -3305,8 +3305,8 @@ uint32_t FreeRTOS_inet_addr( const char * pcIPAddress ) /** * @brief Function to get the local address and IP port of the given socket. * - * @param[in] xSocket: Socket whose port is to be added to the pxAddress. - * @param[out] pxAddress: Structure in which the IP address and the port number + * @param[in] xSocket Socket whose port is to be added to the pxAddress. + * @param[out] pxAddress Structure in which the IP address and the port number * is returned. * * @return Size of the freertos_sockaddr structure. @@ -3343,7 +3343,7 @@ size_t FreeRTOS_GetLocalAddress( ConstSocket_t xSocket, /** * @brief Wake up the user of the given socket through event-groups. * - * @param[in] pxSocket: The socket whose user is to be woken up. + * @param[in] pxSocket The socket whose user is to be woken up. */ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) { @@ -3402,7 +3402,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * number. This is probably only useful in systems with a minimum of * RAM and when lots of anonymous broadcast messages come in. * - * @param[in] usPortNr: the port number to look for. + * @param[in] usPortNr the port number to look for. * * @return xFound if a socket with the port number is found. */ @@ -3431,7 +3431,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Check if it makes any sense to wait for a connect event. * - * @param[in] pxSocket: The socket trying to connect. + * @param[in] pxSocket The socket trying to connect. * * @return It may return: -EINPROGRESS, -EAGAIN, or 0 for OK. */ @@ -3479,8 +3479,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Called from #FreeRTOS_connect(): make some checks and if allowed, * send a message to the IP-task to start connecting to a remote socket. * - * @param[in] pxSocket: The socket attempting to connect to a remote port. - * @param[in] pxAddress: The address the socket is trying to connect to. + * @param[in] pxSocket The socket attempting to connect to a remote port. + * @param[in] pxAddress The address the socket is trying to connect to. * * @return 0 on successful checks or a negative error code. */ @@ -3570,9 +3570,9 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Connect to a remote port. * - * @param[in] xClientSocket: The socket initiating the connection. - * @param[in] pxAddress: The address of the remote socket. - * @param[in] xAddressLength: This parameter is not used. It is kept in + * @param[in] xClientSocket The socket initiating the connection. + * @param[in] pxAddress The address of the remote socket. + * @param[in] xAddressLength This parameter is not used. It is kept in * the function signature to adhere to the Berkeley * sockets standard. * @@ -3670,9 +3670,9 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Check if a new connection has come in for a socket in listen mode. * - * @param[in] pxParentSocket : The parent socket, which is in listening mode. - * @param[out] pxAddress : The address of the peer will be filled in 'pxAddress'. - * @param[in] pxAddressLength : The actual size of the space pointed to by 'pxAddress'. + * @param[in] pxParentSocket The parent socket, which is in listening mode. + * @param[out] pxAddress The address of the peer will be filled in 'pxAddress'. + * @param[in] pxAddressLength The actual size of the space pointed to by 'pxAddress'. * @return A new connected socket or NULL. */ static FreeRTOS_Socket_t * prvAcceptWaitClient( FreeRTOS_Socket_t * pxParentSocket, @@ -3749,10 +3749,10 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Accept a connection on an listening socket. * - * @param[in] xServerSocket: The socket in listening mode. - * @param[out] pxAddress: The address of the machine trying to connect to this node + * @param[in] xServerSocket The socket in listening mode. + * @param[out] pxAddress The address of the machine trying to connect to this node * is returned in this pointer. - * @param[out] pxAddressLength: The length of the address of the remote machine. + * @param[out] pxAddressLength The length of the address of the remote machine. * * @return FreeRTOS_accept: can return a new connected socket if the server socket * is in listen mode and receives a connection request. The new socket will @@ -3853,11 +3853,11 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief After all checks have been done in FreeRTOS_recv() * read the data from the stream buffer. * - * @param[in] pxSocket: The socket owning the connection. - * @param[out] pvBuffer: The buffer to store the incoming data in. - * @param[in] uxBufferLength: The length of the buffer so that the function + * @param[in] pxSocket The socket owning the connection. + * @param[out] pvBuffer The buffer to store the incoming data in. + * @param[in] uxBufferLength The length of the buffer so that the function * does not do out of bound access. - * @param[in] xFlags: The flags for conveying preference. This routine + * @param[in] xFlags The flags for conveying preference. This routine * will check for 'FREERTOS_ZERO_COPY and/or'. * * @return The number of bytes actually received and stored in the pvBuffer. @@ -3912,10 +3912,10 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief After FreeRTOS_recv() has checked the validity of the parameters, * this routine will wait for data to arrive in the stream buffer. * - * @param[in] pxSocket: The socket owning the connection. - * @param[out] pxEventBits: A bit-mask of socket events will be set: + * @param[in] pxSocket The socket owning the connection. + * @param[out] pxEventBits A bit-mask of socket events will be set: * eSOCKET_RECEIVE, eSOCKET_CLOSED, and or eSOCKET_INTR. - * @param[in] xFlags: flags passed by the user, only 'FREERTOS_MSG_DONTWAIT' + * @param[in] xFlags flags passed by the user, only 'FREERTOS_MSG_DONTWAIT' * is checked in this function. */ static BaseType_t prvRecvWait( const FreeRTOS_Socket_t * pxSocket, @@ -4025,11 +4025,11 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Read incoming data from a TCP socket. Only after the last * byte has been read, a close error might be returned. * - * @param[in] xSocket: The socket owning the connection. - * @param[out] pvBuffer: The buffer to store the incoming data in. - * @param[in] uxBufferLength: The length of the buffer so that the function + * @param[in] xSocket The socket owning the connection. + * @param[out] pvBuffer The buffer to store the incoming data in. + * @param[in] uxBufferLength The length of the buffer so that the function * does not do out of bound access. - * @param[in] xFlags: The flags for conveying preference. The values + * @param[in] xFlags The flags for conveying preference. The values * FREERTOS_MSG_DONTWAIT, FREERTOS_ZERO_COPY and/or * FREERTOS_MSG_PEEK can be used. * @@ -4097,8 +4097,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Called from FreeRTOS_send(): some checks which will be done before * sending a TCP packed. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] uxDataLength: The length of the data to be sent. + * @param[in] pxSocket The socket owning the connection. + * @param[in] uxDataLength The length of the data to be sent. * * @return 0: representing OK, else a negative error code will be returned. */ @@ -4160,8 +4160,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Get a direct pointer to the circular transmit buffer. * - * @param[in] xSocket: The socket owning the buffer. - * @param[in] pxLength: This will contain the number of bytes that may be written. + * @param[in] xSocket The socket owning the buffer. + * @param[in] pxLength This will contain the number of bytes that may be written. * * @return Head of the circular transmit buffer if all checks pass. Or else, NULL * is returned. @@ -4209,10 +4209,10 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief This internal function will try to send as many bytes as possible to a TCP-socket. * - * @param[in] pxSocket : The socket owning the connection. - * @param[in] pvBuffer : The buffer containing the data to be sent. - * @param[in] uxDataLength : The number of bytes contained in the buffer. - * @param[in] xFlags : Only the flag 'FREERTOS_MSG_DONTWAIT' will be tested. + * @param[in] pxSocket The socket owning the connection. + * @param[in] pvBuffer The buffer containing the data to be sent. + * @param[in] uxDataLength The number of bytes contained in the buffer. + * @param[in] xFlags Only the flag 'FREERTOS_MSG_DONTWAIT' will be tested. * * @result The number of bytes queued for transmission. */ @@ -4357,12 +4357,12 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * connected already. Outgoing data will be stored and delivered as soon as * the socket gets connected. * - * @param[in] xSocket: The socket owning the connection. - * @param[in] pvBuffer: The buffer containing the data. The value of this pointer + * @param[in] xSocket The socket owning the connection. + * @param[in] pvBuffer The buffer containing the data. The value of this pointer * may be NULL in case zero-copy transmissions are used. * It is used in combination with 'FreeRTOS_get_tx_head()'. - * @param[in] uxDataLength: The length of the data to be added. - * @param[in] xFlags: This parameter is not used. (zero or FREERTOS_MSG_DONTWAIT). + * @param[in] uxDataLength The length of the data to be added. + * @param[in] xFlags This parameter is not used. (zero or FREERTOS_MSG_DONTWAIT). * * @return The number of bytes actually sent. Zero when nothing could be sent * or a negative error code in case an error occurred. @@ -4422,8 +4422,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Request to put a socket in listen mode. * - * @param[in] xSocket: the socket to be put in listening mode. - * @param[in] xBacklog: Maximum number of child sockets. + * @param[in] xSocket the socket to be put in listening mode. + * @param[in] xBacklog Maximum number of child sockets. * * @return 0 in case of success, or else a negative error code is * returned. @@ -4494,8 +4494,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * transmission, and also it will first wait to receive any missing * packets from the peer. * - * @param[in] xSocket: The socket owning the connection. - * @param[in] xHow: Not used. Just present to stick to Berkeley standard. + * @param[in] xSocket The socket owning the connection. + * @param[in] xHow Not used. Just present to stick to Berkeley standard. * * @return 0 on successful shutdown or else a negative error code. */ @@ -4545,7 +4545,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * - Send a keep-alive packet * - Check for timeout (in non-connected states only) * - * @param[in] xWillSleep: Whether the calling task is going to sleep. + * @param[in] xWillSleep Whether the calling task is going to sleep. * * @return Minimum amount of time before the timer shall expire. */ @@ -4646,10 +4646,10 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * For a socket in listening mode, the remote port and IP address * are both 0. * - * @param[in] ulLocalIP: Local IP address. Ignored for now. - * @param[in] uxLocalPort: Local port number. - * @param[in] ulRemoteIP: Remote (peer) IP address. - * @param[in] uxRemotePort: Remote (peer) port. + * @param[in] ulLocalIP Local IP address. Ignored for now. + * @param[in] uxLocalPort Local port number. + * @param[in] ulRemoteIP Remote (peer) IP address. + * @param[in] uxRemotePort Remote (peer) port. * * @return The socket which was found. */ @@ -4730,7 +4730,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief For the web server: borrow the circular Rx buffer for inspection. * HTML driver wants to see if a sequence of 13/10/13/10 is available. * - * @param[in] xSocket: The socket whose Rx stream is to be returned. + * @param[in] xSocket The socket whose Rx stream is to be returned. * * @return The Rx stream of the socket if all checks pass, else NULL. */ @@ -4758,8 +4758,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Create the stream buffer for the given socket. * - * @param[in] pxSocket: the socket to create the stream for. - * @param[in] xIsInputStream: Is this input stream? pdTRUE/pdFALSE? + * @param[in] pxSocket the socket to create the stream for. + * @param[in] xIsInputStream Is this input stream? pdTRUE/pdFALSE? * * @return The stream buffer. */ @@ -4867,9 +4867,9 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief The application can attach callback functions to a socket. In this function, * called by lTCPAddRxdata(), the TCP reception handler will be called. - * @param[in] pxSocket: The socket which has received TCP data. - * @param[in] pcData: The actual data received. - * @param[in] ulByteCount: The number of bytes that were received. + * @param[in] pxSocket The socket which has received TCP data. + * @param[in] pcData The actual data received. + * @param[in] ulByteCount The number of bytes that were received. */ static void vTCPAddRxdata_Callback( FreeRTOS_Socket_t * pxSocket, const uint8_t * pcData, @@ -4915,7 +4915,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Called by lTCPAddRxdata(), the received data has just been added to the * RX-stream. When the space is dropped below a threshold, it may set the * bit field 'bLowWater'. Also the socket's events bits for READ will be set. - * @param[in] pxSocket: the socket that has received new data. + * @param[in] pxSocket the socket that has received new data. */ static void vTCPAddRxdata_Stored( FreeRTOS_Socket_t * pxSocket ) { @@ -4956,10 +4956,10 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Add data to the RxStream. When uxOffset > 0, data has come in out-of-order * and will be put in front of the head so it can not be popped by the user. * - * @param[in] pxSocket: The socket to whose RxStream data is to be added. - * @param[in] uxOffset: Offset of the packet. - * @param[in] pcData: The data to be added to the RxStream. - * @param[in] ulByteCount: Number of bytes in the data. + * @param[in] pxSocket The socket to whose RxStream data is to be added. + * @param[in] uxOffset Offset of the packet. + * @param[in] pcData The data to be added to the RxStream. + * @param[in] ulByteCount Number of bytes in the data. * * @return The number of bytes actually added to the RxStream. Or else, a negative * error code is returned. @@ -5057,8 +5057,8 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Function to get the remote IP-address and port number. * - * @param[in] xSocket: Socket owning the connection. - * @param[out] pxAddress: The address pointer to which the address + * @param[in] xSocket Socket owning the connection. + * @param[out] pxAddress The address pointer to which the address * is to be added. * * @return The size of the address being returned. Or else a negative @@ -5121,7 +5121,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Get the version of IP: either 'ipTYPE_IPv4' or 'ipTYPE_IPv6'. * - * @param[in] xSocket : The socket to be checked. + * @param[in] xSocket The socket to be checked. * * @return Either ipTYPE_IPv4 or ipTYPE_IPv6. */ @@ -5145,7 +5145,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Check the number of bytes that may be added to txStream. * - * @param[in] xSocket: The socket to be checked. + * @param[in] xSocket The socket to be checked. * * @return the number of bytes that may be added to txStream or * else a negative error code. @@ -5188,7 +5188,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Get the number of bytes that can be written in the Tx buffer * of the given socket. * - * @param[in] xSocket: the socket to be checked. + * @param[in] xSocket the socket to be checked. * * @return The bytes that can be written. Or else an error code. */ @@ -5225,7 +5225,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Returns the number of bytes stored in the Tx buffer. * - * @param[in] xSocket: The socket to be checked. + * @param[in] xSocket The socket to be checked. * * @return The number of bytes stored in the Tx buffer of the socket. * Or an error code. @@ -5263,7 +5263,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Is the socket connected. * - * @param[in] xSocket: The socket being checked. + * @param[in] xSocket The socket being checked. * * @return pdTRUE if TCP socket is connected. */ @@ -5299,7 +5299,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Get the actual value of Maximum Segment Size ( MSS ) being used. * - * @param[in] xSocket: The socket whose MSS is to be returned. + * @param[in] xSocket The socket whose MSS is to be returned. * * @return the actual size of MSS being used or an error code. */ @@ -5333,7 +5333,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) * @brief Get the connection status. The values correspond to the members * of the enum 'eIPTCPState_t'. * - * @param[in] xSocket: Socket to get the connection status from. + * @param[in] xSocket Socket to get the connection status from. * * @return The connection status or an error code. * @@ -5366,7 +5366,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Returns the number of bytes which can be read from the RX stream buffer. * - * @param[in] xSocket: the socket to get the number of bytes from. + * @param[in] xSocket the socket to get the number of bytes from. * * @return Returns the number of bytes which can be read. Or an error * code is returned. @@ -5399,7 +5399,7 @@ void vSocketWakeUpUser( FreeRTOS_Socket_t * pxSocket ) /** * @brief Check whether a given socket is valid or not. Validity is defined * as the socket not being NULL and not being Invalid. - * @param[in] xSocket: The socket to be checked. + * @param[in] xSocket The socket to be checked. * @return pdTRUE if the socket is valid, else pdFALSE. * */ @@ -5431,7 +5431,7 @@ BaseType_t xSocketValid( const ConstSocket_t xSocket ) /** * @brief Returns the number of packets that are stored in a UDP socket. * - * @param[in] xSocket: the socket to get the number of bytes from. + * @param[in] xSocket the socket to get the number of bytes from. * * @return Returns the number of packets that are stored. Use FreeRTOS_recvfrom() * to retrieve those packets. @@ -5477,8 +5477,8 @@ BaseType_t xSocketValid( const ConstSocket_t xSocket ) /** * @brief Set the value of the SocketID of a socket. - * @param[in] xSocket: The socket whose ID should be set. - * @param[in] pvSocketID: The new value for the SocketID. + * @param[in] xSocket The socket whose ID should be set. + * @param[in] pvSocketID The new value for the SocketID. * @return Zero if the socket was valid, otherwise -EINVAL. */ BaseType_t xSocketSetSocketID( const Socket_t xSocket, @@ -5499,7 +5499,7 @@ BaseType_t xSocketSetSocketID( const Socket_t xSocket, /** * @brief Retrieve the SocketID that is associated with a socket. - * @param[in] xSocket: The socket whose ID should be returned. + * @param[in] xSocket The socket whose ID should be returned. * @return The current value of pvSocketID, or NULL in case * the socket pointer is not valid or when the ID was not * yet set. @@ -5523,7 +5523,7 @@ void * pvSocketGetSocketID( const ConstSocket_t xSocket ) /** * @brief A helper function of vTCPNetStat(), see below. * - * @param[in] pxSocket: The socket that needs logging. + * @param[in] pxSocket The socket that needs logging. * * @return */ @@ -5646,7 +5646,7 @@ void * pvSocketGetSocketID( const ConstSocket_t xSocket ) * socket has had any select event, either READ, WRITE, * or EXCEPT. * - * @param[in] pxSocket: The socket which needs to be checked. + * @param[in] pxSocket The socket which needs to be checked. * @return An event mask of events that are active for this socket. */ static EventBits_t vSocketSelectTCP( FreeRTOS_Socket_t * pxSocket ) @@ -5739,7 +5739,7 @@ void * pvSocketGetSocketID( const ConstSocket_t xSocket ) * will check if an ongoing select() call must be interrupted because of an * event has occurred. * - * @param[in] pxSocketSet: The socket-set which is to be waited on for change. + * @param[in] pxSocketSet The socket-set which is to be waited on for change. */ void vSocketSelect( const SocketSelect_t * pxSocketSet ) { @@ -5855,7 +5855,7 @@ void * pvSocketGetSocketID( const ConstSocket_t xSocket ) * Any ongoing blocking API ( e.g. FreeRTOS_recv() ) will be terminated * and return the value -pdFREERTOS_ERRNO_EINTR ( -4 ). * - * @param[in] xSocket: The socket that will be signalled. + * @param[in] xSocket The socket that will be signalled. * * @return If xSocket is an invalid socket (NULL) or if the socket set is invalid (NULL) * and/or if event group is invalid/not created, then, -pdFREERTOS_ERRNO_EINVAL @@ -5901,8 +5901,8 @@ void * pvSocketGetSocketID( const ConstSocket_t xSocket ) * @brief The same as 'FreeRTOS_SignalSocket()', except that this function should * be called from an ISR context. * - * @param[in] xSocket: The socket that will be signalled. - * @param[in,out] pxHigherPriorityTaskWoken: will be set to non-zero in case a higher- + * @param[in] xSocket The socket that will be signalled. + * @param[in,out] pxHigherPriorityTaskWoken will be set to non-zero in case a higher- * priority task has become runnable. */ BaseType_t FreeRTOS_SignalSocketFromISR( Socket_t xSocket, diff --git a/source/FreeRTOS_Stream_Buffer.c b/source/FreeRTOS_Stream_Buffer.c index 9dc92656fb..0552d6b1e3 100644 --- a/source/FreeRTOS_Stream_Buffer.c +++ b/source/FreeRTOS_Stream_Buffer.c @@ -47,9 +47,9 @@ /** * @brief Get the space between lower and upper value provided to the function. - * @param[in] pxBuffer: The circular stream buffer. - * @param[in] uxLower: The lower value. - * @param[in] uxUpper: The upper value. + * @param[in] pxBuffer The circular stream buffer. + * @param[in] uxLower The lower value. + * @param[in] uxUpper The upper value. * @return The space between uxLower and uxUpper, which equals to the distance * minus 1. */ @@ -71,9 +71,9 @@ size_t uxStreamBufferSpace( const StreamBuffer_t * pxBuffer, /** * @brief Get the distance between lower and upper value provided to the function. - * @param[in] pxBuffer: The circular stream buffer. - * @param[in] uxLower: The lower value. - * @param[in] uxUpper: The upper value. + * @param[in] pxBuffer The circular stream buffer. + * @param[in] uxLower The lower value. + * @param[in] uxUpper The upper value. * @return The distance between uxLower and uxUpper. */ size_t uxStreamBufferDistance( const StreamBuffer_t * pxBuffer, @@ -95,7 +95,7 @@ size_t uxStreamBufferDistance( const StreamBuffer_t * pxBuffer, /** * @brief Get the number of items which can be added to the buffer at * the head before reaching the tail. - * @param[in] pxBuffer: The circular stream buffer. + * @param[in] pxBuffer The circular stream buffer. * @return The number of items which can still be added to uxHead * before hitting on uxTail */ @@ -110,7 +110,7 @@ size_t uxStreamBufferGetSpace( const StreamBuffer_t * pxBuffer ) /** * @brief Get the distance between the pointer in free space and the tail. - * @param[in] pxBuffer: The circular stream buffer. + * @param[in] pxBuffer The circular stream buffer. * @return Distance between uxFront and uxTail or the number of items * which can still be added to uxFront, before hitting on uxTail. */ @@ -126,7 +126,7 @@ size_t uxStreamBufferFrontSpace( const StreamBuffer_t * pxBuffer ) /** * @brief Get the number of items which can be read from the tail before * reaching the head. - * @param[in] pxBuffer: The circular stream buffer. + * @param[in] pxBuffer The circular stream buffer. * @return The number of items which can be read from the tail before * reaching the head. */ @@ -142,7 +142,7 @@ size_t uxStreamBufferGetSize( const StreamBuffer_t * pxBuffer ) /** * @brief Get the space between the mid pointer and the head in the stream * buffer. - * @param[in] pxBuffer: The circular stream buffer. + * @param[in] pxBuffer The circular stream buffer. * @return The space between the mid pointer and the head. */ size_t uxStreamBufferMidSpace( const StreamBuffer_t * pxBuffer ) @@ -156,7 +156,7 @@ size_t uxStreamBufferMidSpace( const StreamBuffer_t * pxBuffer ) /** * @brief Move Clear the stream buffer. - * @param[in] pxBuffer: The circular stream buffer. + * @param[in] pxBuffer The circular stream buffer. */ void vStreamBufferClear( StreamBuffer_t * pxBuffer ) { @@ -171,8 +171,8 @@ void vStreamBufferClear( StreamBuffer_t * pxBuffer ) /** * @brief Move the mid pointer forward by given byte count - * @param[in] pxBuffer: The circular stream buffer. - * @param[in] uxCount: The byte count by which the mid pointer is to be moved. + * @param[in] pxBuffer The circular stream buffer. + * @param[in] uxCount The byte count by which the mid pointer is to be moved. */ void vStreamBufferMoveMid( StreamBuffer_t * pxBuffer, size_t uxCount ) @@ -202,9 +202,9 @@ void vStreamBufferMoveMid( StreamBuffer_t * pxBuffer, * @brief Check whether the value in left is less than or equal to the * value in right from the perspective of the circular stream * buffer. - * @param[in] pxBuffer: The circular stream buffer. - * @param[in] uxLeft: The left pointer in the stream buffer. - * @param[in] uxRight: The right value pointer in the stream buffer. + * @param[in] pxBuffer The circular stream buffer. + * @param[in] uxLeft The left pointer in the stream buffer. + * @param[in] uxRight The right value pointer in the stream buffer. * @return pdTRUE if uxLeft <= uxRight, else pdFALSE. */ BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t * pxBuffer, @@ -227,8 +227,8 @@ BaseType_t xStreamBufferLessThenEqual( const StreamBuffer_t * pxBuffer, /** * @brief Get the pointer to data and the amount of data which can be read in one go. * - * @param[in] pxBuffer: The circular stream buffer. - * @param[out] ppucData: Pointer to the data pointer which will point to the + * @param[in] pxBuffer The circular stream buffer. + * @param[out] ppucData Pointer to the data pointer which will point to the * data which can be read. * * @return The number of bytes which can be read in one go (which might be less than @@ -250,12 +250,12 @@ size_t uxStreamBufferGetPtr( StreamBuffer_t * pxBuffer, /** * @brief Adds data to a stream buffer. * - * @param[in,out] pxBuffer: The buffer to which the bytes will be added. - * @param[in] uxOffset: If uxOffset > 0, data will be written at an offset from uxHead + * @param[in,out] pxBuffer The buffer to which the bytes will be added. + * @param[in] uxOffset If uxOffset > 0, data will be written at an offset from uxHead * while uxHead will not be moved yet. - * @param[in] pucData: A pointer to the data to be added. If 'pucData' equals NULL, + * @param[in] pucData A pointer to the data to be added. If 'pucData' equals NULL, * the function is called to advance the 'Head' only. - * @param[in] uxByteCount: The number of bytes to add. + * @param[in] uxByteCount The number of bytes to add. * * @return The number of bytes added to the buffer. */ @@ -351,11 +351,11 @@ size_t uxStreamBufferAdd( StreamBuffer_t * pxBuffer, /** * @brief Read bytes from stream buffer. * - * @param[in] pxBuffer: The buffer from which the bytes will be read. - * @param[in] uxOffset: can be used to read data located at a certain offset from 'lTail'. - * @param[in,out] pucData: If 'pucData' equals NULL, the function is called to advance 'lTail' only. - * @param[in] uxMaxCount: The number of bytes to read. - * @param[in] xPeek: if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will + * @param[in] pxBuffer The buffer from which the bytes will be read. + * @param[in] uxOffset can be used to read data located at a certain offset from 'lTail'. + * @param[in,out] pucData If 'pucData' equals NULL, the function is called to advance 'lTail' only. + * @param[in] uxMaxCount The number of bytes to read. + * @param[in] xPeek if 'xPeek' is pdTRUE, or if 'uxOffset' is non-zero, the 'lTail' pointer will * not be advanced. * * @return The count of the bytes read. diff --git a/source/FreeRTOS_TCP_IP.c b/source/FreeRTOS_TCP_IP.c index ab368e42ee..a47ca05ea0 100644 --- a/source/FreeRTOS_TCP_IP.c +++ b/source/FreeRTOS_TCP_IP.c @@ -102,7 +102,7 @@ /** @brief Close the socket another time. * - * @param[in] pxSocket: The socket to be checked. + * @param[in] pxSocket The socket to be checked. */ /* coverity[single_use] */ void vSocketCloseNextTime( FreeRTOS_Socket_t * pxSocket ) @@ -118,7 +118,7 @@ /** @brief Postpone a call to FreeRTOS_listen() to avoid recursive calls. * - * @param[in] pxSocket: The socket to be checked. + * @param[in] pxSocket The socket to be checked. */ /* coverity[single_use] */ void vSocketListenNextTime( FreeRTOS_Socket_t * pxSocket ) @@ -136,7 +136,7 @@ * @brief As soon as a TCP socket timer expires, this function will be called * (from xTCPTimerCheck). It can send a delayed ACK or new data. * - * @param[in] pxSocket: socket to be checked. + * @param[in] pxSocket socket to be checked. * * @return 0 on success, a negative error code on failure. A negative value will be * returned in case the hang-protection has put the socket in a wait-close state. @@ -246,7 +246,7 @@ /** * @brief 'Touch' the socket to keep it alive/updated. * - * @param[in] pxSocket: The socket to be updated. + * @param[in] pxSocket The socket to be updated. * * @note This is used for anti-hanging protection and TCP keep-alive messages. * Called in two places: after receiving a packet and after a state change. @@ -279,8 +279,8 @@ * that a socket has got (dis)connected, and setting bit to unblock a call to * FreeRTOS_select(). * - * @param[in] pxSocket: The socket whose state we are trying to change. - * @param[in] eTCPState: The state to which we want to change to. + * @param[in] pxSocket The socket whose state we are trying to change. + * @param[in] eTCPState The state to which we want to change to. */ void vTCPStateChange( FreeRTOS_Socket_t * pxSocket, enum eTCP_STATE eTCPState ) @@ -303,7 +303,7 @@ /* A socket was in the connecting phase but something * went wrong and it should be closed. */ FreeRTOS_debug_printf( ( "Move from %s to %s\n", - FreeRTOS_GetTCPStateName( xPreviousState ), + FreeRTOS_GetTCPStateName( ( UBaseType_t ) xPreviousState ), FreeRTOS_GetTCPStateName( eTCPState ) ) ); /* Set the flag to show that it was connected before and that the @@ -546,7 +546,7 @@ /** * @brief Calculate after how much time this socket needs to be checked again. * - * @param[in] pxSocket: The socket to be checked. + * @param[in] pxSocket The socket to be checked. * * @return The number of clock ticks before the timer expires. */ @@ -618,7 +618,7 @@ /** * @brief Process the received TCP packet. * - * @param[in] pxDescriptor: The descriptor in which the TCP packet is held. + * @param[in] pxDescriptor The descriptor in which the TCP packet is held. * * @return If the processing of the packet was successful, then pdPASS is returned * or else pdFAIL. @@ -664,7 +664,7 @@ * @brief In the API accept(), the user asks is there is a new client? As API's can * not walk through the xBoundTCPSocketsList the IP-task will do this. * - * @param[in] pxSocket: The socket for which the bound socket list will be iterated. + * @param[in] pxSocket The socket for which the bound socket list will be iterated. * * @return if there is a new client, then pdTRUE is returned or else, pdFALSE. */ diff --git a/source/FreeRTOS_TCP_Reception.c b/source/FreeRTOS_TCP_Reception.c index df9fb21790..a6cb4aafd5 100644 --- a/source/FreeRTOS_TCP_Reception.c +++ b/source/FreeRTOS_TCP_Reception.c @@ -82,8 +82,8 @@ /** * @brief Parse the TCP option(s) received, if present. * - * @param[in] pxSocket: The socket handling the connection. - * @param[in] pxNetworkBuffer: The network buffer containing the TCP + * @param[in] pxSocket The socket handling the connection. + * @param[in] pxNetworkBuffer The network buffer containing the TCP * packet. * * @return: If the options are well formed and processed successfully @@ -125,7 +125,7 @@ } else { - ucLength = ( ( ( pxTCPHeader->ucTCPOffset >> 4U ) - 5U ) << 2U ); + ucLength = ( uint8_t ) ( ( ( pxTCPHeader->ucTCPOffset >> 4U ) - 5U ) << 2U ); uxOptionsLength = ( size_t ) ucLength; if( pxNetworkBuffer->xDataLength > uxOptionOffset ) @@ -180,10 +180,10 @@ * @brief Identify and deal with a single TCP header option, advancing the pointer to * the header. * - * @param[in] pucPtr: Pointer to the TCP packet options. - * @param[in] uxTotalLength: Length of the TCP packet options. - * @param[in] pxSocket: Socket handling the connection. - * @param[in] xHasSYNFlag: Whether the header has SYN flag or not. + * @param[in] pucPtr Pointer to the TCP packet options. + * @param[in] uxTotalLength Length of the TCP packet options. + * @param[in] pxSocket Socket handling the connection. + * @param[in] xHasSYNFlag Whether the header has SYN flag or not. * * @return This function returns index of the next option if the current option is * successfully processed and it is not the end of options whereafter the caller @@ -365,9 +365,9 @@ * @brief Skip past TCP header options when doing Selective ACK, until there are no * more options left. * - * @param[in] pucPtr: Pointer to the TCP packet options. - * @param[in] uxIndex: Index of options in the TCP packet options. - * @param[in] pxSocket: Socket handling the TCP connection. + * @param[in] pucPtr Pointer to the TCP packet options. + * @param[in] uxIndex Index of options in the TCP packet options. + * @param[in] pxSocket Socket handling the TCP connection. */ static void prvReadSackOption( const uint8_t * const pucPtr, size_t uxIndex, @@ -419,8 +419,8 @@ * first thing that will be done is find the TCP payload data * and check the length of this data. * - * @param[in] pxNetworkBuffer: The network buffer holding the received data. - * @param[out] ppucRecvData: It will point to first byte of the TCP payload. + * @param[in] pxNetworkBuffer The network buffer holding the received data. + * @param[out] ppucRecvData It will point to first byte of the TCP payload. * * @return Length of the received buffer. */ @@ -529,10 +529,10 @@ * The second thing is to do is check if the payload data may * be accepted. If so, they will be added to the reception queue. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] pucRecvData: Pointer to received data. - * @param[in] pxNetworkBuffer: The network buffer descriptor. - * @param[in] ulReceiveLength: The length of the received data. + * @param[in] pxSocket The socket owning the connection. + * @param[in] pucRecvData Pointer to received data. + * @param[in] pxNetworkBuffer The network buffer descriptor. + * @param[in] ulReceiveLength The length of the received data. * * @return 0 on success, -1 on failure of storing data. */ diff --git a/source/FreeRTOS_TCP_State_Handling.c b/source/FreeRTOS_TCP_State_Handling.c index 2b045b1aa8..ad1e7a3131 100644 --- a/source/FreeRTOS_TCP_State_Handling.c +++ b/source/FreeRTOS_TCP_State_Handling.c @@ -88,7 +88,7 @@ /** * @brief Check whether the socket is active or not. * - * @param[in] eStatus: The status of the socket. + * @param[in] eStatus The status of the socket. * * @return pdTRUE if the socket must be checked. Non-active sockets * are waiting for user action, either connect() or close(). @@ -132,7 +132,7 @@ * This function checks if the socket is 'hanging', i.e. staying * too long in the same state. * - * @param[in] The socket to be checked. + * @param[in] pxSocket the socket to be checked. * * @return pdFALSE if no checks are needed, pdTRUE if checks were done, or negative * in case the socket has reached a critical time-out. The socket will go to @@ -224,8 +224,8 @@ * called, it has been checked that both reception and transmission * are complete. * - * @param[in] pxSocket: Socket owning the the connection. - * @param[in] pxNetworkBuffer: The network buffer carrying the TCP packet. + * @param[in] pxSocket Socket owning the the connection. + * @param[in] pxNetworkBuffer The network buffer carrying the TCP packet. * * @return Length of the packet to be sent. */ @@ -334,11 +334,11 @@ * from the states: eSYN_RECEIVED and eCONNECT_SYN. If the flags * received are correct, the socket will move to eESTABLISHED. * - * @param[in] pxSocket: The socket handling the connection. - * @param[in] pxNetworkBuffer: The pointer to the network buffer carrying + * @param[in] pxSocket The socket handling the connection. + * @param[in] pxNetworkBuffer The pointer to the network buffer carrying * the packet. - * @param[in] ulReceiveLength: Length in bytes of the data received. - * @param[in] uxOptionsLength: Length of the TCP options in bytes. + * @param[in] ulReceiveLength Length in bytes of the data received. + * @param[in] uxOptionsLength Length of the TCP options in bytes. * * @return Length of the data to be sent. */ @@ -488,10 +488,10 @@ * the code will check if it may be accepted, i.e. if all expected data has been * completely received. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in,out] ppxNetworkBuffer: Pointer to pointer to the network buffer. - * @param[in] ulReceiveLength: The length of the received packet. - * @param[in] uxOptionsLength: Length of TCP options. + * @param[in] pxSocket The socket owning the connection. + * @param[in,out] ppxNetworkBuffer Pointer to pointer to the network buffer. + * @param[in] ulReceiveLength The length of the received packet. + * @param[in] uxOptionsLength Length of TCP options. * * @return The send length of the packet to be sent. */ @@ -681,8 +681,8 @@ * @brief Check incoming packets for valid data and handle the state of the * TCP connection and respond according to the situation. * - * @param[in] pxSocket: The socket whose connection state is being handled. - * @param[in] ppxNetworkBuffer: The network buffer descriptor holding the + * @param[in] pxSocket The socket whose connection state is being handled. + * @param[in] ppxNetworkBuffer The network buffer descriptor holding the * packet received from the peer. * * @return If the data is correct and some packet was sent to the peer, then @@ -900,8 +900,8 @@ /** * @brief Handle 'listen' event on the given socket. * - * @param[in] pxSocket: The socket on which the listen occurred. - * @param[in] pxNetworkBuffer: The network buffer carrying the packet. + * @param[in] pxSocket The socket on which the listen occurred. + * @param[in] pxNetworkBuffer The network buffer carrying the packet. * * @return If a new socket/duplicate socket is created, then the pointer to * that socket is returned or else, a NULL pointer is returned. @@ -930,8 +930,8 @@ * the new socket to the same port as the listening socket. * Also, let the new socket inherit all properties from the listening socket. * - * @param[in] pxNewSocket: Pointer to the new socket. - * @param[in] pxSocket: Pointer to the socket being duplicated. + * @param[in] pxNewSocket Pointer to the new socket. + * @param[in] pxSocket Pointer to the socket being duplicated. * * @return If all steps all successful, then pdTRUE is returned. Else, pdFALSE. */ diff --git a/source/FreeRTOS_TCP_Transmission.c b/source/FreeRTOS_TCP_Transmission.c index 82c3bbf854..68e145b0e1 100644 --- a/source/FreeRTOS_TCP_Transmission.c +++ b/source/FreeRTOS_TCP_Transmission.c @@ -75,7 +75,7 @@ /** * @brief Check if the outgoing connection is already prepared, if not * call prvTCPPrepareConnect() to continue the preparation. - * @param[in] pxSocket: The socket that wants to connect. + * @param[in] pxSocket The socket that wants to connect. * @return Returns pdTRUE if the connection is prepared, i.e. the MAC- * address of the peer is already known. */ static BaseType_t prvTCPMakeSurePrepared( FreeRTOS_Socket_t * pxSocket ) @@ -98,7 +98,7 @@ /** * @brief prvTCPSendPacket() will be called when the socket time-out has been reached. * - * @param[in] pxSocket: The socket owning the connection. + * @param[in] pxSocket The socket owning the connection. * * @return Number of bytes to be sent. * @@ -190,8 +190,8 @@ * long as there is data to be sent and as long as the transmit * window isn't full. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in,out] ppxNetworkBuffer: Pointer to pointer to the network buffer. + * @param[in] pxSocket The socket owning the connection. + * @param[in,out] ppxNetworkBuffer Pointer to pointer to the network buffer. * * @return Total number of bytes sent. */ @@ -237,10 +237,10 @@ * called 'xTCP.xPacket'. A temporary xNetworkBuffer will be used to pass * the data to the NIC. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] pxDescriptor: The network buffer descriptor carrying the packet. - * @param[in] ulLen: Length of the packet being sent. - * @param[in] xReleaseAfterSend: pdTRUE if the ownership of the descriptor is + * @param[in] pxSocket The socket owning the connection. + * @param[in] pxDescriptor The network buffer descriptor carrying the packet. + * @param[in] ulLen Length of the packet being sent. + * @param[in] xReleaseAfterSend pdTRUE if the ownership of the descriptor is * transferred to the network interface. */ void prvTCPReturnPacket( FreeRTOS_Socket_t * pxSocket, @@ -430,7 +430,7 @@ /** * @brief Create the TCP window for the given socket. * - * @param[in] pxSocket: The socket for which the window is being created. + * @param[in] pxSocket The socket for which the window is being created. * * @note The SYN event is very important: the sequence numbers, which have a kind of * random starting value, are being synchronized. The sliding window manager @@ -465,7 +465,7 @@ * @brief Let ARP look-up the MAC-address of the peer and initialise the first SYN * packet. * - * @param[in] pxSocket: The socket owning the TCP connection. The first packet shall + * @param[in] pxSocket The socket owning the TCP connection. The first packet shall * be created in this socket. * * @return pdTRUE: if the packet was successfully created and the first SYN can be sent. @@ -498,7 +498,7 @@ /** * @brief Get the window scaling factor for the TCP connection. * - * @param[in] pxSocket: The socket owning the TCP connection. + * @param[in] pxSocket The socket owning the TCP connection. * * @return The scaling factor. */ @@ -535,9 +535,9 @@ * communicate what MSS (Maximum Segment Size) they intend to use, whether Selective * ACK's ( SACK ) are supported, and the size of the reception window ( WSOPT ). * - * @param[in] pxSocket: The socket being used for communication. It is used to set + * @param[in] pxSocket The socket being used for communication. It is used to set * the MSS. - * @param[in,out] pxTCPHeader: The TCP packet header being used in the SYN transmission. + * @param[in,out] pxTCPHeader The TCP packet header being used in the SYN transmission. * The MSS and corresponding options shall be set in this * header itself. * @@ -590,10 +590,10 @@ * @brief Check if the size of a network buffer is big enough to hold the outgoing message. * Allocate a new bigger network buffer when necessary. * - * @param[in] pxSocket: Socket whose buffer is being resized. - * @param[in] pxNetworkBuffer: The network buffer whose size is being increased. - * @param[in] lDataLen: Length of the data to be put in the buffer. - * @param[in] uxOptionsLength: Length of options. + * @param[in] pxSocket Socket whose buffer is being resized. + * @param[in] pxNetworkBuffer The network buffer whose size is being increased. + * @param[in] lDataLen Length of the data to be put in the buffer. + * @param[in] uxOptionsLength Length of options. * * @return If the resizing is successful: The new buffer with the size being asked for * with old data copied in it. @@ -765,9 +765,9 @@ /** * @brief Prepare an outgoing message, in case anything has to be sent. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in,out] ppxNetworkBuffer: Pointer to the pointer to the network buffer. - * @param[in] uxOptionsLength: The length of the TCP options. + * @param[in] pxSocket The socket owning the connection. + * @param[in,out] ppxNetworkBuffer Pointer to the pointer to the network buffer. + * @param[in] uxOptionsLength The length of the TCP options. * * @return Length of the data to be sent if everything is correct. Else, -1 * is returned in case of any error. @@ -987,7 +987,7 @@ * @brief The API FreeRTOS_send() adds data to the TX stream. Add * this data to the windowing system to it can be transmitted. * - * @param[in] pxSocket: The socket owning the connection. + * @param[in] pxSocket The socket owning the connection. */ void prvTCPAddTxData( FreeRTOS_Socket_t * pxSocket ) { @@ -1027,8 +1027,8 @@ /** * @brief Set the TCP options (if any) for the outgoing packet. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] pxNetworkBuffer: The network buffer holding the packet. + * @param[in] pxSocket The socket owning the connection. + * @param[in] pxNetworkBuffer The network buffer holding the packet. * * @return Length of the TCP options after they are set. */ @@ -1113,10 +1113,10 @@ * ipconfigUSE_TCP_WIN is defined, and if only an ACK must be sent, it will be * checked if it would better be postponed for efficiency. * - * @param[in] pxSocket: The socket owning the TCP connection. - * @param[in] ppxNetworkBuffer: Pointer to pointer to the network buffer. - * @param[in] ulReceiveLength: The length of the received buffer. - * @param[in] xByteCount: Length of the data to be sent. + * @param[in] pxSocket The socket owning the TCP connection. + * @param[in] ppxNetworkBuffer Pointer to pointer to the network buffer. + * @param[in] ulReceiveLength The length of the received buffer. + * @param[in] xByteCount Length of the data to be sent. * * @return The number of bytes actually sent. */ @@ -1267,8 +1267,8 @@ * @brief Common code for sending a TCP protocol control packet (i.e. no options, no * payload, just flags). * - * @param[in] pxNetworkBuffer: The network buffer received from the peer. - * @param[in] ucTCPFlags: The flags to determine what kind of packet this is. + * @param[in] pxNetworkBuffer The network buffer received from the peer. + * @param[in] ucTCPFlags The flags to determine what kind of packet this is. * * @return pdFAIL always indicating that the packet was not consumed. */ @@ -1304,7 +1304,7 @@ * case #3. In summary, an RST was received with a sequence number that is * unexpected but still within the window. * - * @param[in] pxNetworkBuffer: The network buffer descriptor with the packet. + * @param[in] pxNetworkBuffer The network buffer descriptor with the packet. * * @return Returns the value back from #prvTCPSendSpecialPacketHelper. */ @@ -1317,7 +1317,7 @@ /** * @brief Send a RST (Reset) to peer in case the packet cannot be handled. * - * @param[in] pxNetworkBuffer: The network buffer descriptor with the packet. + * @param[in] pxNetworkBuffer The network buffer descriptor with the packet. * * @return Returns the value back from #prvTCPSendSpecialPacketHelper. */ diff --git a/source/FreeRTOS_TCP_Utils.c b/source/FreeRTOS_TCP_Utils.c index 109e3bc72a..6431f162bc 100644 --- a/source/FreeRTOS_TCP_Utils.c +++ b/source/FreeRTOS_TCP_Utils.c @@ -56,10 +56,12 @@ */ #if ( ipconfigHAS_DEBUG_PRINTF != 0 ) + static char retString[ 10 ]; + /** * @brief Print out the value of flags in a human readable manner. * - * @param[in] xFlags: The TCP flags. + * @param[in] xFlags The TCP flags. * * @return The string containing the flags. */ @@ -86,7 +88,7 @@ /** * @brief Set the MSS (Maximum segment size) associated with the given socket. * - * @param[in] pxSocket: The socket whose MSS is to be set. + * @param[in] pxSocket The socket whose MSS is to be set. */ void prvSocketSetMSS( FreeRTOS_Socket_t * pxSocket ) { diff --git a/source/FreeRTOS_TCP_WIN.c b/source/FreeRTOS_TCP_WIN.c index 863d70623d..a4aa300328 100644 --- a/source/FreeRTOS_TCP_WIN.c +++ b/source/FreeRTOS_TCP_WIN.c @@ -229,8 +229,8 @@ /** * @brief Check if a <= b. * - * @param[in] a: The value on the left-hand side. - * @param[in] b: The value on the right-hand side. + * @param[in] a The value on the left-hand side. + * @param[in] b The value on the right-hand side. * * @return pdTRUE when "( b - a ) < 0x80000000". Else, pdFALSE. */ @@ -256,8 +256,8 @@ /** * @brief Check if a < b. * - * @param[in] a: The value on the left-hand side. - * @param[in] b: The value on the right-hand side. + * @param[in] a The value on the left-hand side. + * @param[in] b The value on the right-hand side. * * @return pdTRUE when "( b - ( a + 1 ) ) < 0x80000000", else pdFALSE. */ @@ -280,8 +280,8 @@ /** * @brief Check if a > b. * - * @param[in] a: The value on the left-hand side. - * @param[in] b: The value on the right-hand side. + * @param[in] a The value on the left-hand side. + * @param[in] b The value on the right-hand side. * * @return pdTRUE when "( a - b ) < 0x80000000", else pdFALSE. */ @@ -307,8 +307,8 @@ /** * @brief Test if a>=b. This function is required since the sequence numbers can roll over. * - * @param[in] a: The first sequence number. - * @param[in] b: The second sequence number. + * @param[in] a The first sequence number. + * @param[in] b The second sequence number. * * @return pdTRUE if a>=b, else pdFALSE. */ @@ -334,8 +334,8 @@ /** * @brief Insert the given item in the list in FIFO manner. * - * @param[in] pxList: The list in which the item is to inserted. - * @param[in] pxNewListItem: The item to be inserted. + * @param[in] pxList The list in which the item is to inserted. + * @param[in] pxNewListItem The item to be inserted. */ static portINLINE void vListInsertFifo( List_t * const pxList, ListItem_t * const pxNewListItem ) @@ -350,7 +350,7 @@ /** * @brief Set the timer's "born" time. * - * @param[in] pxTimer: The TCP timer. + * @param[in] pxTimer The TCP timer. */ static portINLINE void vTCPTimerSet( TCPTimer_t * pxTimer ) { @@ -363,7 +363,7 @@ /** * @brief Get the timer age in milliseconds. * - * @param[in] pxTimer: The timer whose age is to be fetched. + * @param[in] pxTimer The timer whose age is to be fetched. * * @return The time in milliseconds since the timer was born. */ @@ -372,16 +372,16 @@ TickType_t uxNow = xTaskGetTickCount(); TickType_t uxDiff = uxNow - pxTimer->uxBorn; - return uxDiff * portTICK_PERIOD_MS; + return ( uint32_t ) ( uxDiff * portTICK_PERIOD_MS ); } /*-----------------------------------------------------------*/ /** * @brief Insert a new list item into a list. * - * @param[in] pxList: The list in which the item is to be inserted. - * @param[in] pxNewListItem: The item to be inserted. - * @param[in] pxWhere: Where should the item be inserted. + * @param[in] pxList The list in which the item is to be inserted. + * @param[in] pxNewListItem The item to be inserted. + * @param[in] pxWhere Where should the item be inserted. */ static void vListInsertGeneric( List_t * const pxList, ListItem_t * const pxNewListItem, @@ -468,8 +468,8 @@ /** * @brief Find a segment with a given sequence number in the list of received segments. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulSequenceNumber: the sequence number to look-up + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulSequenceNumber the sequence number to look-up * * @return The address of the segment descriptor found, or NULL when not found. */ @@ -511,10 +511,10 @@ /** * @brief Allocate a new segment object, either for transmission or reception. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulSequenceNumber: The sequence number. - * @param[in] lCount: The number of bytes stored in this segment. - * @param[in] xIsForRx: True when this is a reception segment. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulSequenceNumber The sequence number. + * @param[in] lCount The number of bytes stored in this segment. + * @param[in] xIsForRx True when this is a reception segment. * * @return Allocate and initialise a segment descriptor, or NULL when none was available. */ @@ -589,7 +589,7 @@ /** * @brief See if the peer has more packets for this node, before allowing to shut down the connection. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. + * @param[in] pxWindow The descriptor of the TCP sliding windows. * * @return pdTRUE if the connection can be closed. Else, pdFALSE. */ @@ -631,7 +631,7 @@ /** * @brief Remove the head item of a list (generic function). * - * @param[in] pxList: The list of segment descriptors. + * @param[in] pxList The list of segment descriptors. * * @return The address of the segment descriptor, or NULL when not found. */ @@ -663,7 +663,7 @@ /** * @brief Return the head item of a list (generic function). * - * @param[in] pxList: The list of segment descriptors. + * @param[in] pxList The list of segment descriptors. * * @return The address of the segment descriptor, or NULL when the list is empty. */ @@ -693,7 +693,7 @@ /** * @brief Release a segment object, return it to the list of available segment holders. * - * @param[in] pxSegment: The segment descriptor that must be freed. + * @param[in] pxSegment The segment descriptor that must be freed. */ static void vTCPWindowFree( TCPSegment_t * pxSegment ) { @@ -727,7 +727,7 @@ /** * @brief Return all segment descriptor to the poll of descriptors, before deleting a socket. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. + * @param[in] pxWindow The descriptor of the TCP sliding windows. */ void vTCPWindowDestroy( TCPWindow_t const * pxWindow ) { @@ -766,12 +766,12 @@ /** * @brief Create a window for TCP. * - * @param[in] pxWindow: The window to be created. - * @param[in] ulRxWindowLength: The length of the receive window. - * @param[in] ulTxWindowLength: The length of the transmit window. - * @param[in] ulAckNumber: The first ACK number. - * @param[in] ulSequenceNumber: The first sequence number. - * @param[in] ulMSS: The MSS of the connection. + * @param[in] pxWindow The window to be created. + * @param[in] ulRxWindowLength The length of the receive window. + * @param[in] ulTxWindowLength The length of the transmit window. + * @param[in] ulAckNumber The first ACK number. + * @param[in] ulSequenceNumber The first sequence number. + * @param[in] ulMSS The MSS of the connection. */ void vTCPWindowCreate( TCPWindow_t * pxWindow, uint32_t ulRxWindowLength, @@ -814,10 +814,10 @@ /** * @brief Initialise a TCP window. * - * @param[in] pxWindow: The window to be initialised. - * @param[in] ulAckNumber: The number of the first ACK. - * @param[in] ulSequenceNumber: The first sequence number. - * @param[in] ulMSS: The MSS of the connection. + * @param[in] pxWindow The window to be initialised. + * @param[in] ulAckNumber The number of the first ACK. + * @param[in] ulSequenceNumber The first sequence number. + * @param[in] ulMSS The MSS of the connection. */ void vTCPWindowInit( TCPWindow_t * pxWindow, uint32_t ulAckNumber, @@ -915,9 +915,9 @@ /** * @brief A expected segment has been received, see if there is overlap with earlier segments. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulSequenceNumber: The sequence number of the segment that was received. - * @param[in] ulLength: The number of bytes that were received. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulSequenceNumber The sequence number of the segment that was received. + * @param[in] ulLength The number of bytes that were received. * * @return The first segment descriptor involved, or NULL when no matching descriptor was found. */ @@ -987,8 +987,8 @@ /** * @brief Data has been received with the correct ( expected ) sequence number. * It can be added to the RX stream buffer. - * @param[in] pxWindow: The TCP sliding window data of the socket. - * @param[in] ulLength: The number of bytes that can be added. + * @param[in] pxWindow The TCP sliding window data of the socket. + * @param[in] ulLength The number of bytes that can be added. */ static void prvTCPWindowRx_ExpectedRX( TCPWindow_t * pxWindow, uint32_t ulLength ) @@ -1063,9 +1063,9 @@ /** * @brief Data has been received with a non-expected sequence number. * This function will check if the RX data can be accepted. - * @param[in] pxWindow: The TCP sliding window data of the socket. - * @param[in] ulSequenceNumber: The sequence number at which the data should be placed. - * @param[in] ulLength: The number of bytes that can be added. + * @param[in] pxWindow The TCP sliding window data of the socket. + * @param[in] ulSequenceNumber The sequence number at which the data should be placed. + * @param[in] ulLength The number of bytes that can be added. * @return Return -1 if the data must be refused, otherwise it returns the * offset ( from the head ) at which the data can be placed. */ @@ -1174,11 +1174,11 @@ /** * @brief Check what to do with a new incoming packet: store or ignore. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulSequenceNumber: The sequence number of the packet received. - * @param[in] ulLength: The number of bytes received. - * @param[in] ulSpace: The available space in the RX stream buffer. - * @param[out] pulSkipCount: the number of bytes to skip in the receive buffer. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulSequenceNumber The sequence number of the packet received. + * @param[in] ulLength The number of bytes received. + * @param[in] ulSpace The available space in the RX stream buffer. + * @param[out] pulSkipCount the number of bytes to skip in the receive buffer. * * @return 0 or positive value indicating the offset at which the packet is to * be stored, -1 if the packet is to be ignored. @@ -1320,9 +1320,9 @@ /** * @brief Increment the position in a circular buffer of size 'lMax'. * - * @param[in] lPosition: The current index in the buffer. - * @param[in] lMax: The total number of items in this buffer. - * @param[in] lCount: The number of bytes that must be advanced. + * @param[in] lPosition The current index in the buffer. + * @param[in] lMax The total number of items in this buffer. + * @param[in] lCount The number of bytes that must be advanced. * * @return The new incremented position, or "( lPosition + lCount ) % lMax". */ @@ -1353,10 +1353,10 @@ * @brief Adding data to a segment that was already in the TX queue. It * will be filled-up to a maximum of MSS ( maximum segment size ). * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] pxSegment: The TX segment with the highest sequence number, + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] pxSegment The TX segment with the highest sequence number, * i.e. the "front segment". - * @param[in] lBytesLeft: The number of bytes that must be added. + * @param[in] lBytesLeft The number of bytes that must be added. * * @return lToWrite: the number of bytes added to the segment. */ @@ -1400,10 +1400,10 @@ /** * @brief Will add data to be transmitted to the front of the segment fifo. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulLength: The number of bytes that will be sent. - * @param[in] lPosition: The index in the TX stream buffer. - * @param[in] lMax: The size of the ( circular ) TX stream buffer. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulLength The number of bytes that will be sent. + * @param[in] lPosition The index in the TX stream buffer. + * @param[in] lMax The size of the ( circular ) TX stream buffer. * * @return The number of bytes added to the sliding window for transmission. * @@ -1492,7 +1492,7 @@ /** * @brief Returns true if there are no more outstanding TX segments. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. + * @param[in] pxWindow The descriptor of the TCP sliding windows. * * @return pdTRUE if there are no more outstanding Tx segments, else pdFALSE. */ @@ -1508,8 +1508,8 @@ /** * @brief Find out if the peer is able to receive more data. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulWindowSize: The number of bytes in this segment. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulWindowSize The number of bytes in this segment. * * @return True if the peer has space in it window to receive more data. */ @@ -1578,9 +1578,9 @@ /** * @brief Returns true if there is TX data that can be sent right now. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulWindowSize: The current size of the sliding RX window of the peer. - * @param[out] pulDelay: The delay before the packet may be sent. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulWindowSize The current size of the sliding RX window of the peer. + * @param[out] pulDelay The delay before the packet may be sent. * * @return pdTRUE if there is Tx data that can be sent, else pdFALSE. */ @@ -1669,7 +1669,7 @@ * @brief Three type of queues are used for transmission: priority, waiting, and * the normal TX queue of unsent data. Message in the waiting queue will * be sent when their timer has expired. - * @param[in] pxWindow: The descriptor of the TCP sliding windows. + * @param[in] pxWindow The descriptor of the TCP sliding windows. */ static TCPSegment_t * pxTCPWindowTx_GetWaitQueue( const TCPWindow_t * pxWindow ) { @@ -1720,8 +1720,8 @@ * @brief See if there is a transmission in the normal TX queue. It is the * first time these data are being sent. After sending they will move * the waiting queue. - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulWindowSize: The available space that the peer has in his + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulWindowSize The available space that the peer has in his * reception window. * @return Either a segment that has to be sent, or NULL. */ @@ -1787,9 +1787,9 @@ * @brief Get data that can be transmitted right now. There are three types of * outstanding segments: Priority queue, Waiting queue, Normal TX queue. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulWindowSize: The current size of the sliding RX window of the peer. - * @param[out] plPosition: The index within the TX stream buffer of the first byte to be sent. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulWindowSize The current size of the sliding RX window of the peer. + * @param[out] plPosition The index within the TX stream buffer of the first byte to be sent. * * @return The amount of data in bytes that can be transmitted right now. */ @@ -1891,8 +1891,8 @@ * of the round-trip time, and calculate the new timeout for transmissions. * More explanation in a comment here below. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] pxSegment: The segment that was just acknowledged. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] pxSegment The segment that was just acknowledged. */ static void prvTCPWindowTxCheckAck_CalcSRTT( TCPWindow_t * pxWindow, const TCPSegment_t * pxSegment ) @@ -1927,9 +1927,9 @@ * ( ( ulSequenceNumber >= ulFirst ) && ( ulSequenceNumber < ulLast ) in a contiguous block. * Note that the segments are stored in xTxSegments in a strict sequential order. * - * @param[in] pxWindow: The TCP-window object of the current connection. - * @param[in] ulFirst: The sequence number of the first byte that was acknowledged. - * @param[in] ulLast: The sequence number of the last byte ( minus one ) that was acknowledged. + * @param[in] pxWindow The TCP-window object of the current connection. + * @param[in] ulFirst The sequence number of the first byte that was acknowledged. + * @param[in] ulLast The sequence number of the last byte ( minus one ) that was acknowledged. * * @return number of bytes that the tail of txStream may be advanced. */ @@ -2081,8 +2081,8 @@ /** * @brief See if there are segments that need a fast retransmission. * - * @param[in] pxWindow: The descriptor of the TCP sliding windows. - * @param[in] ulFirst: The sequence number of the first segment that must be checked. + * @param[in] pxWindow The descriptor of the TCP sliding windows. + * @param[in] ulFirst The sequence number of the first segment that must be checked. * * @return The number of segments that need a fast retransmission. */ @@ -2158,8 +2158,8 @@ /** * @brief Receive a normal ACK. * - * @param[in] pxWindow: Window in which a data is receive. - * @param[in] ulSequenceNumber: The sequence number of the ACK. + * @param[in] pxWindow Window in which a data is receive. + * @param[in] ulSequenceNumber The sequence number of the ACK. * * @return The location where the packet should be added. */ @@ -2192,9 +2192,9 @@ /** * @brief Receive a SACK option. * - * @param[in] pxWindow: Window in which the data is received. - * @param[in] ulFirst: Index of starting position of options. - * @param[in] ulLast: Index of end position of the options. + * @param[in] pxWindow Window in which the data is received. + * @param[in] ulFirst Index of starting position of options. + * @param[in] ulLast Index of end position of the options. * * @return returns the number of bytes which have been acked starting from * the head position. diff --git a/source/FreeRTOS_Tiny_TCP.c b/source/FreeRTOS_Tiny_TCP.c index fc60c491a5..2778b7083b 100644 --- a/source/FreeRTOS_Tiny_TCP.c +++ b/source/FreeRTOS_Tiny_TCP.c @@ -77,8 +77,8 @@ /** * @brief Test if a>=b. This function is required since the sequence numbers can roll over. * - * @param[in] a: The first sequence number. - * @param[in] b: The second sequence number. + * @param[in] a The first sequence number. + * @param[in] b The second sequence number. * * @return pdTRUE if a>=b, else pdFALSE. */ @@ -102,7 +102,7 @@ /** * @brief Set the timer's "born" time. * - * @param[in] pxTimer: The TCP timer. + * @param[in] pxTimer The TCP timer. */ static portINLINE void vTCPTimerSet( TCPTimer_t * pxTimer ) { @@ -115,7 +115,7 @@ /** * @brief Get the timer age in milliseconds. * - * @param[in] pxTimer: The timer whose age is to be fetched. + * @param[in] pxTimer The timer whose age is to be fetched. * * @return The time in milliseconds since the timer was born. */ @@ -132,10 +132,10 @@ * @brief Data was received at 'ulSequenceNumber'. See if it was expected * and if there is enough space to store the new data. * - * @param[in] pxWindow: The window to be checked. - * @param[in] ulSequenceNumber: Sequence number of the data received. - * @param[in] ulLength: Length of the data received. - * @param[in] ulSpace: Space in the buffer. + * @param[in] pxWindow The window to be checked. + * @param[in] ulSequenceNumber Sequence number of the data received. + * @param[in] ulLength Length of the data received. + * @param[in] ulSpace Space in the buffer. * * @return A 0 is returned if there is enough space and the sequence number is correct, * if not then a -1 is returned. @@ -175,10 +175,10 @@ /** * @brief Add data to the Tx Window. * - * @param[in] pxWindow: The window to which the data is to be added. - * @param[in] ulLength: The length of the data to be added. - * @param[in] lPosition: Position in the stream. - * @param[in] lMax: Size of the Tx stream. + * @param[in] pxWindow The window to which the data is to be added. + * @param[in] ulLength The length of the data to be added. + * @param[in] lPosition Position in the stream. + * @param[in] lMax Size of the Tx stream. * * @return The data actually added. */ @@ -244,9 +244,9 @@ /** * @brief Fetches data to be sent. * - * @param[in] pxWindow: The window for the connection. - * @param[in] ulWindowSize: The size of the window. - * @param[out] plPosition: plPosition will point to a location with the circular data buffer: txStream. + * @param[in] pxWindow The window for the connection. + * @param[in] ulWindowSize The size of the window. + * @param[out] plPosition plPosition will point to a location with the circular data buffer: txStream. * * @return return the amount of data which may be sent along with the position in the txStream. */ @@ -295,7 +295,7 @@ /** * @brief Has the transmission completed. * - * @param[in] pxWindow: The window whose transmission window is to be checked. + * @param[in] pxWindow The window whose transmission window is to be checked. * * @return If there is no outstanding data then pdTRUE is returned, * else pdFALSE. @@ -326,8 +326,8 @@ /** * @brief Check if the window has space for one message. * - * @param[in] pxWindow: The window to be checked. - * @param[in] ulWindowSize: Size of the window. + * @param[in] pxWindow The window to be checked. + * @param[in] ulWindowSize Size of the window. * * @return pdTRUE if the window has space, pdFALSE otherwise. */ @@ -355,9 +355,9 @@ /** * @brief Check data to be sent and calculate the time period the process may sleep. * - * @param[in] pxWindow: The window to be checked. - * @param[in] ulWindowSize: Size of the window. - * @param[out] pulDelay: The time period (in ticks) that the process may sleep. + * @param[in] pxWindow The window to be checked. + * @param[in] ulWindowSize Size of the window. + * @param[out] pulDelay The time period (in ticks) that the process may sleep. * * @return pdTRUE if the process should sleep or pdFALSE. */ @@ -412,8 +412,8 @@ /** * @brief Receive a normal ACK. * - * @param[in] pxWindow: The window for this particular connection. - * @param[in] ulSequenceNumber: The sequence number of the packet. + * @param[in] pxWindow The window for this particular connection. + * @param[in] ulSequenceNumber The sequence number of the packet. * * @return Number of bytes to send. */ @@ -466,7 +466,7 @@ * @brief This function will be called as soon as a FIN is received to check * whether all transmit queues are empty or not. * - * @param[in] pxWindow: The window to be checked. + * @param[in] pxWindow The window to be checked. * * @return It will return true if there are no 'open' reception segments. */ @@ -485,7 +485,7 @@ /** * @brief Destroy a window. * - * @param[in] pxWindow: Pointer to the window to be destroyed. + * @param[in] pxWindow Pointer to the window to be destroyed. * * @return Always returns a NULL. */ diff --git a/source/FreeRTOS_UDP_IPv4.c b/source/FreeRTOS_UDP_IPv4.c index 67f6d26f8b..de42ebc1a1 100644 --- a/source/FreeRTOS_UDP_IPv4.c +++ b/source/FreeRTOS_UDP_IPv4.c @@ -68,7 +68,7 @@ * @brief Process the generated UDP packet and do other checks before sending the * packet such as ARP cache check and address resolution. * - * @param[in] pxNetworkBuffer: The network buffer carrying the packet. + * @param[in] pxNetworkBuffer The network buffer carrying the packet. */ void vProcessGeneratedUDPPacket_IPv4( NetworkBufferDescriptor_t * const pxNetworkBuffer ) { @@ -324,9 +324,9 @@ void vProcessGeneratedUDPPacket_IPv4( NetworkBufferDescriptor_t * const pxNetwor /** * @brief Process the received UDP packet. * - * @param[in] pxNetworkBuffer: The network buffer carrying the UDP packet. - * @param[in] usPort: The port number on which this packet was received. - * @param[out] pxIsWaitingForARPResolution: If the packet is awaiting ARP resolution, + * @param[in] pxNetworkBuffer The network buffer carrying the UDP packet. + * @param[in] usPort The port number on which this packet was received. + * @param[out] pxIsWaitingForARPResolution If the packet is awaiting ARP resolution, * this pointer will be set to pdTRUE. pdFALSE otherwise. * * @return pdPASS in case the UDP packet could be processed. Else pdFAIL is returned. diff --git a/source/include/FreeRTOS_IP_Private.h b/source/include/FreeRTOS_IP_Private.h index c5ddbea1f4..49bb018bbe 100644 --- a/source/include/FreeRTOS_IP_Private.h +++ b/source/include/FreeRTOS_IP_Private.h @@ -384,10 +384,10 @@ extern struct xNetworkInterface * pxNetworkInterfaces; #define SOCKET_EVENT_BIT_COUNT 8 #define vSetField16( pxBase, xType, xField, usValue ) \ - { \ + do { \ ( ( uint8_t * ) ( pxBase ) )[ offsetof( xType, xField ) + 0 ] = ( uint8_t ) ( ( usValue ) >> 8 ); \ ( ( uint8_t * ) ( pxBase ) )[ offsetof( xType, xField ) + 1 ] = ( uint8_t ) ( ( usValue ) & 0xffU ); \ - } + } while( ipFALSE_BOOL ) #define vSetField32( pxBase, xType, xField, ulValue ) \ { \ diff --git a/test/build-combination/Common/FreeRTOSConfig.h b/test/build-combination/Common/FreeRTOSConfig.h index 9b68fb1b0d..22469a3493 100644 --- a/test/build-combination/Common/FreeRTOSConfig.h +++ b/test/build-combination/Common/FreeRTOSConfig.h @@ -114,8 +114,6 @@ void vLoggingPrintf( char const * pcFormat, ... ); -/* The function that implements FreeRTOS printf style output, and the macro - * that maps the configPRINTF() macros to that function. */ #define configPRINTF( X ) vLoggingPrintf X /* Non-format version thread-safe print. */ From a492abb0a86cb43b09333db79c8b981d63887dfc Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Mon, 17 Apr 2023 18:39:49 +0000 Subject: [PATCH 06/10] Fix Additional Clang warnings Corrects several warnings from Clang flags for Clang 13. --- source/FreeRTOS_BitConfig.c | 38 +++---- source/FreeRTOS_DHCPv6.c | 60 +++++------ source/FreeRTOS_DNS.c | 52 ++++----- source/FreeRTOS_DNS_Callback.c | 18 ++-- source/FreeRTOS_DNS_Networking.c | 4 +- source/FreeRTOS_IP_Utils.c | 30 +++--- source/FreeRTOS_IPv4.c | 14 +-- source/FreeRTOS_IPv4_Sockets.c | 18 ++-- source/FreeRTOS_IPv4_Utils.c | 10 +- source/FreeRTOS_IPv6.c | 34 +++--- source/FreeRTOS_IPv6_Sockets.c | 54 +++++----- source/FreeRTOS_IPv6_Utils.c | 12 +-- source/FreeRTOS_ND.c | 52 ++++----- source/FreeRTOS_RA.c | 33 +++--- source/FreeRTOS_Routing.c | 126 +++++++++++----------- source/FreeRTOS_TCP_IP_IPV4.c | 2 +- source/FreeRTOS_TCP_IP_IPV6.c | 2 +- source/FreeRTOS_TCP_State_Handling_IPV4.c | 4 +- source/FreeRTOS_TCP_State_Handling_IPV6.c | 4 +- source/FreeRTOS_TCP_Transmission.c | 20 ++-- source/FreeRTOS_TCP_Transmission_IPV4.c | 14 +-- source/FreeRTOS_TCP_Transmission_IPV6.c | 14 +-- source/FreeRTOS_TCP_Utils_IPV4.c | 2 +- source/FreeRTOS_TCP_Utils_IPV6.c | 2 +- source/FreeRTOS_UDP_IPv6.c | 14 +-- 25 files changed, 318 insertions(+), 315 deletions(-) diff --git a/source/FreeRTOS_BitConfig.c b/source/FreeRTOS_BitConfig.c index 762f8e8c21..54305b48a8 100644 --- a/source/FreeRTOS_BitConfig.c +++ b/source/FreeRTOS_BitConfig.c @@ -48,9 +48,9 @@ /** * @brief Initialise a bit-config struct. * - * @param[in] pxConfig: The structure containing a copy of the bits. - * @param[in] uxSize: The length of the binary data stream. - * @param[in] pucData: Not NULL if a bit-stream must be analysed, otherwise NULL. + * @param[in] pxConfig The structure containing a copy of the bits. + * @param[in] uxSize The length of the binary data stream. + * @param[in] pucData Not NULL if a bit-stream must be analysed, otherwise NULL. * * @return pdTRUE if the malloc was OK, otherwise pdFALSE. */ @@ -90,9 +90,9 @@ BaseType_t xBitConfig_init( BitConfig_t * pxConfig, /** * @brief Initialise a bit-config struct. * - * @param[in] pxConfig: The structure containing a copy of the bits. - * @param[in] uxSize: The length of the binary data stream. - * @param[in] pucData: Not NULL if a bit-stream must be analysed, otherwise NULL. + * @param[in] pxConfig The structure containing a copy of the bits. + * @param[in] uxSize The length of the binary data stream. + * @param[in] pucData Not NULL if a bit-stream must be analysed, otherwise NULL. * * @return pdTRUE if the malloc was OK, otherwise pdFALSE. */ @@ -132,7 +132,7 @@ BaseType_t xBitConfig_read_uc( BitConfig_t * pxConfig, /** * @brief Read a byte from the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. + * @param[in] pxConfig The structure containing a copy of the bits. * * @return A byte value. When there was not enough data, xHasError will be set. */ @@ -154,7 +154,7 @@ uint8_t ucBitConfig_read_8( BitConfig_t * pxConfig ) /** * @brief Read 2 bytes from the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. + * @param[in] pxConfig The structure containing a copy of the bits. * * @return A 16-bit value. When there was not enough data, xHasError will be set. */ @@ -177,7 +177,7 @@ uint16_t usBitConfig_read_16( BitConfig_t * pxConfig ) /** * @brief Read 4 bytes from the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. + * @param[in] pxConfig The structure containing a copy of the bits. * * @return A 32-bit value. When there was not enough data, xHasError will be set. */ @@ -202,9 +202,9 @@ uint32_t ulBitConfig_read_32( BitConfig_t * pxConfig ) /** * @brief Read any number bytes from the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bit stream. - * @param[in] pucData: The binary data to be written. - * @param[in] uxSize: The number of bytes to be written. + * @param[in] pxConfig The structure containing a copy of the bit stream. + * @param[in] pucData The binary data to be written. + * @param[in] uxSize The number of bytes to be written. * * There is no return value. If the operation has failed, * the field xHasError will be set. @@ -234,8 +234,8 @@ void vBitConfig_write_uc( BitConfig_t * pxConfig, /** * @brief Write a byte to the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. - * @param[in] ucValue: The byte to be written. + * @param[in] pxConfig The structure containing a copy of the bits. + * @param[in] ucValue The byte to be written. * * There is no return value. If the operation has failed, * the field xHasError will be set. @@ -252,8 +252,8 @@ void vBitConfig_write_8( BitConfig_t * pxConfig, /** * @brief Write a short word to the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. - * @param[in] usValue: The 16-bit value to be written. + * @param[in] pxConfig The structure containing a copy of the bits. + * @param[in] usValue The 16-bit value to be written. * * There is no return value. If the operation has failed, * the field xHasError will be set. @@ -273,8 +273,8 @@ void vBitConfig_write_16( BitConfig_t * pxConfig, /** * @brief Write a 32-bit word to the bit stream. * - * @param[in] pxConfig: The structure containing a copy of the bits. - * @param[in] ulValue: The 32-bit value to be written. + * @param[in] pxConfig The structure containing a copy of the bits. + * @param[in] ulValue The 32-bit value to be written. * * There is no return value. If the operation has failed, * the field xHasError will be set. @@ -298,7 +298,7 @@ void vBitConfig_write_32( BitConfig_t * pxConfig, * @brief Deallocate ( release ) the buffer, and clear the bit stream structure. * Note that the struct must have be initialised before calling this function. * - * @param[in] pxConfig: The structure containing a copy of the bits. + * @param[in] pxConfig The structure containing a copy of the bits. * */ void vBitConfig_release( BitConfig_t * pxConfig ) diff --git a/source/FreeRTOS_DHCPv6.c b/source/FreeRTOS_DHCPv6.c index d5decbf838..27328c5c91 100644 --- a/source/FreeRTOS_DHCPv6.c +++ b/source/FreeRTOS_DHCPv6.c @@ -213,7 +213,7 @@ static DHCPMessage_IPv6_t xDHCPMessage; /** * @brief Get the DHCP state from a given endpoint. * - * @param[in] pxEndPoint: The end-point for which vDHCPv6Process() is called. + * @param[in] pxEndPoint The end-point for which vDHCPv6Process() is called. * * @return DHCP state of the given endpoint * @@ -228,7 +228,7 @@ eDHCPState_t eGetDHCPv6State( struct xNetworkEndPoint * pxEndPoint ) /** * @brief A DHCPv6 reply has been received. See to which end-point it belongs and pass it. * - * @param[in] pxEndPoint: The end-point for which vDHCPv6Process() is called. + * @param[in] pxEndPoint The end-point for which vDHCPv6Process() is called. * * @return In case the message is passed to 'pxEndPoint', return pdFALSE, meaning that * the it has done its periodic processing. @@ -296,9 +296,9 @@ static BaseType_t xDHCPv6Process_PassReplyToEndPoint( struct xNetworkEndPoint * /** * @brief Check the DHCP socket and run one cycle of the DHCP state machine. * - * @param[in] xReset: When pdTRUE, the state machine needs to be reset. This may happen + * @param[in] xReset When pdTRUE, the state machine needs to be reset. This may happen * when the end-point has just become up. - * @param[in] pxEndPoint: The end-point that wants a DHCPv6 address. + * @param[in] pxEndPoint The end-point that wants a DHCPv6 address. */ void vDHCPv6Process( BaseType_t xReset, struct xNetworkEndPoint * pxEndPoint ) @@ -377,8 +377,8 @@ void vDHCPv6Process( BaseType_t xReset, /** * @brief The DHCP process is about ready: the server sends a confirmation that the * assigned IPv6 address may be used. The settings will be copied to 'pxEndPoint->ipv6_settings'. - * @param[in] pxEndPoint: The end-point that is asking for an IP-address. - * @param[in] pxDHCPMessage: The reply received from the DHCP server. + * @param[in] pxEndPoint The end-point that is asking for an IP-address. + * @param[in] pxDHCPMessage The reply received from the DHCP server. */ static void vDHCPv6ProcessEndPoint_HandleReply( NetworkEndPoint_t * pxEndPoint, DHCPMessage_IPv6_t * pxDHCPMessage ) @@ -433,8 +433,8 @@ static void vDHCPv6ProcessEndPoint_HandleReply( NetworkEndPoint_t * pxEndPoint, /** * @brief An advertise packet has been received. Ask the application if * it it shall send a request to obtain this IP-address. - * @param[in] pxEndPoint: The end-point that is asking for an IP-address. - * @param[in] pxDHCPMessage: The advertisement received from the DHCP server. + * @param[in] pxEndPoint The end-point that is asking for an IP-address. + * @param[in] pxDHCPMessage The advertisement received from the DHCP server. * @return When the request will be send, pdFALSE will be returned. */ static BaseType_t xDHCPv6ProcessEndPoint_HandleAdvertise( NetworkEndPoint_t * pxEndPoint, @@ -483,7 +483,7 @@ static BaseType_t xDHCPv6ProcessEndPoint_HandleAdvertise( NetworkEndPoint_t * px /** * @brief The first step in the DHCP dialogue is to ask the server for an offer. - * @param[in] pxEndPoint: The end-point that is asking for an IP-address. + * @param[in] pxEndPoint The end-point that is asking for an IP-address. */ static void vDHCPv6ProcessEndPoint_SendDiscover( NetworkEndPoint_t * pxEndPoint ) { @@ -510,8 +510,8 @@ static void vDHCPv6ProcessEndPoint_SendDiscover( NetworkEndPoint_t * pxEndPoint /** * @brief This function is called periodically, or when a message was received for this end-point. - * @param[in] pxEndPoint: The end-point that is asking for an IP-address. - * @param[in] pxDHCPMessage: when not NULL, a message that was received for this end-point. + * @param[in] pxEndPoint The end-point that is asking for an IP-address. + * @param[in] pxDHCPMessage when not NULL, a message that was received for this end-point. * @return It returns pdTRUE in case the DHCP process is to be cancelled. */ static BaseType_t xDHCPv6ProcessEndPoint_HandleState( NetworkEndPoint_t * pxEndPoint, @@ -734,9 +734,9 @@ static BaseType_t xDHCPv6ProcessEndPoint_HandleState( NetworkEndPoint_t * pxEndP /** * @brief Run one cycle of the DHCP state machine. * - * @param[in] xReset: pdTRUE is the state machine has to be reset. - * @param[in] pxEndPoint: The end-point that needs DHCP. - * @param[in] pxDHCPMessage: A DHCP message that has just been received, or NULL. + * @param[in] xReset pdTRUE is the state machine has to be reset. + * @param[in] pxEndPoint The end-point that needs DHCP. + * @param[in] pxDHCPMessage A DHCP message that has just been received, or NULL. */ static void vDHCPv6ProcessEndPoint( BaseType_t xReset, NetworkEndPoint_t * pxEndPoint, @@ -810,7 +810,7 @@ static void vDHCPv6ProcessEndPoint( BaseType_t xReset, * @brief Close the shared UDP/DHCP socket. This results in lowering the reference count. * The last user of the socket will close it. * - * @param[in] pxEndPoint: The end-point that wants to close the socket. + * @param[in] pxEndPoint The end-point that wants to close the socket. */ static void prvCloseDHCPv6Socket( NetworkEndPoint_t * pxEndPoint ) { @@ -846,7 +846,7 @@ static void prvCloseDHCPv6Socket( NetworkEndPoint_t * pxEndPoint ) /** * @brief Return the UDP/DHCP socket, or create if it doesn't exist. * - * @param[in] pxEndPoint: The end-point that needs the socket. + * @param[in] pxEndPoint The end-point that needs the socket. */ static void prvCreateDHCPv6Socket( NetworkEndPoint_t * pxEndPoint ) { @@ -894,7 +894,7 @@ static void prvCreateDHCPv6Socket( NetworkEndPoint_t * pxEndPoint ) /** * @brief Initialise the DHCP state machine of a given end-point. * - * @param[in] pxEndPoint: The end-point. + * @param[in] pxEndPoint The end-point. */ static void prvInitialiseDHCPv6( NetworkEndPoint_t * pxEndPoint ) { @@ -919,7 +919,7 @@ static void prvInitialiseDHCPv6( NetworkEndPoint_t * pxEndPoint ) /** * @brief Send a DHCPv6 message to a DHCP server. * - * @param[in] pxEndPoint: The end-point for which a message will be sent. + * @param[in] pxEndPoint The end-point for which a message will be sent. */ static void prvSendDHCPMessage( NetworkEndPoint_t * pxEndPoint ) { @@ -1073,10 +1073,10 @@ static void prvSendDHCPMessage( NetworkEndPoint_t * pxEndPoint ) * was received. This function will read sub options like 'IA_Address', * IA_Prefix, and Status_Code. * It parses the raw message and fills 'pxDHCPMessage'. - * @param[in] usOption: The DHCPv6 option that was received. - * @param[in] pxSet: It contains the length and offset of the DHCP option. - * @param[out] pxDHCPMessage: it will be filled with the information from the option. - * @param[in] pxMessage: The raw packet as it was received. + * @param[in] usOption The DHCPv6 option that was received. + * @param[in] pxSet It contains the length and offset of the DHCP option. + * @param[out] pxDHCPMessage it will be filled with the information from the option. + * @param[in] pxMessage The raw packet as it was received. */ static void prvDHCPv6_subOption( uint16_t usOption, const DHCPOptionSet_t * pxSet, @@ -1136,10 +1136,10 @@ static void prvDHCPv6_subOption( uint16_t usOption, /** * @brief A DHCP packet has a list of options, each one starting with a type and a length * field. This function parses a single DHCP option. - * @param[in] usOption: IPv6 DHCP option to be handled. - * @param[in] pxSet: It contains the length and offset of the DHCP option. - * @param[out] pxDHCPMessage: it will be filled with the information from the option. - * @param[in] pxMessage: The raw packet as it was received. + * @param[in] usOption IPv6 DHCP option to be handled. + * @param[in] pxSet It contains the length and offset of the DHCP option. + * @param[out] pxDHCPMessage it will be filled with the information from the option. + * @param[in] pxMessage The raw packet as it was received. */ static BaseType_t prvDHCPv6_handleOption( uint16_t usOption, const DHCPOptionSet_t * pxSet, @@ -1295,9 +1295,9 @@ static BaseType_t prvDHCPv6_handleOption( uint16_t usOption, /** * @brief Analyse the reply from a DHCP server. * - * @param[in] pucAnswer: The payload text of the incoming packet. - * @param[in] uxTotalLength: The number of valid bytes in pucAnswer. - * @param[in] pxDHCPMessage: The DHCP object of the end-point. + * @param[in] pucAnswer The payload text of the incoming packet. + * @param[in] uxTotalLength The number of valid bytes in pucAnswer. + * @param[in] pxDHCPMessage The DHCP object of the end-point. * * @return pdTRUE if the analysis was successful. */ @@ -1422,7 +1422,7 @@ static BaseType_t prvDHCPv6Analyse( const uint8_t * pucAnswer, /** * @brief transform a state number in a descriptive string. * - * @param[in] eState: The DHCP state number. + * @param[in] eState The DHCP state number. * * @return A descriptive string. */ diff --git a/source/FreeRTOS_DNS.c b/source/FreeRTOS_DNS.c index 21afc325ea..1fe36841ed 100644 --- a/source/FreeRTOS_DNS.c +++ b/source/FreeRTOS_DNS.c @@ -194,7 +194,7 @@ /** * @brief Define FreeRTOS_gethostbyname() as a normal blocking call. - * @param[in] pcHostName: The hostname whose IP address is being searched for. + * @param[in] pcHostName The hostname whose IP address is being searched for. * @return The IP-address of the hostname. */ uint32_t FreeRTOS_gethostbyname( const char * pcHostName ) @@ -219,7 +219,7 @@ /** * @brief Remove the entry defined by the search ID to cancel a DNS request. - * @param[in] pvSearchID: The search ID of the callback function associated with + * @param[in] pvSearchID The search ID of the callback function associated with * the DNS request being cancelled. Note that the value of * the pointer matters, not the pointee. */ @@ -236,10 +236,10 @@ /** * @brief Look-up the IP-address of a host. * - * @param[in] pcName: The name of the node or device - * @param[in] pcService: Ignored for now. - * @param[in] pxHints: If not NULL: preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). - * @param[out] ppxResult: An allocated struct, containing the results. + * @param[in] pcName The name of the node or device + * @param[in] pcService Ignored for now. + * @param[in] pxHints If not NULL preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). + * @param[out] ppxResult An allocated struct, containing the results. * * @return Zero when the operation was successful, otherwise a negative errno value. */ @@ -257,9 +257,9 @@ /** * @brief Internal function: allocate and initialise a new struct of type freertos_addrinfo. * - * @param[in] pcName: the name of the host. - * @param[in] xFamily: the type of IP-address: FREERTOS_AF_INET4 or FREERTOS_AF_INET6. - * @param[in] pucAddress: The IP-address of the host. + * @param[in] pcName the name of the host. + * @param[in] xFamily the type of IP-address: FREERTOS_AF_INET4 or FREERTOS_AF_INET6. + * @param[in] pucAddress The IP-address of the host. * * @return A pointer to the newly allocated struct, or NULL in case malloc failed.. */ @@ -311,7 +311,7 @@ /** * @brief Free a chain of structs of type 'freertos_addrinfo'. - * @param[in] pxInfo: The first find result. + * @param[in] pxInfo The first find result. */ void FreeRTOS_freeaddrinfo( struct freertos_addrinfo * pxInfo ) { @@ -335,13 +335,13 @@ /** * @brief Asynchronous version of getaddrinfo(). * - * @param[in] pcName: The name of the node or device - * @param[in] pcService: Ignored for now. - * @param[in] pxHints: If not NULL: preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). - * @param[out] ppxResult: An allocated struct, containing the results. - * @param[in] pCallback: A user-defined function which will be called on completion, either when found or after a time-out. - * @param[in] pvSearchID: A user provided void pointer that will be communicated on completion. - * @param[in] uxTimeout: The maximum number of clock ticks that must be waited for a reply. + * @param[in] pcName The name of the node or device + * @param[in] pcService Ignored for now. + * @param[in] pxHints If not NULL preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). + * @param[out] ppxResult An allocated struct, containing the results. + * @param[in] pCallback A user-defined function which will be called on completion, either when found or after a time-out. + * @param[in] pvSearchID A user provided void pointer that will be communicated on completion. + * @param[in] uxTimeout The maximum number of clock ticks that must be waited for a reply. * * @return Zero when the operation was successful, otherwise a negative errno value. */ @@ -356,10 +356,10 @@ /** * @brief Look-up the IP-address of a host. - * @param[in] pcName: The name of the node or device - * @param[in] pcService: Ignored for now. - * @param[in] pxHints: If not NULL: preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). - * @param[out] ppxResult: An allocated struct, containing the results. + * @param[in] pcName The name of the node or device + * @param[in] pcService Ignored for now. + * @param[in] pxHints If not NULL preferences. Can be used to indicate the preferred type if IP ( v4 or v6 ). + * @param[out] ppxResult An allocated struct, containing the results. * @return Zero when the operation was successful, otherwise a negative errno value. */ BaseType_t FreeRTOS_getaddrinfo( const char * pcName, /* The name of the node or device */ @@ -487,9 +487,9 @@ /** * @brief See if pcHostName contains a valid IPv4 or IPv6 IP-address. - * @param[in] pcHostName: The name to be looked up - * @param[in] xFamily: the IP-type, either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. - * @param[in] ppxAddressInfo: A pointer to a pointer where the find results will + * @param[in] pcHostName The name to be looked up + * @param[in] xFamily the IP-type, either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. + * @param[in] ppxAddressInfo A pointer to a pointer where the find results will * be stored. * @return Either 0 or an IP=address. */ @@ -983,7 +983,7 @@ /*! * @brief return ip address from the dns reply message * @param [in] pxReceiveBuffer received buffer from the DNS server - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. * @param [in] uxIdentifier matches sent and received packets * @param [in] usPort Port from which DNS reply was read @@ -1153,7 +1153,7 @@ * @param [in] pcHostName hostname to get its ip address * @param [in] uxIdentifier Identifier to match sent and received packets * @param [in] xDNSSocket socket - * @param[in,out] ppxAddressInfo: A pointer to a pointer where the find results + * @param[in,out] ppxAddressInfo A pointer to a pointer where the find results * will be stored. * @param[in] xFamily Either FREERTOS_AF_INET4 or FREERTOS_AF_INET6. * @param[in] uxReadTimeOut_ticks The timeout in ticks for waiting. In case the user has supplied diff --git a/source/FreeRTOS_DNS_Callback.c b/source/FreeRTOS_DNS_Callback.c index 8b6c1a3a28..fb6b2cadf5 100644 --- a/source/FreeRTOS_DNS_Callback.c +++ b/source/FreeRTOS_DNS_Callback.c @@ -48,8 +48,8 @@ * @brief A DNS reply was received, see if there is any matching entry and * call the handler. * - * @param[in,out] pxSet: a set of variables that are shared among the helper functions. - * @param[in] pxAddress: Pointer to address info ( IPv4/IPv6 ) obtained from the DNS server. + * @param[in,out] pxSet a set of variables that are shared among the helper functions. + * @param[in] pxAddress Pointer to address info ( IPv4/IPv6 ) obtained from the DNS server. * * @return Returns pdTRUE if uxIdentifier was recognized. */ @@ -122,12 +122,12 @@ * @brief FreeRTOS_gethostbyname_a() was called along with callback parameters. * Store them in a list for later reference. * - * @param[in] pcHostName: The hostname whose IP address is being searched for. - * @param[in] pvSearchID: The search ID of the DNS callback function to set. - * @param[in] pCallbackFunction: The callback function pointer. - * @param[in] uxTimeout: Timeout of the callback function. - * @param[in] uxIdentifier: Random number used as ID in the DNS message. - * @param[in] xIsIPv6: pdTRUE if the address type should be IPv6. + * @param[in] pcHostName The hostname whose IP address is being searched for. + * @param[in] pvSearchID The search ID of the DNS callback function to set. + * @param[in] pCallbackFunction The callback function pointer. + * @param[in] uxTimeout Timeout of the callback function. + * @param[in] uxIdentifier Random number used as ID in the DNS message. + * @param[in] xIsIPv6 pdTRUE if the address type should be IPv6. */ void vDNSSetCallBack( const char * pcHostName, void * pvSearchID, @@ -183,7 +183,7 @@ * As soon as the list has become empty, the DNS timer will be stopped. * In case pvSearchID is supplied, the user wants to cancel a DNS request. * - * @param[in] pvSearchID: The search ID of callback function whose associated + * @param[in] pvSearchID The search ID of callback function whose associated * DNS request is being cancelled. If non-ID specific checking of * all requests is required, then this field should be kept as NULL. */ diff --git a/source/FreeRTOS_DNS_Networking.c b/source/FreeRTOS_DNS_Networking.c index 15c5ad5adb..9d41bcd877 100644 --- a/source/FreeRTOS_DNS_Networking.c +++ b/source/FreeRTOS_DNS_Networking.c @@ -39,8 +39,8 @@ /** * @brief Bind the socket to a port number. - * @param[in] xSocket: the socket that must be bound. - * @param[in] usPort: the port number to bind to. + * @param[in] xSocket the socket that must be bound. + * @param[in] usPort the port number to bind to. * @return The created socket - or NULL if the socket could not be created or could not be bound. */ BaseType_t DNS_BindSocket( Socket_t xSocket, diff --git a/source/FreeRTOS_IP_Utils.c b/source/FreeRTOS_IP_Utils.c index 66d7673e41..d978d77213 100644 --- a/source/FreeRTOS_IP_Utils.c +++ b/source/FreeRTOS_IP_Utils.c @@ -137,10 +137,10 @@ static uint16_t prvGetChecksumFromPacket( const struct xPacketSummary * pxSet ); /** * @brief Set checksum in the packet * - * @param pxSet: Pointer to the packet summary that describes the packet, + * @param pxSet Pointer to the packet summary that describes the packet, * to which the checksum will be set. * - * @param usChecksum: Checksum value to be set. + * @param usChecksum Checksum value to be set. */ static void prvSetChecksumInPacket( const struct xPacketSummary * pxSet, uint16_t usChecksum ) @@ -171,7 +171,7 @@ static void prvSetChecksumInPacket( const struct xPacketSummary * pxSet, /** * @brief Get checksum from the packet summary * - * @param pxSet: Pointer to the packet summary that describes the packet, + * @param pxSet Pointer to the packet summary that describes the packet, * from which the checksum will be retrieved. * * @return Checksum value that is retrieved from pxSet. @@ -213,7 +213,7 @@ static uint16_t prvGetChecksumFromPacket( const struct xPacketSummary * pxSet ) * * @return pdPASS or pdFAIL, depending on whether xSendEventStructToIPTask() * succeeded. - * @param pxEndPoint: The end-point that needs DHCP. + * @param pxEndPoint The end-point that needs DHCP. */ BaseType_t xSendDHCPEvent( struct xNetworkEndPoint * pxEndPoint ) { @@ -371,8 +371,8 @@ static uintptr_t void_ptr_to_uintptr( const void * pvPointer ) /*-----------------------------------------------------------*/ /** @brief Get and check the specific lengths depending on the protocol ( TCP/UDP/ICMP/IGMP ). - * @param[in] uxBufferLength: The number of bytes to be sent or received. - * @param[in] pxSet: A struct describing this packet. + * @param[in] uxBufferLength The number of bytes to be sent or received. + * @param[in] pxSet A struct describing this packet. * * @return Non-zero in case of an error. */ @@ -469,7 +469,7 @@ static BaseType_t prvChecksumProtocolChecks( size_t uxBufferLength, /*-----------------------------------------------------------*/ /** @brief See if the packet doesn't get bigger than the value of MTU. - * @param[in] pxSet: A struct describing this packet. + * @param[in] pxSet A struct describing this packet. * * @return Non-zero in case of an error. */ @@ -507,9 +507,9 @@ static BaseType_t prvChecksumProtocolMTUCheck( struct xPacketSummary * pxSet ) /*-----------------------------------------------------------*/ /** @brief Do the actual checksum calculations, both the pseudo header, and the payload. - * @param[in] xOutgoingPacket: pdTRUE when the packet is to be sent. - * @param[in] pucEthernetBuffer: The buffer containing the packet. - * @param[in] pxSet: A struct describing this packet. + * @param[in] xOutgoingPacket pdTRUE when the packet is to be sent. + * @param[in] pucEthernetBuffer The buffer containing the packet. + * @param[in] pxSet A struct describing this packet. */ static void prvChecksumProtocolCalculate( BaseType_t xOutgoingPacket, const uint8_t * pucEthernetBuffer, @@ -612,10 +612,10 @@ static void prvChecksumProtocolCalculate( BaseType_t xOutgoingPacket, /** @brief For outgoing packets, set the checksum in the packet, * for incoming packets: show logging in case an error occurred. - * @param[in] xOutgoingPacket: Non-zero if this is an outgoing packet. - * @param[in] pucEthernetBuffer: The buffer containing the packet. - * @param[in] uxBufferLength: the total number of bytes received, or the number of bytes written - * @param[in] pxSet: A struct describing this packet. + * @param[in] xOutgoingPacket Non-zero if this is an outgoing packet. + * @param[in] pucEthernetBuffer The buffer containing the packet. + * @param[in] uxBufferLength the total number of bytes received, or the number of bytes written + * @param[in] pxSet A struct describing this packet. */ static void prvChecksumProtocolSetChecksum( BaseType_t xOutgoingPacket, const uint8_t * pucEthernetBuffer, @@ -762,7 +762,7 @@ BaseType_t xIsCallingFromIPTask( void ) /** * @brief Process a 'Network down' event and complete required processing. - * @param pxInterface: The interface that goes down. + * @param pxInterface The interface that goes down. */ /* MISRA Ref 8.9.1 [File scoped variables] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-89 */ diff --git a/source/FreeRTOS_IPv4.c b/source/FreeRTOS_IPv4.c index cec08bd05b..7054fb13a4 100644 --- a/source/FreeRTOS_IPv4.c +++ b/source/FreeRTOS_IPv4.c @@ -58,8 +58,8 @@ /** * @brief Check IPv4 packet length. * - * @param[in] pvEthernetBuffer: The Ethernet packet received. - * @param[in] uxBufferLength: The total number of bytes received. + * @param[in] pvEthernetBuffer The Ethernet packet received. + * @param[in] uxBufferLength The total number of bytes received. * * @return pdPASS when the length fields in the packet OK, pdFAIL when the packet * should be dropped. @@ -183,7 +183,7 @@ /** * @brief Is the IP address an IPv4 multicast address. * - * @param[in] ulIPAddress: The IP address being checked. + * @param[in] ulIPAddress The IP address being checked. * * @return pdTRUE if the IP address is a multicast address or else, pdFALSE. */ @@ -208,9 +208,9 @@ BaseType_t xIsIPv4Multicast( uint32_t ulIPAddress ) /** * @brief Check whether this IPv4 packet is to be allowed or to be dropped. * - * @param[in] pxIPPacket: The IP packet under consideration. - * @param[in] pxNetworkBuffer: The whole network buffer. - * @param[in] uxHeaderLength: The length of the header. + * @param[in] pxIPPacket The IP packet under consideration. + * @param[in] pxNetworkBuffer The whole network buffer. + * @param[in] uxHeaderLength The length of the header. * * @return Whether the packet should be processed or dropped. */ @@ -408,7 +408,7 @@ eFrameProcessingResult_t prvAllowIPPacketIPv4( const IPPacket_t * const pxIPPack /** @brief Check if the IP-header is carrying options. - * @param[in] pxNetworkBuffer: the network buffer that contains the packet. + * @param[in] pxNetworkBuffer the network buffer that contains the packet. * * @return Either 'eProcessBuffer' or 'eReleaseBuffer' */ diff --git a/source/FreeRTOS_IPv4_Sockets.c b/source/FreeRTOS_IPv4_Sockets.c index 82fdb80e30..0718e70b7b 100644 --- a/source/FreeRTOS_IPv4_Sockets.c +++ b/source/FreeRTOS_IPv4_Sockets.c @@ -56,8 +56,8 @@ * structure, then copies the network address structure to pvDestination. * pvDestination is written in network byte order. * - * @param[in] pcSource: The character string in holding the IP address. - * @param[out] pvDestination: The returned network address in 32-bit network-endian format. + * @param[in] pcSource The character string in holding the IP address. + * @param[out] pvDestination The returned network address in 32-bit network-endian format. * * @return pdPASS if the translation was successful or else pdFAIL. */ @@ -180,10 +180,10 @@ BaseType_t FreeRTOS_inet_pton4( const char * pcSource, /** * @brief Convert the 32-bit representation of the IP-address to the dotted decimal format. * - * @param[in] pvSource: The pointer to the 32-bit representation of the IP-address. - * @param[out] pcDestination: The pointer to a character array where the string of the + * @param[in] pvSource The pointer to the 32-bit representation of the IP-address. + * @param[out] pcDestination The pointer to a character array where the string of the * dotted decimal IP format. - * @param[in] uxSize: Size of the character array. This value makes sure that the code + * @param[in] uxSize Size of the character array. This value makes sure that the code * doesn't write beyond it's bounds. * * @return The pointer to the string holding the dotted decimal format of the IP-address. If @@ -217,8 +217,8 @@ const char * FreeRTOS_inet_ntop4( const void * pvSource, /** * @brief Called by prvSendUDPPacket(), this function will UDP packet * fields and IPv4 address for the packet to be send. - * @param[in] pxNetworkBuffer : The packet to be sent. - * @param[in] pxDestinationAddress: The IPv4 socket address. + * @param[in] pxNetworkBuffer The packet to be sent. + * @param[in] pxDestinationAddress The IPv4 socket address. * @return Returns NULL, always. */ void * xSend_UDP_Update_IPv4( NetworkBufferDescriptor_t * pxNetworkBuffer, @@ -239,8 +239,8 @@ void * xSend_UDP_Update_IPv4( NetworkBufferDescriptor_t * pxNetworkBuffer, /** * @brief Called by FreeRTOS_recvfrom(), this function will update socket * address with IPv4 address from the packet received. - * @param[in] pxNetworkBuffer : The packet received. - * @param[in] pxSourceAddress: The IPv4 socket address. + * @param[in] pxNetworkBuffer The packet received. + * @param[in] pxSourceAddress The IPv4 socket address. * @return The Payload Offset. */ size_t xRecv_Update_IPv4( const NetworkBufferDescriptor_t * pxNetworkBuffer, diff --git a/source/FreeRTOS_IPv4_Utils.c b/source/FreeRTOS_IPv4_Utils.c index ffee28c6d3..81c1e173a2 100644 --- a/source/FreeRTOS_IPv4_Utils.c +++ b/source/FreeRTOS_IPv4_Utils.c @@ -45,8 +45,8 @@ /** * @brief Set multicast MAC address. * - * @param[in] ulIPAddress: IP address. - * @param[out] pxMACAddress: Pointer to MAC address. + * @param[in] ulIPAddress IP address. + * @param[out] pxMACAddress Pointer to MAC address. */ void vSetMultiCastIPv4MacAddress( uint32_t ulIPAddress, MACAddress_t * pxMACAddress ) @@ -63,9 +63,9 @@ void vSetMultiCastIPv4MacAddress( uint32_t ulIPAddress, /*-----------------------------------------------------------*/ /** @brief Do the first IPv4 length checks at the IP-header level. - * @param[in] pucEthernetBuffer: The buffer containing the packet. - * @param[in] uxBufferLength: The number of bytes to be sent or received. - * @param[in] pxSet: A struct describing this packet. + * @param[in] pucEthernetBuffer The buffer containing the packet. + * @param[in] uxBufferLength The number of bytes to be sent or received. + * @param[in] pxSet A struct describing this packet. * * @return Non-zero in case of an error. */ diff --git a/source/FreeRTOS_IPv6.c b/source/FreeRTOS_IPv6.c index 5525d811f6..072c43cefb 100644 --- a/source/FreeRTOS_IPv6.c +++ b/source/FreeRTOS_IPv6.c @@ -80,8 +80,8 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0, 0, 0, 0, 0, 0, 0, /** * @brief Check IPv6 packet length. * - * @param[in] pvEthernetBuffer: The Ethernet packet received. - * @param[in] uxBufferLength: The total number of bytes received. + * @param[in] pvEthernetBuffer The Ethernet packet received. + * @param[in] uxBufferLength The total number of bytes received. * * @return pdPASS when the length fields in the packet OK, pdFAIL when the packet * should be dropped. @@ -210,7 +210,7 @@ const struct xIPv6_Address FreeRTOS_in6addr_loopback = { { 0, 0, 0, 0, 0, 0, 0, /** * @brief Check if ucNextHeader is an extension header. * - * @param[in] ucNextHeader: Next header, such as ipIPv6_EXT_HEADER_HOP_BY_HOP. + * @param[in] ucNextHeader Next header, such as ipIPv6_EXT_HEADER_HOP_BY_HOP. * * @return pdTRUE if it's extension header, otherwise pdFALSE. */ @@ -253,7 +253,7 @@ static const struct xIPv6_Address xIPv6UnspecifiedAddress = { { 0, 0, 0, 0, 0, 0 /** * @brief Get the group ID and stored into IPv6_Address_t. * - * @param[in] pxIPv6Address: The multicast address to filter group ID. + * @param[in] pxIPv6Address The multicast address to filter group ID. * * @return IPv6_Address_t with group ID only. */ @@ -276,7 +276,7 @@ static IPv6_Address_t xGetIPv6MulticastGroupID( const IPv6_Address_t * pxIPv6Add /** * @brief Check if the packet is a loopback packet. * - * @param[in] pxIPv6Header: The IP packet in pxNetworkBuffer. + * @param[in] pxIPv6Header The IP packet in pxNetworkBuffer. * * @return Returns pdTRUE if it's a legal loopback packet, pdFALSE if not . */ @@ -306,7 +306,7 @@ static IPv6_Address_t xGetIPv6MulticastGroupID( const IPv6_Address_t * pxIPv6Add /** * @brief Check whether this IPv6 address is an allowed multicast address or not. * - * @param[in] pxIPAddress: The IP address to be checked. + * @param[in] pxIPAddress The IP address to be checked. * * @return Returns pdTRUE if pxIPAddress is an allowed multicast address, pdFALSE if not. */ @@ -354,9 +354,9 @@ BaseType_t xIsIPv6AllowedMulticast( const IPv6_Address_t * pxIPAddress ) * the special unicast address: ff02::1:ffnn:nnnn, where nn:nnnn are * the last 3 bytes of the IPv6 address. * - * @param[in] pxLeft: First IP address. - * @param[in] pxRight: Second IP address. - * @param[in] uxPrefixLength: The IP address prefix length in bits. + * @param[in] pxLeft First IP address. + * @param[in] pxRight Second IP address. + * @param[in] uxPrefixLength The IP address prefix length in bits. * * @return Returns 0 if it can handle it, else non zero . */ @@ -438,9 +438,9 @@ BaseType_t xCompareIPv6_Address( const IPv6_Address_t * pxLeft, /** * @brief Check whether this IPv6 packet is to be allowed or to be dropped. * - * @param[in] pxIPv6Header: The IP packet under consideration. - * @param[in] pxNetworkBuffer: The whole network buffer. - * @param[in] uxHeaderLength: The length of the header. + * @param[in] pxIPv6Header The IP packet under consideration. + * @param[in] pxNetworkBuffer The whole network buffer. + * @param[in] uxHeaderLength The length of the header. * * @return Whether the packet should be processed or dropped. */ @@ -550,8 +550,8 @@ eFrameProcessingResult_t prvAllowIPPacketIPv6( const IPHeader_IPv6_t * const pxI /** * @brief Check extension header and next header and return their order. * - * @param[in] ucProtocol: Extension header ID. - * @param[in] ucNextHeader: Next header ID. + * @param[in] ucProtocol Extension header ID. + * @param[in] ucNextHeader Next header ID. * * @return Extension header order in the packet. */ @@ -613,8 +613,8 @@ BaseType_t xGetExtensionOrder( uint8_t ucProtocol, /** * @brief Handle the IPv6 extension headers. * - * @param[in,out] pxNetworkBuffer: The received packet that contains IPv6 extension headers. - * @param[in] xDoRemove: Function removes the extension header if xDoRemove is set to pdTRUE. + * @param[in,out] pxNetworkBuffer The received packet that contains IPv6 extension headers. + * @param[in] xDoRemove Function removes the extension header if xDoRemove is set to pdTRUE. * * @return eProcessBuffer in case the options are removed successfully, otherwise * eReleaseBuffer. @@ -638,6 +638,8 @@ eFrameProcessingResult_t eHandleIPv6ExtensionHeaders( NetworkBufferDescriptor_t BaseType_t xNextOrder = 0; BaseType_t xExtHeaderCount = 0; + ( void ) xNextOrder; + while( ( uxIndex + 8U ) < uxMaxLength ) { BaseType_t xCurrentOrder; diff --git a/source/FreeRTOS_IPv6_Sockets.c b/source/FreeRTOS_IPv6_Sockets.c index df932773f8..710fafb724 100644 --- a/source/FreeRTOS_IPv6_Sockets.c +++ b/source/FreeRTOS_IPv6_Sockets.c @@ -53,9 +53,9 @@ * @brief Called by pxTCPSocketLookup(), this function will check if a socket * is connected to a remote IP-address. It will be called from a loop * iterating through all sockets. - * @param[in] pxSocket: The socket to be inspected. - * @param[in] pxAddress_IPv6: The IPv6 address, or NULL if the peer has a IPv4 address. - * @param[in] ulRemoteIP: The IPv4 address. + * @param[in] pxSocket The socket to be inspected. + * @param[in] pxAddress_IPv6 The IPv6 address, or NULL if the peer has a IPv4 address. + * @param[in] ulRemoteIP The IPv4 address. * @return The socket in case it is connected to the remote IP-address. */ FreeRTOS_Socket_t * pxTCPSocketLookup_IPv6( FreeRTOS_Socket_t * pxSocket, @@ -97,8 +97,8 @@ /** * @brief Called by prvSendUDPPacket(), this function will UDP packet * fields and IPv6 address for the packet to be send. - * @param[in] pxNetworkBuffer : The packet to be sent. - * @param[in] pxDestinationAddress: The IPv4 socket address. + * @param[in] pxNetworkBuffer The packet to be sent. + * @param[in] pxDestinationAddress The IPv4 socket address. * @return Returns NULL, always. */ void * xSend_UDP_Update_IPv6( NetworkBufferDescriptor_t * pxNetworkBuffer, @@ -122,8 +122,8 @@ void * xSend_UDP_Update_IPv6( NetworkBufferDescriptor_t * pxNetworkBuffer, /** * @brief Called by FreeRTOS_recvfrom(), this function will update socket * address with IPv6 address from the packet received. - * @param[in] pxNetworkBuffer : The packet received. - * @param[in] pxSourceAddress: The IPv4 socket address. + * @param[in] pxNetworkBuffer The packet received. + * @param[in] pxSourceAddress The IPv4 socket address. * @return The Payload Offset. */ size_t xRecv_Update_IPv6( const NetworkBufferDescriptor_t * pxNetworkBuffer, @@ -155,7 +155,7 @@ size_t xRecv_Update_IPv6( const NetworkBufferDescriptor_t * pxNetworkBuffer, /** * @brief Converts a hex value to a readable hex character, e.g. 14 becomes 'e'. - * @param usValue : The value to be converted, must be between 0 and 15. + * @param usValue The value to be converted, must be between 0 and 15. * @return The character, between '0' and '9', or between 'a' and 'f'. */ char cHexToChar( uint16_t usValue ) @@ -187,9 +187,9 @@ char cHexToChar( uint16_t usValue ) * @brief Convert a short numeric value to a hex string of at most 4 characters. * The resulting string is **not** null-terminated. The resulting string * will not have leading zero's, except when 'usValue' equals zero. - * @param[in] pcBuffer : The buffer to which the string is written. - * @param[in] uxBufferSize : The size of the buffer pointed to by 'pcBuffer'. - * @param[in] usValue : The 16-bit value to be converted. + * @param[in] pcBuffer The buffer to which the string is written. + * @param[in] uxBufferSize The size of the buffer pointed to by 'pcBuffer'. + * @param[in] usValue The 16-bit value to be converted. * @return The number of bytes written to 'pcBuffer'. */ socklen_t uxHexPrintShort( char * pcBuffer, @@ -232,7 +232,7 @@ socklen_t uxHexPrintShort( char * pcBuffer, /** * @brief Scan the binary IPv6 address and find the longest train of consecutive zero's. * The result of this search will be stored in 'xZeroStart' and 'xZeroLength'. - * @param pxSet: the set of parameters as used by FreeRTOS_inet_ntop6(). + * @param pxSet the set of parameters as used by FreeRTOS_inet_ntop6(). */ void prv_ntop6_search_zeros( struct sNTOP6_Set * pxSet ) { @@ -282,9 +282,9 @@ void prv_ntop6_search_zeros( struct sNTOP6_Set * pxSet ) /** * @brief The location is now at the longest train of zero's. Two colons have to * be printed without a numeric value, e.g. "ff02::1". - * @param pcDestination: the output buffer where the colons will be printed. - * @param uxSize: the remaining length of the output buffer. - * @param pxSet: the set of parameters as used by FreeRTOS_inet_ntop6(). + * @param pcDestination the output buffer where the colons will be printed. + * @param uxSize the remaining length of the output buffer. + * @param pxSet the set of parameters as used by FreeRTOS_inet_ntop6(). * @return pdPASS in case the output buffer is big enough to contain the colons. * @note uxSize must be at least 2, enough to print "::". The string will get * null-terminated later on. @@ -333,9 +333,9 @@ static BaseType_t prv_ntop6_write_zeros( char * pcDestination, /** * @brief Write a short value, as a hex number with at most 4 characters. E.g. the * value 15 will be printed as "f". - * @param pcDestination: the output buffer where the hex number is to be printed. - * @param uxSize: the remaining length of the output buffer. - * @param pxSet: the set of parameters as used by FreeRTOS_inet_ntop6(). + * @param pcDestination the output buffer where the hex number is to be printed. + * @param uxSize the remaining length of the output buffer. + * @param pxSet the set of parameters as used by FreeRTOS_inet_ntop6(). * @return pdPASS in case the output buffer is big enough to contain the string. * @note uxSize must be at least 4, enough to print "abcd". The string will get * null-terminated later on. @@ -389,10 +389,10 @@ static BaseType_t prv_ntop6_write_short( char * pcDestination, /** * @brief This function converts a binary IPv6 address to a human readable notation. * - * @param[in] pvSource: The binary address, 16 bytes long.. - * @param[out] pcDestination: The human-readable ( hexadecimal ) notation of the + * @param[in] pvSource The binary address, 16 bytes long.. + * @param[out] pcDestination The human-readable ( hexadecimal ) notation of the * address. - * @param[in] uxSize: The size of pvDestination. A value of 40 is recommended. + * @param[in] uxSize The size of pvDestination. A value of 40 is recommended. * * @return pdPASS if the translation was successful or else pdFAIL. */ @@ -456,9 +456,9 @@ const char * FreeRTOS_inet_ntop6( const void * pvSource, /** * @brief Converting a readable IPv6 address to its binary form, add one nibble. * - * @param[in] pxSet : A set of variables describing the conversion. - * @param[in] ucNew : The hex value, between 0 and 15 - * @param[in] ch : The character, such as '5', 'f', or ':'. + * @param[in] pxSet A set of variables describing the conversion. + * @param[in] ucNew The hex value, between 0 and 15 + * @param[in] ch The character, such as '5', 'f', or ':'. * * @return pdTRUE when the nibble was added, otherwise pdFALSE. */ @@ -530,7 +530,7 @@ static BaseType_t prv_inet_pton6_add_nibble( struct sPTON6_Set * pxSet, /** * @brief Convert an ASCII character to its corresponding hexadecimal value. * A :: block was found, now fill in the zero's. - * @param[in] pxSet : A set of variables describing the conversion. + * @param[in] pxSet A set of variables describing the conversion. */ static void prv_inet_pton6_set_zeros( struct sPTON6_Set * pxSet ) { @@ -557,8 +557,8 @@ static void prv_inet_pton6_set_zeros( struct sPTON6_Set * pxSet ) /** * @brief Convert an IPv6 address in hexadecimal notation to a binary format of 16 bytes. * - * @param[in] pcSource: The address in hexadecimal notation. - * @param[out] pvDestination: The address in binary format, 16 bytes long. + * @param[in] pcSource The address in hexadecimal notation. + * @param[out] pvDestination The address in binary format, 16 bytes long. * * @return The 32-bit representation of IP(v4) address. */ diff --git a/source/FreeRTOS_IPv6_Utils.c b/source/FreeRTOS_IPv6_Utils.c index a0be6f872e..65a71712c1 100644 --- a/source/FreeRTOS_IPv6_Utils.c +++ b/source/FreeRTOS_IPv6_Utils.c @@ -49,8 +49,8 @@ /** * @brief Set multicast MAC address. * - * @param[in] pxAddress: IPv6 address. - * @param[out] pxMACAddress: Pointer to MAC address. + * @param[in] pxAddress IPv6 address. + * @param[out] pxMACAddress Pointer to MAC address. */ void vSetMultiCastIPv6MacAddress( const IPv6_Address_t * pxAddress, MACAddress_t * pxMACAddress ) @@ -65,9 +65,9 @@ void vSetMultiCastIPv6MacAddress( const IPv6_Address_t * pxAddress, /*-----------------------------------------------------------*/ /** @brief Do the first IPv6 length checks at the IP-header level. - * @param[in] pucEthernetBuffer: The buffer containing the packet. - * @param[in] uxBufferLength: The number of bytes to be sent or received. - * @param[in] pxSet: A struct describing this packet. + * @param[in] pucEthernetBuffer The buffer containing the packet. + * @param[in] uxBufferLength The number of bytes to be sent or received. + * @param[in] pxSet A struct describing this packet. * * @return Non-zero in case of an error. */ @@ -115,7 +115,7 @@ BaseType_t prvChecksumIPv6Checks( uint8_t * pucEthernetBuffer, /** * @brief Check the buffer lengths of an ICMPv6 packet. - * @param[in] uxBufferLength: The total length of the packet. + * @param[in] uxBufferLength The total length of the packet. * @param[in] pxSet A struct describing this packet. * @return Non-zero in case of an error. */ diff --git a/source/FreeRTOS_ND.c b/source/FreeRTOS_ND.c index 26aad9114b..a174c0eb70 100644 --- a/source/FreeRTOS_ND.c +++ b/source/FreeRTOS_ND.c @@ -140,9 +140,9 @@ /** * @brief See if the MAC-address can be resolved because it is a multi-cast address. * - * @param[in] pxAddressToLookup: The IP-address to look-up. - * @param[out] pxMACAddress: The resulting MAC-address is stored here. - * @param[out] ppxEndPoint: A pointer to an end-point pointer where the end-point will be stored. + * @param[in] pxAddressToLookup The IP-address to look-up. + * @param[out] pxMACAddress The resulting MAC-address is stored here. + * @param[out] ppxEndPoint A pointer to an end-point pointer where the end-point will be stored. * * @return An enum, either eARPCacheHit or eARPCacheMiss. */ @@ -178,9 +178,9 @@ * @brief Find the MAC-address of an IPv6 address. It will first determine if is a multicast * address, if not, it will check the ND cache. * - * @param[in] pxIPAddress: The IPv6 address to be looked up. - * @param[out] pxMACAddress: The MAC-address found. - * @param[out] ppxEndPoint: A pointer to a pointer to an end-point, where the end-point will be stored. + * @param[in] pxIPAddress The IPv6 address to be looked up. + * @param[out] pxMACAddress The MAC-address found. + * @param[out] ppxEndPoint A pointer to a pointer to an end-point, where the end-point will be stored. * * @return An enum which says whether the address was found: eARPCacheHit or eARPCacheMiss. */ @@ -274,9 +274,9 @@ * @brief Store a combination of IP-address, MAC-address and an end-point in a free location * in the ND cache. * - * @param[in] pxMACAddress: The MAC-address - * @param[in] pxIPAddress: The IP-address - * @param[in] pxEndPoint: The end-point through which the IP-address can be reached. + * @param[in] pxMACAddress The MAC-address + * @param[in] pxIPAddress The IP-address + * @param[in] pxEndPoint The end-point through which the IP-address can be reached. * */ void vNDRefreshCacheEntry( const MACAddress_t * pxMACAddress, @@ -410,9 +410,9 @@ /** * @brief Look-up an IPv6 address in the cache. * - * @param[in] pxAddressToLookup: The IPv6 address to look-up.Ethernet packet. - * @param[out] pxMACAddress: The resulting MAC-address will be stored here. - * @param[out] ppxEndPoint: A pointer to a pointer to an end-point, where the end-point will be stored. + * @param[in] pxAddressToLookup The IPv6 address to look-up.Ethernet packet. + * @param[out] pxMACAddress The resulting MAC-address will be stored here. + * @param[out] ppxEndPoint A pointer to a pointer to an end-point, where the end-point will be stored. * * @return An enum: either eARPCacheHit or eARPCacheMiss. */ @@ -512,8 +512,8 @@ /** * @brief Return an ICMPv6 packet to the peer. * - * @param[in] pxNetworkBuffer: The Ethernet packet. - * @param[in] uxICMPSize: The number of bytes to be sent. + * @param[in] pxNetworkBuffer The Ethernet packet. + * @param[in] uxICMPSize The number of bytes to be sent. */ static void prvReturnICMP_IPv6( NetworkBufferDescriptor_t * const pxNetworkBuffer, size_t uxICMPSize ) @@ -558,8 +558,8 @@ * add an entry into the ND table that indicates that an ND reply is outstanding * so re-transmissions can be generated. * - * @param[in] pxNetworkBuffer: The network buffer in which the message shall be stored. - * @param[in] pxIPAddress: The IPv6 address that is asked to send a Neighbour Advertisement. + * @param[in] pxNetworkBuffer The network buffer in which the message shall be stored. + * @param[in] pxIPAddress The IPv6 address that is asked to send a Neighbour Advertisement. * * @note Send out an ND request for the IPv6 address contained in pxNetworkBuffer, and * add an entry into the ND table that indicates that an ND reply is @@ -661,9 +661,9 @@ /** * @brief Send a PING request using an ICMPv6 format. * - * @param[in] pxIPAddress: Send an IPv6 PING request. - * @param[in] uxNumberOfBytesToSend: The number of bytes to be sent. - * @param[in] uxBlockTimeTicks: The maximum number of clock-ticks to wait while + * @param[in] pxIPAddress Send an IPv6 PING request. + * @param[in] uxNumberOfBytesToSend The number of bytes to be sent. + * @param[in] uxBlockTimeTicks The maximum number of clock-ticks to wait while * putting the message on the queue for the IP-task. * * @return When failed: pdFAIL, otherwise the PING sequence number. @@ -821,7 +821,7 @@ * @brief Returns a printable string for the major ICMPv6 message types. Used for * debugging only. * - * @param[in] xType: The type of message. + * @param[in] xType The type of message. * * @return A null-terminated string that represents the type the kind of message. */ @@ -923,7 +923,7 @@ /** * @brief Process an ICMPv6 packet and send replies when applicable. * - * @param[in] pxNetworkBuffer: The Ethernet packet which contains an IPv6 message. + * @param[in] pxNetworkBuffer The Ethernet packet which contains an IPv6 message. * * @return A const value 'eReleaseBuffer' which means that the network must still be released. */ @@ -1122,7 +1122,7 @@ /** * @brief Send out a Neighbour Advertisement message. * - * @param[in] pxEndPoint: The end-point to use. + * @param[in] pxEndPoint The end-point to use. */ /* MISRA Ref 8.9.1 [File scoped variables] */ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-89 */ @@ -1202,10 +1202,10 @@ /** * @brief Create an IPv16 address, based on a prefix. * - * @param[out] pxIPAddress: The location where the new IPv6 address will be stored. - * @param[in] pxPrefix: The prefix to be used. - * @param[in] uxPrefixLength: The length of the prefix. - * @param[in] xDoRandom: A non-zero value if the bits after the prefix should have a random value. + * @param[out] pxIPAddress The location where the new IPv6 address will be stored. + * @param[in] pxPrefix The prefix to be used. + * @param[in] uxPrefixLength The length of the prefix. + * @param[in] xDoRandom A non-zero value if the bits after the prefix should have a random value. * * @return pdPASS if the operation was successful. Or pdFAIL in case xApplicationGetRandomNumber() * returned an error. diff --git a/source/FreeRTOS_RA.c b/source/FreeRTOS_RA.c index 427c5b7d26..80404ec8be 100644 --- a/source/FreeRTOS_RA.c +++ b/source/FreeRTOS_RA.c @@ -91,8 +91,8 @@ /** * @brief Find a link-local address that is bound to a given interface. * - * @param[in] pxInterface: The interface for which a link-local address is looked up. - * @param[out] pxAddress: The IP address will be copied to this parameter. + * @param[in] pxInterface The interface for which a link-local address is looked up. + * @param[out] pxAddress The IP address will be copied to this parameter. * * @return pdPASS in case a link-local address was found, otherwise pdFAIL. */ @@ -123,8 +123,8 @@ /** * @brief Send an ICMPv6 message of the type: Router Solicitation. * - * @param[in] pxNetworkBuffer: The network buffer which can be used for this. - * @param[in] pxIPAddress: The target address, normally ff02::2 + * @param[in] pxNetworkBuffer The network buffer which can be used for this. + * @param[in] pxIPAddress The target address, normally ff02::2 * */ void vNDSendRouterSolicitation( NetworkBufferDescriptor_t * pxNetworkBuffer, @@ -216,7 +216,7 @@ /** * @brief Receive a NA ( Neighbour Advertisement ) message to see if a chosen IP-address is already in use. * - * @param[in] pxNetworkBuffer: The buffer that contains the message. + * @param[in] pxNetworkBuffer The buffer that contains the message. */ void vReceiveNA( const NetworkBufferDescriptor_t * pxNetworkBuffer ) { @@ -248,7 +248,7 @@ /** * @brief Read a received RA reply and return the prefix option from the packet. * - * @param[in] pxNetworkBuffer: The buffer that contains the message. + * @param[in] pxNetworkBuffer The buffer that contains the message. * * @returns Returns the ICMP prefix option pointer, pointing to its location in the * input RA reply message buffer. @@ -308,6 +308,7 @@ case ndICMP_MTU_OPTION: /* 5 */ { uint32_t ulMTU; + ( void ) ulMTU; /* ulChar2u32 returns host-endian numbers. */ ulMTU = ulChar2u32( &( pucBytes[ uxIndex + 4U ] ) ); @@ -333,7 +334,7 @@ * prefix offered, and completed with random bits. It will start testing if another device * already exists that uses the same IP-address. * - * @param[in] pxNetworkBuffer: The buffer that contains the message. + * @param[in] pxNetworkBuffer The buffer that contains the message. */ void vReceiveRA( const NetworkBufferDescriptor_t * pxNetworkBuffer ) { @@ -407,8 +408,8 @@ * @brief This is an option to test SLAAC. This device will take the IP-address of a * known device in the LAN, just to simulate a IP-address clash. * - * @param[in] xIndex: the index to be used in the list of IP-addresses. - * @param[out] pxIPAddress: Here the IP-address will be written. + * @param[in] xIndex the index to be used in the list of IP-addresses. + * @param[out] pxIPAddress Here the IP-address will be written. * * @return pdPASS if an existing IP-address has been found and written to pxIPAddress. */ @@ -449,8 +450,8 @@ * there is no other device using the same IP-address vIPNetworkUpCalls() is called * to send the network up event. * - * @param[in] pxEndPoint: The end point for which RA assignment is required. - * @param[out] uxReloadTime: Timer reload value in ticks. + * @param[in] pxEndPoint The end point for which RA assignment is required. + * @param[out] uxReloadTime Timer reload value in ticks. * * @return New timer reload value. */ @@ -541,8 +542,8 @@ /** * @brief Handles the RA states other than the wait states. * - * @param[in] pxEndPoint: The end point for which RA assignment is required. - * @param[out] uxReloadTime: Timer reload value in ticks. + * @param[in] pxEndPoint The end point for which RA assignment is required. + * @param[out] uxReloadTime Timer reload value in ticks. * * @return New timer reload value. */ @@ -659,7 +660,7 @@ /** * @brief Initialise the RA state machine. * - * @param[in] pxEndPoint: The end-point for which Router Advertisement is required. + * @param[in] pxEndPoint The end-point for which Router Advertisement is required. */ static void vRAProcessInit( NetworkEndPoint_t * pxEndPoint ) { @@ -670,8 +671,8 @@ /** * @brief Do a single cycle of the RA state machine. * - * @param[in] xDoReset: pdTRUE if the state machine must be reset. - * @param[in] pxEndPoint: The end-point for which a RA assignment is required. + * @param[in] xDoReset pdTRUE if the state machine must be reset. + * @param[in] pxEndPoint The end-point for which a RA assignment is required. */ void vRAProcess( BaseType_t xDoReset, NetworkEndPoint_t * pxEndPoint ) diff --git a/source/FreeRTOS_Routing.c b/source/FreeRTOS_Routing.c index bfcd5fca25..8243cbcfff 100644 --- a/source/FreeRTOS_Routing.c +++ b/source/FreeRTOS_Routing.c @@ -74,15 +74,15 @@ struct xIPv6_Couple /** * @brief Configure and install a new IPv4 end-point. * - * @param[in] pxNetworkInterface: The interface to which it belongs. - * @param[in] pxEndPoint: Space for the new end-point. This memory is dedicated for the + * @param[in] pxNetworkInterface The interface to which it belongs. + * @param[in] pxEndPoint Space for the new end-point. This memory is dedicated for the * end-point and should not be freed or get any other purpose. - * @param[in] ucIPAddress: The IP-address. - * @param[in] ucNetMask: The prefix which shall be used for this end-point. - * @param[in] ucGatewayAddress: The IP-address of a device on the LAN which can serve as + * @param[in] ucIPAddress The IP-address. + * @param[in] ucNetMask The prefix which shall be used for this end-point. + * @param[in] ucGatewayAddress The IP-address of a device on the LAN which can serve as * as a gateway to the Internet. - * @param[in] ucDNSServerAddress: The IP-address of a DNS server. - * @param[in] ucMACAddress: The MAC address of the end-point. + * @param[in] ucDNSServerAddress The IP-address of a DNS server. + * @param[in] ucMACAddress The MAC address of the end-point. */ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, NetworkEndPoint_t * pxEndPoint, @@ -142,7 +142,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, * @brief Add a network interface to the list of interfaces. Check if the interface was * already added in an earlier call. * - * @param[in] pxInterface: The address of the new interface. + * @param[in] pxInterface The address of the new interface. * * @return The value of the parameter 'pxInterface'. */ @@ -232,8 +232,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Add an end-point to a given interface. * - * @param[in] pxInterface: The interface that gets a new end-point. - * @param[in] pxEndPoint: The end-point to be added. + * @param[in] pxInterface The interface that gets a new end-point. + * @param[in] pxEndPoint The end-point to be added. * * @return The value of the parameter 'pxEndPoint'. */ @@ -311,7 +311,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the first end-point bound to a given interface. * - * @param[in] pxInterface: The interface whose first end-point will be returned. + * @param[in] pxInterface The interface whose first end-point will be returned. * * @return The first end-point that is found to the interface, or NULL when the * interface doesn't have any end-point yet. @@ -340,9 +340,9 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, * @brief Get the next end-point. The parameter 'pxInterface' may be NULL, which means: * don't care which interface the end-point is bound to. * - * @param[in] pxInterface: An interface of interest, or NULL when iterating through all + * @param[in] pxInterface An interface of interest, or NULL when iterating through all * end-points. - * @param[in] pxEndPoint: This is the current end-point. + * @param[in] pxEndPoint This is the current end-point. * * @return The end-point that is found, or NULL when there are no more end-points in the list. */ @@ -373,8 +373,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the end-point which has a given IPv4 address. * - * @param[in] ulIPAddress: The IP-address of interest, or 0 if any IPv4 end-point may be returned. - * @param[in] ulWhere: For maintaining routing statistics ulWhere acts as an index to the data structure + * @param[in] ulIPAddress The IP-address of interest, or 0 if any IPv4 end-point may be returned. + * @param[in] ulWhere For maintaining routing statistics ulWhere acts as an index to the data structure * that keep track of the number of times 'FreeRTOS_FindEndPointOnIP_IPv4()' * has been called from a particular location. Used only if * ipconfigHAS_ROUTING_STATISTICS is enabled. @@ -423,7 +423,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the end-point which handles a given IPv6 address. * - * @param[in] pxIPAddress: The IP-address of interest. + * @param[in] pxIPAddress The IP-address of interest. * * @return The end-point found or NULL. */ @@ -452,8 +452,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the end-point that has a certain MAC-address. * - * @param[in] pxMACAddress: The Ethernet packet. - * @param[in] pxInterface: The interface on which the packet was received, or NULL when unknown. + * @param[in] pxMACAddress The Ethernet packet. + * @param[in] pxInterface The interface on which the packet was received, or NULL when unknown. * * @return The end-point that has the given MAC-address. */ @@ -494,8 +494,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles a given IPv4-address. * - * @param[in] ulIPAddress: The IP-address for which an end-point is looked-up. - * @param[in] ulWhere: For maintaining routing statistics ulWhere acts as an index to the data structure + * @param[in] ulIPAddress The IP-address for which an end-point is looked-up. + * @param[in] ulWhere For maintaining routing statistics ulWhere acts as an index to the data structure * that keep track of the number of times 'FreeRTOS_InterfaceEndPointOnNetMask()' * has been called from a particular location. Used only if * ipconfigHAS_ROUTING_STATISTICS is enabled. @@ -513,11 +513,11 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles a given IPv4-address. * - * @param[in] pxInterface: Only end-points that have this interface are returned, unless + * @param[in] pxInterface Only end-points that have this interface are returned, unless * pxInterface is NULL. - * @param[in] ulIPAddress: The IP-address for which an end-point is looked-up. + * @param[in] ulIPAddress The IP-address for which an end-point is looked-up. * - * @param[in] ulWhere: For maintaining routing statistics ulWhere acts as an index to the data structure + * @param[in] ulWhere For maintaining routing statistics ulWhere acts as an index to the data structure * that keep track of the number of times 'FreeRTOS_InterfaceEndPointOnNetMask()' * has been called from a particular location. Used only if * ipconfigHAS_ROUTING_STATISTICS is enabled. @@ -583,16 +583,16 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Configure and install a new IPv6 end-point. * - * @param[in] pxNetworkInterface: The interface to which it belongs. - * @param[in] pxEndPoint: Space for the new end-point. This memory is dedicated for the + * @param[in] pxNetworkInterface The interface to which it belongs. + * @param[in] pxEndPoint Space for the new end-point. This memory is dedicated for the * end-point and should not be freed or get any other purpose. - * @param[in] pxIPAddress: The IP-address. - * @param[in] pxNetPrefix: The prefix which shall be used for this end-point. - * @param[in] uxPrefixLength: The length of the above end-point. - * @param[in] pxGatewayAddress: The IP-address of a device on the LAN which can serve as + * @param[in] pxIPAddress The IP-address. + * @param[in] pxNetPrefix The prefix which shall be used for this end-point. + * @param[in] uxPrefixLength The length of the above end-point. + * @param[in] pxGatewayAddress The IP-address of a device on the LAN which can serve as * as a gateway to the Internet. - * @param[in] pxDNSServerAddress: The IP-address of a DNS server. - * @param[in] ucMACAddress: The MAC address of the end-point. + * @param[in] pxDNSServerAddress The IP-address of a DNS server. + * @param[in] ucMACAddress The MAC address of the end-point. */ void FreeRTOS_FillEndPoint_IPv6( NetworkInterface_t * pxNetworkInterface, NetworkEndPoint_t * pxEndPoint, @@ -696,7 +696,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles a given IPv6-address. * - * @param[in] pxIPv6Address: The IP-address for which an end-point is looked-up. + * @param[in] pxIPv6Address The IP-address for which an end-point is looked-up. * * @return An end-point that has the same network mask as the given IP-address. */ @@ -727,11 +727,11 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles an incoming packet based on its type, source/destination & MAC address. * - * @param[in] pxNetworkInterface: The interface via which the packet was received. - * @param[in] usFrameType: Frame type of the packet. - * @param[in] pxIPAddressFrom: Source IP address of the packet. - * @param[in] pxIPAddressTo: Destination IP address of the packet. - * @param[in] pxMACAddress: Destination MAC address of the packet. + * @param[in] pxNetworkInterface The interface via which the packet was received. + * @param[in] usFrameType Frame type of the packet. + * @param[in] pxIPAddressFrom Source IP address of the packet. + * @param[in] pxIPAddressTo Destination IP address of the packet. + * @param[in] pxMACAddress Destination MAC address of the packet. * * @return An end-point that handles the packet. */ @@ -868,8 +868,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find out the best matching end-point given an incoming Ethernet packet. * - * @param[in] pxNetworkInterface: The interface on which the packet was received. - * @param[in] pucEthernetBuffer: The Ethernet packet that was just received. + * @param[in] pxNetworkInterface The interface on which the packet was received. + * @param[in] pucEthernetBuffer The Ethernet packet that was just received. * * @return The end-point that should handle the incoming Ethernet packet. */ @@ -971,7 +971,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that defines a gateway of a certain type ( IPv4 or IPv6 ). * - * @param[in] xIPType: The type of Gateway to look for ( ipTYPE_IPv4 or ipTYPE_IPv6 ). + * @param[in] xIPType The type of Gateway to look for ( ipTYPE_IPv4 or ipTYPE_IPv6 ). * * @return The end-point that will lead to the gateway, or NULL when no gateway was found. */ @@ -1025,7 +1025,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the first IPv6 end-point. * - * @param[in] pxInterface: Either NULL ( don't care ), or a specific interface. + * @param[in] pxInterface Either NULL ( don't care ), or a specific interface. * * @return The end-point found, or NULL when there are no end-points at all. */ @@ -1051,7 +1051,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Get the end-point that is bound to a socket. * - * @param[in] xSocket: The socket of interest. + * @param[in] xSocket The socket of interest. * * @return An end-point or NULL in case the socket is not bound to an end-point. */ @@ -1076,8 +1076,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Assign an end-point to a socket. * - * @param[in] xSocket: The socket to which an end-point will be assigned. - * @param[in] pxEndPoint: The end-point to be assigned. + * @param[in] xSocket The socket to which an end-point will be assigned. + * @param[in] pxEndPoint The end-point to be assigned. */ void vSetSocketEndpoint( Socket_t xSocket, NetworkEndPoint_t * pxEndPoint ) @@ -1099,7 +1099,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, * @brief Add a network interface to the list of interfaces. Check if this will be * first and only interface ( ipconfigCOMPATIBLE_WITH_SINGLE = 1 ). * - * @param[in] pxInterface: The address of the new interface. + * @param[in] pxInterface The address of the new interface. * * @return The value of the parameter 'pxInterface'. */ @@ -1115,8 +1115,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, * @brief And an end-point to an interface. Note that when ipconfigCOMPATIBLE_WITH_SINGLE * is defined, only one interface is allowed, which will have one end-point only. * - * @param[in] pxInterface: The interface to which the end-point is assigned. - * @param[in] pxEndPoint: The end-point to be assigned to the above interface. + * @param[in] pxInterface The interface to which the end-point is assigned. + * @param[in] pxEndPoint The end-point to be assigned to the above interface. * * @return The value of the parameter 'pxEndPoint'. */ @@ -1149,7 +1149,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the end-point which has a given IPv4 address. * - * @param[in] ulIPAddress: The IP-address of interest, or 0 if any IPv4 end-point may be returned. + * @param[in] ulIPAddress The IP-address of interest, or 0 if any IPv4 end-point may be returned. * * @return The end-point found or NULL. */ @@ -1173,8 +1173,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the end-point that has a certain MAC-address. * - * @param[in] pxMACAddress: The Ethernet packet. - * @param[in] pxInterface: The interface on which the packet was received, or NULL when unknown. + * @param[in] pxMACAddress The Ethernet packet. + * @param[in] pxInterface The interface on which the packet was received, or NULL when unknown. * * @return The end-point that has the given MAC-address. */ @@ -1198,7 +1198,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles a given IPv4-address. * - * @param[in] ulIPAddress: The IP-address for which an end-point is looked-up. + * @param[in] ulIPAddress The IP-address for which an end-point is looked-up. * * @return An end-point that has the same network mask as the given IP-address. */ @@ -1212,7 +1212,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that defines a gateway of a certain type ( IPv4 or IPv6 ). * - * @param[in] xIPType: The type of Gateway to look for ( ipTYPE_IPv4 or ipTYPE_IPv6 ). + * @param[in] xIPType The type of Gateway to look for ( ipTYPE_IPv4 or ipTYPE_IPv6 ). * * @return The end-point that will lead to the gateway, or NULL when no gateway was found. */ @@ -1237,7 +1237,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find the first end-point bound to a given interface. * - * @param[in] pxInterface: The interface whose first end-point will be returned. + * @param[in] pxInterface The interface whose first end-point will be returned. * * @return The first end-point that is found to the interface, or NULL when the * interface doesn't have any end-point yet. @@ -1268,8 +1268,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find an end-point that handles a given IPv4-address. * - * @param[in] pxInterface: Ignored in this simplified version. - * @param[in] ulIPAddress: The IP-address for which an end-point is looked-up. + * @param[in] pxInterface Ignored in this simplified version. + * @param[in] ulIPAddress The IP-address for which an end-point is looked-up. * * @return An end-point that has the same network mask as the given IP-address. */ @@ -1294,8 +1294,8 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Find out the best matching end-point given an incoming Ethernet packet. * - * @param[in] pxNetworkInterface: The interface on which the packet was received. - * @param[in] pucEthernetBuffer: The Ethernet packet that was just received. + * @param[in] pxNetworkInterface The interface on which the packet was received. + * @param[in] pucEthernetBuffer The Ethernet packet that was just received. * * @return The end-point that should handle the incoming Ethernet packet. */ @@ -1315,9 +1315,9 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, * @brief Get the next end-point. As this is the simplified version, it will always * return NULL. * - * @param[in] pxInterface: An interface of interest, or NULL when iterating through all + * @param[in] pxInterface An interface of interest, or NULL when iterating through all * end-points. - * @param[in] pxEndPoint: This is the current end-point. + * @param[in] pxEndPoint This is the current end-point. * * @return NULL because ipconfigCOMPATIBLE_WITH_SINGLE is defined. */ @@ -1378,7 +1378,7 @@ void FreeRTOS_FillEndPoint( NetworkInterface_t * pxNetworkInterface, /** * @brief Returns the IP type of the given IPv6 address. * - * @param[in] pxAddress: The IPv6 address whose type needs to be returned. + * @param[in] pxAddress The IPv6 address whose type needs to be returned. * @returns The IP type of the given address. */ IPv6_Type_t xIPv6_GetIPType( const IPv6_Address_t * pxAddress ) @@ -1414,9 +1414,9 @@ IPv6_Type_t xIPv6_GetIPType( const IPv6_Address_t * pxAddress ) /** * @brief Returns the string representation of the IP address of the end point. * - * @param[in] pxEndPoint: End point for which IP address needs to be returned. - * @param[in] pcBuffer: A char buffer of required size to which the string will be written. - * @param[in] uxSize: Size of the char buffer - pcBuffer. + * @param[in] pxEndPoint End point for which IP address needs to be returned. + * @param[in] pcBuffer A char buffer of required size to which the string will be written. + * @param[in] uxSize Size of the char buffer - pcBuffer. * * @returns The pointer to the char buffer that contains the string representation of the end point IP address. * The string will be "NULL" if the end point pointer is NULL. diff --git a/source/FreeRTOS_TCP_IP_IPV4.c b/source/FreeRTOS_TCP_IP_IPV4.c index df819801cd..06c24bb9e6 100644 --- a/source/FreeRTOS_TCP_IP_IPV4.c +++ b/source/FreeRTOS_TCP_IP_IPV4.c @@ -79,7 +79,7 @@ /** * @brief Process the received TCP packet. * - * @param[in] pxDescriptor: The descriptor in which the TCP packet is held. + * @param[in] pxDescriptor The descriptor in which the TCP packet is held. * * @return If the processing of the packet was successful, then pdPASS is returned * or else pdFAIL. diff --git a/source/FreeRTOS_TCP_IP_IPV6.c b/source/FreeRTOS_TCP_IP_IPV6.c index aa66a2a344..cf6b6d4808 100644 --- a/source/FreeRTOS_TCP_IP_IPV6.c +++ b/source/FreeRTOS_TCP_IP_IPV6.c @@ -81,7 +81,7 @@ /** * @brief Process the received TCP packet. * - * @param[in] pxDescriptor: The descriptor in which the TCP packet is held. + * @param[in] pxDescriptor The descriptor in which the TCP packet is held. * * @return If the processing of the packet was successful, then pdPASS is returned * or else pdFAIL. diff --git a/source/FreeRTOS_TCP_State_Handling_IPV4.c b/source/FreeRTOS_TCP_State_Handling_IPV4.c index 1d54471aad..795e950699 100644 --- a/source/FreeRTOS_TCP_State_Handling_IPV4.c +++ b/source/FreeRTOS_TCP_State_Handling_IPV4.c @@ -68,8 +68,8 @@ /** * @brief Handle 'listen' event on the given socket. * - * @param[in] pxSocket: The socket on which the listen occurred. - * @param[in] pxNetworkBuffer: The network buffer carrying the packet. + * @param[in] pxSocket The socket on which the listen occurred. + * @param[in] pxNetworkBuffer The network buffer carrying the packet. * * @return If a new socket/duplicate socket is created, then the pointer to * that socket is returned or else, a NULL pointer is returned. diff --git a/source/FreeRTOS_TCP_State_Handling_IPV6.c b/source/FreeRTOS_TCP_State_Handling_IPV6.c index 833a85a423..f4304a8f96 100644 --- a/source/FreeRTOS_TCP_State_Handling_IPV6.c +++ b/source/FreeRTOS_TCP_State_Handling_IPV6.c @@ -68,8 +68,8 @@ /** * @brief Handle 'listen' event on the given socket. * - * @param[in] pxSocket: The socket on which the listen occurred. - * @param[in] pxNetworkBuffer: The network buffer carrying the packet. + * @param[in] pxSocket The socket on which the listen occurred. + * @param[in] pxNetworkBuffer The network buffer carrying the packet. * * @return If a new socket/duplicate socket is created, then the pointer to * that socket is returned or else, a NULL pointer is returned. diff --git a/source/FreeRTOS_TCP_Transmission.c b/source/FreeRTOS_TCP_Transmission.c index 68e145b0e1..54dad65408 100644 --- a/source/FreeRTOS_TCP_Transmission.c +++ b/source/FreeRTOS_TCP_Transmission.c @@ -285,9 +285,9 @@ /** * @brief Called by prvTCPReturnPacket(), this function will set the the window * size on this side: 'xTCPHeader.usWindow'. - * @param[in] pxSocket: The socket on which the packet is being sent. - * @param[in] pxNetworkBuffer: The network buffer carrying the outgoing message. - * @param[in] uxIPHeaderSize: The size of the IP-header, which depends on the IP-type. + * @param[in] pxSocket The socket on which the packet is being sent. + * @param[in] pxNetworkBuffer The network buffer carrying the outgoing message. + * @param[in] uxIPHeaderSize The size of the IP-header, which depends on the IP-type. */ void prvTCPReturn_CheckTCPWindow( FreeRTOS_Socket_t * pxSocket, const NetworkBufferDescriptor_t * pxNetworkBuffer, @@ -369,10 +369,10 @@ /** * @brief Called by prvTCPReturnPacket(), this function sets the sequence and ack numbers * in the TCP-header. - * @param[in] pxSocket: The socket on which the packet is being sent. - * @param[in] pxNetworkBuffer: The network buffer carrying the outgoing message. - * @param[in] uxIPHeaderSize: The size of the IP-header, which depends on the IP-type. - * @param[in] ulLen: The size of the packet minus the size of the Ethernet header. + * @param[in] pxSocket The socket on which the packet is being sent. + * @param[in] pxNetworkBuffer The network buffer carrying the outgoing message. + * @param[in] uxIPHeaderSize The size of the IP-header, which depends on the IP-type. + * @param[in] ulLen The size of the packet minus the size of the Ethernet header. * */ void prvTCPReturn_SetSequenceNumber( FreeRTOS_Socket_t * pxSocket, @@ -697,9 +697,9 @@ /** * @brief Called by prvTCPReturnPacket(), this function makes sure that the network buffer * has 'pxEndPoint' set properly. - * @param[in] pxSocket: The socket on which the packet is being sent. - * @param[in] pxNetworkBuffer: The network buffer carrying the outgoing message. - * @param[in] uxIPHeaderSize: The size of the IP-header, which depends on the IP-type. + * @param[in] pxSocket The socket on which the packet is being sent. + * @param[in] pxNetworkBuffer The network buffer carrying the outgoing message. + * @param[in] uxIPHeaderSize The size of the IP-header, which depends on the IP-type. */ void prvTCPReturn_SetEndPoint( const FreeRTOS_Socket_t * pxSocket, NetworkBufferDescriptor_t * pxNetworkBuffer, diff --git a/source/FreeRTOS_TCP_Transmission_IPV4.c b/source/FreeRTOS_TCP_Transmission_IPV4.c index 5d41ace679..70e6d8db5c 100644 --- a/source/FreeRTOS_TCP_Transmission_IPV4.c +++ b/source/FreeRTOS_TCP_Transmission_IPV4.c @@ -77,10 +77,10 @@ * called 'xTCP.xPacket'. A temporary xNetworkBuffer will be used to pass * the data to the NIC. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] pxDescriptor: The network buffer descriptor carrying the packet. - * @param[in] ulLen: Length of the packet being sent. - * @param[in] xReleaseAfterSend: pdTRUE if the ownership of the descriptor is + * @param[in] pxSocket The socket owning the connection. + * @param[in] pxDescriptor The network buffer descriptor carrying the packet. + * @param[in] ulLen Length of the packet being sent. + * @param[in] xReleaseAfterSend pdTRUE if the ownership of the descriptor is * transferred to the network interface. */ void prvTCPReturnPacket_IPV4( FreeRTOS_Socket_t * pxSocket, @@ -321,7 +321,7 @@ * @brief Let ARP look-up the MAC-address of the peer and initialise the first SYN * packet. * - * @param[in] pxSocket: The socket owning the TCP connection. The first packet shall + * @param[in] pxSocket The socket owning the TCP connection. The first packet shall * be created in this socket. * * @return pdTRUE: if the packet was successfully created and the first SYN can be sent. @@ -473,8 +473,8 @@ * @brief Common code for sending a TCP protocol control packet (i.e. no options, no * payload, just flags). * - * @param[in] pxNetworkBuffer: The network buffer received from the peer. - * @param[in] ucTCPFlags: The flags to determine what kind of packet this is. + * @param[in] pxNetworkBuffer The network buffer received from the peer. + * @param[in] ucTCPFlags The flags to determine what kind of packet this is. * * @return pdFAIL always indicating that the packet was not consumed. */ diff --git a/source/FreeRTOS_TCP_Transmission_IPV6.c b/source/FreeRTOS_TCP_Transmission_IPV6.c index 2df3d444cb..6ccd2b63ae 100644 --- a/source/FreeRTOS_TCP_Transmission_IPV6.c +++ b/source/FreeRTOS_TCP_Transmission_IPV6.c @@ -78,10 +78,10 @@ * called 'xTCP.xPacket'. A temporary xNetworkBuffer will be used to pass * the data to the NIC. * - * @param[in] pxSocket: The socket owning the connection. - * @param[in] pxDescriptor: The network buffer descriptor carrying the packet. - * @param[in] ulLen: Length of the packet being sent. - * @param[in] xReleaseAfterSend: pdTRUE if the ownership of the descriptor is + * @param[in] pxSocket The socket owning the connection. + * @param[in] pxDescriptor The network buffer descriptor carrying the packet. + * @param[in] ulLen Length of the packet being sent. + * @param[in] xReleaseAfterSend pdTRUE if the ownership of the descriptor is * transferred to the network interface. */ void prvTCPReturnPacket_IPV6( FreeRTOS_Socket_t * pxSocket, @@ -306,7 +306,7 @@ * @brief Let ARP look-up the MAC-address of the peer and initialise the first SYN * packet. * - * @param[in] pxSocket: The socket owning the TCP connection. The first packet shall + * @param[in] pxSocket The socket owning the TCP connection. The first packet shall * be created in this socket. * * @return pdTRUE: if the packet was successfully created and the first SYN can be sent. @@ -487,8 +487,8 @@ * @brief Common code for sending a TCP protocol control packet (i.e. no options, no * payload, just flags). * - * @param[in] pxNetworkBuffer: The network buffer received from the peer. - * @param[in] ucTCPFlags: The flags to determine what kind of packet this is. + * @param[in] pxNetworkBuffer The network buffer received from the peer. + * @param[in] ucTCPFlags The flags to determine what kind of packet this is. * * @return pdFAIL always indicating that the packet was not consumed. */ diff --git a/source/FreeRTOS_TCP_Utils_IPV4.c b/source/FreeRTOS_TCP_Utils_IPV4.c index 84228fa90b..0c8c49b738 100644 --- a/source/FreeRTOS_TCP_Utils_IPV4.c +++ b/source/FreeRTOS_TCP_Utils_IPV4.c @@ -51,7 +51,7 @@ /** * @brief Set the MSS (Maximum segment size) associated with the given socket. * - * @param[in] pxSocket: The socket whose MSS is to be set. + * @param[in] pxSocket The socket whose MSS is to be set. */ void prvSocketSetMSS_IPV4( FreeRTOS_Socket_t * pxSocket ) { diff --git a/source/FreeRTOS_TCP_Utils_IPV6.c b/source/FreeRTOS_TCP_Utils_IPV6.c index 5faa9e2f07..5da088daca 100644 --- a/source/FreeRTOS_TCP_Utils_IPV6.c +++ b/source/FreeRTOS_TCP_Utils_IPV6.c @@ -51,7 +51,7 @@ /** * @brief Set the MSS (Maximum segment size) associated with the given socket. * - * @param[in] pxSocket: The socket whose MSS is to be set. + * @param[in] pxSocket The socket whose MSS is to be set. */ void prvSocketSetMSS_IPV6( FreeRTOS_Socket_t * pxSocket ) { diff --git a/source/FreeRTOS_UDP_IPv6.c b/source/FreeRTOS_UDP_IPv6.c index 3c35b4bb8b..bec22b604b 100644 --- a/source/FreeRTOS_UDP_IPv6.c +++ b/source/FreeRTOS_UDP_IPv6.c @@ -79,7 +79,7 @@ extern NetworkEndPoint_t * pxGetEndpoint( BaseType_t xIPType ); * @brief Get the first end point of the type (IPv4/IPv6) from the list * the list of end points. * - * @param[in] xIPType: IT type (ipTYPE_IPv6/ipTYPE_IPv4) + * @param[in] xIPType IT type (ipTYPE_IPv6/ipTYPE_IPv4) * * @returns Pointer to the first end point of the given IP type from the * list of end points. @@ -116,9 +116,9 @@ NetworkEndPoint_t * pxGetEndpoint( BaseType_t xIPType ) * i.e. in the cache 'eARPCacheMiss' was returned. * Either an ARP request or a Neighbour solicitation will be emitted. * - * @param[in] pxNetworkBuffer : The network buffer carrying the UDP or ICMP packet. + * @param[in] pxNetworkBuffer The network buffer carrying the UDP or ICMP packet. * - * @param[out] pxLostBuffer : The pointee will be set to true in case the network packet got released + * @param[out] pxLostBuffer The pointee will be set to true in case the network packet got released * ( the ownership was taken ). */ static eARPLookupResult_t prvStartLookup( NetworkBufferDescriptor_t * const pxNetworkBuffer, @@ -193,7 +193,7 @@ static eARPLookupResult_t prvStartLookup( NetworkBufferDescriptor_t * const pxNe * @brief Process the generated UDP packet and do other checks before sending the * packet such as ARP cache check and address resolution. * - * @param[in] pxNetworkBuffer: The network buffer carrying the packet. + * @param[in] pxNetworkBuffer The network buffer carrying the packet. */ void vProcessGeneratedUDPPacket_IPv6( NetworkBufferDescriptor_t * const pxNetworkBuffer ) { @@ -412,9 +412,9 @@ void vProcessGeneratedUDPPacket_IPv6( NetworkBufferDescriptor_t * const pxNetwor /** * @brief Process the received UDP packet. * - * @param[in] pxNetworkBuffer: The network buffer carrying the UDP packet. - * @param[in] usPort: The port number on which this packet was received. - * @param[out] pxIsWaitingForARPResolution: If the packet is awaiting ARP resolution, + * @param[in] pxNetworkBuffer The network buffer carrying the UDP packet. + * @param[in] usPort The port number on which this packet was received. + * @param[out] pxIsWaitingForARPResolution If the packet is awaiting ARP resolution, * this pointer will be set to pdTRUE. pdFALSE otherwise. * * @return pdPASS in case the UDP packet could be processed. Else pdFAIL is returned. From d18fe9c2a25f6f92ee94fbe8103cb7e5d2230c14 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Fri, 31 Mar 2023 15:15:39 +0000 Subject: [PATCH 07/10] Add NetworkDown notification to NetworkInterface.c [PR: #671] (#812) * Add NetworkDown notification to EMAC task * Add NetworkDown notification to NetworkInterface.c * Uncrustify: triggered by comment. * Introduce ipconfigSUPPORT_NETWORK_DOWN_EVENT compile flag * Fix formatting * Uncrustify: triggered by comment. --------- Co-authored-by: Filip Oleszek Co-authored-by: zipperowiec <35423392+zipperowiec@users.noreply.github.com> Co-authored-by: GitHub Action --- source/include/FreeRTOSIPConfigDefaults.h | 6 ++++++ .../NetworkInterface/STM32Fxx/NetworkInterface.c | 9 +++++++++ source/portable/NetworkInterface/STM32Fxx/readme.md | 1 + 3 files changed, 16 insertions(+) diff --git a/source/include/FreeRTOSIPConfigDefaults.h b/source/include/FreeRTOSIPConfigDefaults.h index d3fdfd8d89..46edc186ef 100644 --- a/source/include/FreeRTOSIPConfigDefaults.h +++ b/source/include/FreeRTOSIPConfigDefaults.h @@ -1117,6 +1117,12 @@ #define ipconfigPROCESS_CUSTOM_ETHERNET_FRAMES 0 #endif +/* Set to 1 if you want to receive eNetworkDown notification via vApplicationIPNetworkEventHook() callback. + * Not all drivers support this feature. */ +#ifndef ipconfigSUPPORT_NETWORK_DOWN_EVENT + #define ipconfigSUPPORT_NETWORK_DOWN_EVENT 0 +#endif + #ifndef ipconfigND_CACHE_ENTRIES #define ipconfigND_CACHE_ENTRIES 24 #endif diff --git a/source/portable/NetworkInterface/STM32Fxx/NetworkInterface.c b/source/portable/NetworkInterface/STM32Fxx/NetworkInterface.c index e3d09e557f..0b20602ece 100644 --- a/source/portable/NetworkInterface/STM32Fxx/NetworkInterface.c +++ b/source/portable/NetworkInterface/STM32Fxx/NetworkInterface.c @@ -1500,6 +1500,15 @@ static void prvEMACHandlerTask( void * pvParameters ) { /* Something has changed to a Link Status, need re-check. */ prvEthernetUpdateConfig( pdFALSE ); + + #if ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 ) + { + if( xGetPhyLinkStatus() == pdFALSE ) + { + FreeRTOS_NetworkDown(); + } + } + #endif /* ( ipconfigSUPPORT_NETWORK_DOWN_EVENT != 0 ) */ } } } diff --git a/source/portable/NetworkInterface/STM32Fxx/readme.md b/source/portable/NetworkInterface/STM32Fxx/readme.md index 0b266875d8..e644a18706 100644 --- a/source/portable/NetworkInterface/STM32Fxx/readme.md +++ b/source/portable/NetworkInterface/STM32Fxx/readme.md @@ -81,6 +81,7 @@ Recommended settings for STM32Fxx Network Interface: #define ipconfigZERO_COPY_RX_DRIVER 1 #define ipconfigZERO_COPY_TX_DRIVER 1 #define ipconfigUSE_LINKED_RX_MESSAGES 1 +#define ipconfigSUPPORT_NETWORK_DOWN_EVENT 1 ``` **Defined in stm32f4xx_hal_conf.h** From a455e36b425f2c10bd09b106b98a228cfaa234b6 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Mon, 3 Apr 2023 11:40:59 +0000 Subject: [PATCH 08/10] Fix uncrustify bot command - disable install prompt (#819) * fix uncrustify run command * test uncrustify * Revert "test uncrustify" This reverts commit f660ab435fa741f8767f8a2849829f02a92ecca6. * removing apt-get prompt while installing git --- .github/workflows/uncrustify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/uncrustify.yml b/.github/workflows/uncrustify.yml index 15a5d9b20b..af09e802a8 100644 --- a/.github/workflows/uncrustify.yml +++ b/.github/workflows/uncrustify.yml @@ -35,7 +35,7 @@ jobs: repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }} ref: ${{ steps.upstreambranch.outputs.branchname }} - name: Install Uncrustify and Git - run: apt-get update && apt-get install uncrustify git-all + run: apt-get update && apt-get --assume-yes install uncrustify git - name: Run Uncrustify run: | uncrustify --version From 4102d34a6264d55f347886954323293fc50d3375 Mon Sep 17 00:00:00 2001 From: Tony Josi Date: Tue, 4 Apr 2023 05:11:50 +0000 Subject: [PATCH 09/10] Removing deprecated set-output command from uncrustify bot run yml (#820) * fix uncrustify run command * test uncrustify * Revert "test uncrustify" This reverts commit f660ab435fa741f8767f8a2849829f02a92ecca6. * removing apt-get prompt while installing git * removing the deprecated set-output command from uncrustify bot run yml, use latest git --- .github/workflows/uncrustify.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/uncrustify.yml b/.github/workflows/uncrustify.yml index af09e802a8..be550aa0a0 100644 --- a/.github/workflows/uncrustify.yml +++ b/.github/workflows/uncrustify.yml @@ -15,17 +15,23 @@ jobs: env: GITHUB_CONTEXT: ${{ toJson(github) }} run: echo "$GITHUB_CONTEXT" + - name: Install Utils + run: | + apt-get update && apt-get --assume-yes install software-properties-common curl jq sed + add-apt-repository ppa:git-core/ppa + apt-get update && apt-get --assume-yes install git + git --version - name: get pullrequest url run: | echo ${{ github.event.issue.pull_request.url }} - name: get upstream repo id: upstreamrepo run: | - echo "::set-output name=RemoteRepo::$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')" + echo "RemoteRepo=$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.repo.full_name' | sed 's/\"//g')" >> $GITHUB_OUTPUT - name: get upstream branch id: upstreambranch run: | - echo "::set-output name=branchname::$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')" + echo "branchname=$(curl -H "Accept: application/vnd.github.sailor-v-preview+json" --url ${{ github.event.issue.pull_request.url }} | jq '.head.ref' | sed 's/\"//g')" >> $GITHUB_OUTPUT - name: echo upstream repo:branch run: | echo ${{ steps.upstreamrepo.outputs.RemoteRepo }}:${{ steps.upstreambranch.outputs.branchname }} @@ -34,14 +40,15 @@ jobs: with: repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }} ref: ${{ steps.upstreambranch.outputs.branchname }} - - name: Install Uncrustify and Git - run: apt-get update && apt-get --assume-yes install uncrustify git + - name: Install Uncrustify + run: apt-get update && apt-get --assume-yes install uncrustify - name: Run Uncrustify run: | uncrustify --version find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} + - name: Push changes to upstream repository run: | + git config --global --add safe.directory '*' git config --global user.name 'GitHub Action' git config --global user.email 'action@github.com' git add -A From e219a77b4065624765e4017c1c2d0c1c6993193d Mon Sep 17 00:00:00 2001 From: Monika Singh Date: Tue, 18 Apr 2023 16:11:53 +0000 Subject: [PATCH 10/10] Fix build error of unused parameters --- source/FreeRTOS_DHCPv6.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/FreeRTOS_DHCPv6.c b/source/FreeRTOS_DHCPv6.c index e7d92c5992..f849e2ffb1 100644 --- a/source/FreeRTOS_DHCPv6.c +++ b/source/FreeRTOS_DHCPv6.c @@ -1330,7 +1330,8 @@ static BaseType_t prvDHCPv6_handleOption( struct xNetworkEndPoint * pxEndPoint, { BaseType_t xReady = pdFALSE; int32_t lIDSize = 0; - uint8_t ucClientDUID[ dhcpIPv6_CLIENT_DUID_LENGTH ]; + + ( void ) pxEndPoint; if( prvIsOptionLengthValid( usOption, pxSet->uxOptionLength, pxMessage->uxSize - pxMessage->uxIndex ) != pdTRUE ) {