From af709e84c65a78e2853143033a70cd93f4a496ef 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] 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 | 71 ++-- 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 | 24 +- 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, 662 insertions(+), 683 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..a380a0cc2e 100644 --- a/source/FreeRTOS_ARP.c +++ b/source/FreeRTOS_ARP.c @@ -132,7 +132,8 @@ 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. + * @param[in] pxARPFrame The ARP Frame (the ARP packet). * * @return An enum which says whether to return the frame or to release it. */ @@ -320,9 +321,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 +396,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 +453,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 +488,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 +575,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 +606,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 +693,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 +814,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 +863,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 +936,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 +1027,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 +1174,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 +1253,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 +1313,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 +1396,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 +1427,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..91d07976b5 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 ) @@ -290,11 +290,7 @@ BaseType_t bAfter = tcpNOW_CONNECTED( ( BaseType_t ) eTCPState ); /* Is it connected now ? */ eIPTCPState_t xPreviousState = pxSocket->u.xTCP.eTCPState; - #if ( ipconfigUSE_CALLBACKS == 1 ) - FreeRTOS_Socket_t * xConnected = NULL; - #endif - if( ( ( xPreviousState == eCONNECT_SYN ) || ( xPreviousState == eSYN_FIRST ) || ( xPreviousState == eSYN_RECEIVED ) ) && @@ -303,7 +299,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 +542,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 +614,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 +660,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. */