Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ esocketsetdeleteevent
esocketsignalevent
espressif
estacktxevent
estatus
esuccess
etcpacceptevent
etcpnetstat
Expand Down Expand Up @@ -1339,6 +1340,7 @@ uxremainingtime
uxremaningtime
uxremoteport
uxrequestedsizebytes
uxresult
uxright
uxrxstreamsize
uxrxwinsize
Expand Down Expand Up @@ -1520,6 +1522,7 @@ xlastalivetime
xlastgratuitousarptime
xlastround
xlastsource
xleasetime
xlength
xlinkstatustimer
xlistend
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ add_compile_options(
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Wextra>
$<$<COMPILE_LANG_AND_ID:C,Clang,GNU>:-Werror>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Weverything>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wpedantic>

# TODO: Add in other Compilers here.
)
Expand Down
18 changes: 0 additions & 18 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,6 @@ target_include_directories( freertos_plus_tcp SYSTEM
include
)

#TODO(phelter): Investigate and fix in freertos_plus_tcp if not already fixed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay.

target_compile_options( freertos_plus_tcp
PRIVATE
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-bad-function-cast>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-cast-qual>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-conditional-uninitialized>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-covered-switch-default>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-documentation>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-extra-semi-stmt>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-implicit-int-conversion>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-missing-noreturn>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-reserved-identifier>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-shorten-64-to-32>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-sign-conversion>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-macros>
$<$<COMPILE_LANG_AND_ID:C,Clang>:-Wno-unused-parameter>
)

