From 9f33e6e68043cc4d82c605c0ca679887ad485715 Mon Sep 17 00:00:00 2001 From: Emil Popov Date: Wed, 6 Sep 2023 13:59:07 -0400 Subject: [PATCH] removes the xNetworkAddressing and xDefaultAddressing structs as they appear to be obsolete. --- source/FreeRTOS_DHCP.c | 3 --- source/FreeRTOS_IP.c | 8 -------- source/include/FreeRTOS_DHCP.h | 5 ----- source/include/FreeRTOS_IP_Private.h | 9 --------- 4 files changed, 25 deletions(-) diff --git a/source/FreeRTOS_DHCP.c b/source/FreeRTOS_DHCP.c index e3e37e2ee..f775f6cec 100644 --- a/source/FreeRTOS_DHCP.c +++ b/source/FreeRTOS_DHCP.c @@ -56,9 +56,6 @@ #include "FreeRTOS_Routing.h" -/* The following define is temporary and serves to make the /single source - * code more similar to the /multi version. */ - #define EP_DHCPData pxEndPoint->xDHCPData /**< Temporary define to make /single source similar to /multi version. */ #define EP_IPv4_SETTINGS pxEndPoint->ipv4_settings /**< Temporary define to make /single source similar to /multi version. */ diff --git a/source/FreeRTOS_IP.c b/source/FreeRTOS_IP.c index 7366e8f89..8d6c765ab 100644 --- a/source/FreeRTOS_IP.c +++ b/source/FreeRTOS_IP.c @@ -185,14 +185,6 @@ uint16_t usPacketIdentifier = 0U; * reference. */ const MACAddress_t xBroadcastMACAddress = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } }; -/** @brief Default values for the above struct in case DHCP - * does not lead to a confirmed request. */ - -/* MISRA Ref 8.9.1 [File scoped variables] */ -/* More details at: https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/blob/main/MISRA.md#rule-89 */ -/* coverity[misra_c_2012_rule_8_9_violation] */ -NetworkAddressingParameters_t xDefaultAddressing = { 0, 0, 0, 0, 0 }; - /** @brief Used to ensure network down events cannot be missed when they cannot be * posted to the network event queue because the network event queue is already * full. */ diff --git a/source/include/FreeRTOS_DHCP.h b/source/include/FreeRTOS_DHCP.h index 26fef7dea..bc1eeb6d6 100644 --- a/source/include/FreeRTOS_DHCP.h +++ b/source/include/FreeRTOS_DHCP.h @@ -103,11 +103,6 @@ #define dhcpADDRESS_TYPE_ETHERNET ( 1U ) /**< Address type: ethernet opcode. */ #define dhcpETHERNET_ADDRESS_LENGTH ( 6U ) /**< Ethernet address length opcode. */ -/* The following define is temporary and serves to make the /single source - * code more similar to the /multi version. TODO */ -//#define EP_DHCPData xDHCPData /**< Temporary define to make /single source similar to /multi version. */ -//#define EP_IPv4_SETTINGS xNetworkAddressing /**< Temporary define to make /single source similar to /multi version. */ - /** @brief If a lease time is not received, use the default of two days (48 hours in ticks). * Can not use pdMS_TO_TICKS() as integer overflow can occur. */ #define dhcpDEFAULT_LEASE_TIME ( ( 48UL * 60UL * 60UL ) * configTICK_RATE_HZ ) diff --git a/source/include/FreeRTOS_IP_Private.h b/source/include/FreeRTOS_IP_Private.h index 1a7fb567e..1c97d5c89 100644 --- a/source/include/FreeRTOS_IP_Private.h +++ b/source/include/FreeRTOS_IP_Private.h @@ -339,15 +339,6 @@ typedef union xUDPPacketHeader extern UDPPacketHeader_t xDefaultPartUDPPacketHeader; -/* Structure that stores the netmask, gateway address and DNS server addresses. */ -extern NetworkAddressingParameters_t xNetworkAddressing; - -/* Structure that stores the defaults for netmask, gateway address and DNS. - * These values will be copied to 'xNetworkAddressing' in case DHCP is not used, - * and also in case DHCP does not lead to a confirmed request. */ -/*lint -e9003*/ -extern NetworkAddressingParameters_t xDefaultAddressing; /*lint !e9003 could define variable 'xDefaultAddressing' at block scope [MISRA 2012 Rule 8.9, advisory]. */ - /* True when BufferAllocation_1.c was included, false for BufferAllocation_2.c */ extern const BaseType_t xBufferAllocFixedSize;