mirror of
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP
synced 2025-10-22 16:37:41 +08:00
Uncrustify (#730)
* uncrustify * Uncrustify: triggered by comment. * Update FreeRTOS_ARP.c * Fix whitespace changes --------- Co-authored-by: Holden <holden-zenithaerotech.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: Aniruddha Kanhere <60444055+AniruddhaKanhere@users.noreply.github.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
||||
#include "FreeRTOS_Routing.h"
|
||||
#include "FreeRTOS_ND.h"
|
||||
|
||||
|
||||
/** @brief When the age of an entry in the ARP table reaches this value (it counts down
|
||||
* to zero, so this is an old entry) an ARP request will be sent to see if the
|
||||
* entry is still valid and can therefore be refreshed. */
|
||||
|
@@ -1003,7 +1003,6 @@
|
||||
|
||||
/* Important: tell NIC driver how many bytes must be sent */
|
||||
pxNetworkBuffer->xDataLength = uxDataLength;
|
||||
|
||||
}
|
||||
|
||||
#endif /* ipconfigUSE_NBNS == 1 || ipconfigUSE_LLMNR == 1 */
|
||||
|
@@ -1812,9 +1812,7 @@ static eFrameProcessingResult_t prvProcessIPPacket( const IPPacket_t * pxIPPacke
|
||||
* went wrong because it will not be able to validate what it
|
||||
* receives. */
|
||||
#if ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 )
|
||||
{
|
||||
eReturn = ProcessICMPPacket( pxNetworkBuffer );
|
||||
}
|
||||
#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */
|
||||
break;
|
||||
|
||||
|
@@ -362,6 +362,7 @@ void test_eARPProcessPacket_IPIsLocalLoopBack( void )
|
||||
xARPFrame.xARPHeader.ucProtocolAddressLength = ipIP_ADDRESS_LENGTH_BYTES;
|
||||
|
||||
uint32_t ulSenderProtocolAddress = FreeRTOS_htonl( ipFIRST_LOOPBACK_IPv4 + 10 );
|
||||
|
||||
memcpy( xARPFrame.xARPHeader.ucSenderProtocolAddress,
|
||||
&ulSenderProtocolAddress,
|
||||
sizeof( ulSenderProtocolAddress ) );
|
||||
@@ -391,6 +392,7 @@ void test_eARPProcessPacket_SenderIPLessThanLoopBack( void )
|
||||
xARPFrame.xARPHeader.ucProtocolAddressLength = ipIP_ADDRESS_LENGTH_BYTES;
|
||||
|
||||
uint32_t ulSenderProtocolAddress = FreeRTOS_htonl( ipFIRST_LOOPBACK_IPv4 - 10 );
|
||||
|
||||
memcpy( xARPFrame.xARPHeader.ucSenderProtocolAddress,
|
||||
&ulSenderProtocolAddress,
|
||||
sizeof( ulSenderProtocolAddress ) );
|
||||
@@ -634,6 +636,7 @@ void test_eARPProcessPacket_Reply_TargetIPSameAsLocalIP( void )
|
||||
xARPFrame.xARPHeader.ulTargetProtocolAddress = *ipLOCAL_IP_ADDRESS_POINTER;
|
||||
|
||||
uint32_t ulSenderProtocolAddress = 0xFFAAEEBB;
|
||||
|
||||
memcpy( &( xARPFrame.xARPHeader.ucSenderProtocolAddress ), &ulSenderProtocolAddress, sizeof( uint32_t ) );
|
||||
|
||||
/* Reset the private variable uxARPClashCounter. */
|
||||
@@ -681,6 +684,7 @@ void test_eARPProcessPacket_Reply_TargetIPNotSameAsLocalIP_ButEntryInCache( void
|
||||
xARPFrame.xARPHeader.ulTargetProtocolAddress = *ipLOCAL_IP_ADDRESS_POINTER + 1;
|
||||
|
||||
uint32_t ulSenderProtocolAddress = 0xFFAAEEBB;
|
||||
|
||||
memcpy( &( xARPFrame.xARPHeader.ucSenderProtocolAddress ), &ulSenderProtocolAddress, sizeof( uint32_t ) );
|
||||
|
||||
xARPCache[ 0 ].ulIPAddress = ulSenderProtocolAddress;
|
||||
@@ -1393,6 +1397,7 @@ void test_vARPRefreshCacheEntry_IPAndMACInDifferentLocations( void )
|
||||
TEST_ASSERT_EQUAL( ( uint8_t ) pdTRUE, xARPCache[ xUseEntry + 1 ].ucValid );
|
||||
|
||||
uint8_t MemoryCompare[ sizeof( ARPCacheRow_t ) ];
|
||||
|
||||
memset( MemoryCompare, 0, sizeof( ARPCacheRow_t ) );
|
||||
TEST_ASSERT_EQUAL_MEMORY( MemoryCompare, &xARPCache[ xUseEntry ], sizeof( ARPCacheRow_t ) );
|
||||
/* =================================================== */
|
||||
@@ -1550,8 +1555,8 @@ void test_eARPGetCacheEntry_IPMatchesOtherBroadcastAddr( void )
|
||||
/* =================================================== */
|
||||
}
|
||||
|
||||
// TODO: _TJ_: For the timebeing test_eARPGetCacheEntry_LocalIPIsZero and test_eARPGetCacheEntry_LocalIPMatchesReceivedIP
|
||||
// test cases are removed as we need to reevaluate if those cases are required for IPv6
|
||||
/* TODO: _TJ_: For the timebeing test_eARPGetCacheEntry_LocalIPIsZero and test_eARPGetCacheEntry_LocalIPMatchesReceivedIP */
|
||||
/* test cases are removed as we need to reevaluate if those cases are required for IPv6 */
|
||||
|
||||
void test_eARPGetCacheEntry_MatchingInvalidEntry( void )
|
||||
{
|
||||
@@ -1936,6 +1941,7 @@ void test_xARPWaitResolution_GNWFailsNoTimeout( void )
|
||||
|
||||
xEndPoint.bits.bIPv6 = pdFALSE_UNSIGNED;
|
||||
xEndPoint.ipv4_settings.ulIPAddress = 0xC0C0C0C0;
|
||||
|
||||
/* Make the resolution fail with maximum tryouts. */
|
||||
/* =================================================== */
|
||||
/* Make sure that no address matches the IP address. */
|
||||
@@ -1986,6 +1992,7 @@ void test_xARPWaitResolution( void )
|
||||
|
||||
xEndPoint.bits.bIPv6 = pdFALSE_UNSIGNED;
|
||||
xEndPoint.ipv4_settings.ulIPAddress = 0xC0C0C0C0;
|
||||
|
||||
/* Make the resolution fail after some attempts due to timeout. */
|
||||
/* =================================================== */
|
||||
/* Make sure that no address matches the IP address. */
|
||||
|
@@ -343,7 +343,7 @@ void test_FreeRTOS_gethostbyname_fail_send_dns_reply_zero( void )
|
||||
uint32_t ulNumber = 0;
|
||||
NetworkEndPoint_t xEndPoint;
|
||||
struct xSOCKET xDNSSocket;
|
||||
uint8_t pucPayloadBuffer_Arr[300];
|
||||
uint8_t pucPayloadBuffer_Arr[ 300 ];
|
||||
|
||||
uint8_t buffer[ 2280 + ipBUFFER_PADDING ];
|
||||
|
||||
@@ -354,6 +354,7 @@ void test_FreeRTOS_gethostbyname_fail_send_dns_reply_zero( void )
|
||||
xReceiveBuffer.uxPayloadLength = 300;
|
||||
memset( xReceiveBuffer.pucPayloadBuffer, 0x00, 300 );
|
||||
DNSMessage_t * header = ( DNSMessage_t * ) xReceiveBuffer.pucPayloadBuffer;
|
||||
|
||||
header->usIdentifier = 0;
|
||||
|
||||
xNetworkBuffer.xDataLength = 2280;
|
||||
@@ -391,7 +392,6 @@ void test_FreeRTOS_gethostbyname_fail_send_dns_reply_zero( void )
|
||||
TEST_ASSERT_EQUAL( 0, ret );
|
||||
|
||||
xNetworkBuffer.pucEthernetBuffer -= ipBUFFER_PADDING;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -416,6 +416,7 @@ void test_FreeRTOS_gethostbyname_succes( void )
|
||||
xReceiveBuffer.uxPayloadLength = 300;
|
||||
memset( xReceiveBuffer.pucPayloadBuffer, 0x00, 300 );
|
||||
DNSMessage_t * header = ( DNSMessage_t * ) xReceiveBuffer.pucPayloadBuffer;
|
||||
|
||||
header->usIdentifier = 0;
|
||||
xDNSSocket.usLocalPort = 0;
|
||||
|
||||
@@ -666,6 +667,7 @@ void test_FreeRTOS_gethostbyname_a_no_callback_retry_once( void )
|
||||
( void ) memset( xNetworkBuffer.pucEthernetBuffer, 0x00, uxBytesNeeded );
|
||||
( void ) memset( xReceiveBuffer.pucPayloadBuffer, 0x00, 300 );
|
||||
DNSMessage_t * header = ( DNSMessage_t * ) xReceiveBuffer.pucPayloadBuffer;
|
||||
|
||||
header->usIdentifier = 12;
|
||||
xDNSSocket.usLocalPort = 0;
|
||||
xEndPoint.bits.bIPv6 = pdFALSE;
|
||||
|
Reference in New Issue
Block a user