target_link_libraries( freertos_plus_tcp
PUBLIC
freertos_config
Expand Down
38 changes: 19 additions & 19 deletions source/FreeRTOS_ARP.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ static TickType_t xLastGratuitousARPTime = 0U;
/**
* @brief Process the ARP packets.
*
* @param[in] pxARPFrame: The ARP Frame (the ARP packet).
* @param[in] pxARPFrame The ARP Frame (the ARP packet).
*
* @return An enum which says whether to return the frame or to release it.
*/
Expand Down Expand Up @@ -311,8 +311,8 @@ eFrameProcessingResult_t eARPProcessPacket( ARPPacket_t * const pxARPFrame )

/**
* @brief A device has sent an ARP reply, process it.
* @param[in] pxARPFrame: The ARP packet received.
* @param[in] ulSenderProtocolAddress: The IPv4 address involved.
* @param[in] pxARPFrame The ARP packet received.
* @param[in] ulSenderProtocolAddress The IPv4 address involved.
*/
static void vProcessARPPacketReply( const ARPPacket_t * pxARPFrame,
uint32_t ulSenderProtocolAddress )
Expand Down Expand Up @@ -364,7 +364,7 @@ static void vProcessARPPacketReply( 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.
Expand Down Expand Up @@ -399,7 +399,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.
*/
Expand Down Expand Up @@ -467,9 +467,9 @@ BaseType_t xCheckRequiresARPResolution( const NetworkBufferDescriptor_t * pxNetw
/**
* @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.
*/
void vARPRefreshCacheEntry( const MACAddress_t * pxMACAddress,
Expand Down Expand Up @@ -649,8 +649,8 @@ void vARPRefreshCacheEntry( 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.
*/
Expand Down Expand Up @@ -685,8 +685,8 @@ void vARPRefreshCacheEntry( 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.
*
* @return If the IP address exists, copy the associated MAC address into pxMACAddress,
Expand Down Expand Up @@ -805,9 +805,9 @@ eARPLookupResult_t eARPGetCacheEntry( 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.
*
Expand Down Expand Up @@ -927,7 +927,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 )
Expand Down Expand Up @@ -988,8 +988,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.
*/
Expand Down Expand Up @@ -1047,7 +1047,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 )
Expand Down Expand Up @@ -1143,8 +1143,8 @@ void FreeRTOS_ClearARP( void )
* 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.
*
Expand Down
20 changes: 10 additions & 10 deletions source/FreeRTOS_DHCP.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,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.
Expand All @@ -155,7 +155,7 @@
* @brief The application can indicate a preferred IP address by calling this function.
* before starting up the IP-task by calling FreeRTOS_IPInit().
*
* @param[in] ulIPAddress: The preferred IP-address.
* @param[in] ulIPAddress The preferred IP-address.
*
* @return The previous value of ulPreferredIPAddress.
*/
Expand All @@ -181,8 +181,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] eExpectedState: The function will only run if the state is expected.
* @param[in] xReset Is the DHCP state machine starting over? pdTRUE/pdFALSE.
* @param[in] eExpectedState The function will only run if the state is expected.
*/
void vDHCPProcess( BaseType_t xReset,
eDHCPState_t eExpectedState )
Expand Down Expand Up @@ -680,7 +680,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.
*/
Expand Down Expand Up @@ -710,7 +710,7 @@
/**
* @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.
*
* @return pdPASS: if DHCP options are received correctly; pdFAIL: Otherwise.
Expand Down Expand Up @@ -980,10 +980,10 @@
/**
* @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[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.
*
* @return Ethernet buffer of the partially created DHCP packet.
*/
Expand Down
28 changes: 14 additions & 14 deletions source/FreeRTOS_DNS.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,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.
*/
Expand All @@ -166,10 +166,10 @@

/**
* @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.
* @param[in] pvSearchID: Search ID for the callback function.
* @param[in] uxTimeout: Timeout for the callback function.
* @param[in] pcHostName The hostname whose IP address is being queried.
* @param[in] pCallback 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. 0 is returned in case of
* failure.
*/
Expand All @@ -187,10 +187,10 @@
/**
* @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] pCallback: 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] pcHostName The hostname whose IP address is being queried.
* @param[in] pCallback 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,
Expand All @@ -201,7 +201,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 )
Expand Down Expand Up @@ -459,7 +459,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] pxAddress address structure
Expand Down Expand Up @@ -577,7 +577,7 @@
TickType_t uxIdentifier,
Socket_t xDNSSocket )
{
uint32_t ulIPAddress;
uint32_t ulIPAddress = 0;
BaseType_t xAttempt;

for( xAttempt = 0; xAttempt < ipconfigDNS_REQUEST_ATTEMPTS; xAttempt++ )
Expand Down Expand Up @@ -755,7 +755,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 pdFAIL Always to indicate that the packet was not consumed and must
* be released by the caller.
Expand Down Expand Up @@ -793,7 +793,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.
*/
Expand Down
16 changes: 8 additions & 8 deletions source/FreeRTOS_DNS_Cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@
/**
* @brief process a DNS Cache request (get, update, or insert)
*
* @param[in] pcName: the name of the host
* @param[in,out] pulIP: when doing a lookup, will be set, when doing an update,
* @param[in] pcName the name of the host
* @param[in,out] pulIP 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.
* @return whether the operation was successful
* @post the global structure \a xDNSCache might be modified
Expand All @@ -166,7 +166,7 @@

configASSERT( ( pcName != NULL ) );

ulCurrentTimeSeconds = ( xCurrentTickCount / portTICK_PERIOD_MS ) / 1000U;
ulCurrentTimeSeconds = ( uint32_t ) ( ( xCurrentTickCount / portTICK_PERIOD_MS ) / 1000U );
xResult = prvFindEntryIndex( pcName, &uxIndex );

if( xResult == pdTRUE )
Expand Down Expand Up @@ -219,7 +219,7 @@
/**
* @brief returns the index of the hostname entry in the dns cache.
* @param[in] pcName find it in the cache
* @param [out] xResult index number
* @param [out] uxResult index number
Comment thread
AniruddhaKanhere marked this conversation as resolved.
* @returns res pdTRUE if index in found else pdFALSE
*/
static BaseType_t prvFindEntryIndex( const char * pcName,
Expand Down Expand Up @@ -249,7 +249,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] pulIP fill it with the result
* @param[in] ulCurrentTimeSeconds current time
* @returns \c pdTRUE if the value is valid \c pdFALSE otherwise
Expand Down Expand Up @@ -299,7 +299,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] pulIP ip to update the cache with
* @param[in] ulCurrentTimeSeconds current time
Expand Down
2 changes: 1 addition & 1 deletion source/FreeRTOS_DNS_Networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@

/**
* @brief perform a DNS network close
* @param xDNSSocket
* @param xDNSSocket the DNS socket to close
*/
void DNS_CloseSocket( Socket_t xDNSSocket )
{
Expand Down
Loading