فهرست منبع

lwip: Added debug config options for DHCP and TCP

ryan kurte 5 سال پیش
والد
کامیت
85083ddc3d
2فایلهای تغییر یافته به همراه28 افزوده شده و 4 حذف شده
  1. 8 0
      components/lwip/Kconfig
  2. 20 4
      components/lwip/port/esp32/include/lwipopts.h

+ 8 - 0
components/lwip/Kconfig

@@ -859,6 +859,10 @@ menu "LWIP"
             bool "Enable ICMP debug messages"
             default n
 
+        config LWIP_DHCP_DEBUG
+            bool "Enable DHCP debug messages"
+            default n
+
         config LWIP_IP6_DEBUG
             bool "Enable IP6 debug messages"
             default n
@@ -867,5 +871,9 @@ menu "LWIP"
             bool "Enable ICMP6 debug messages"
             default n
 
+        config LWIP_TCP_DEBUG
+            bool "Enable TCP debug messages"
+            default n
+
     endmenu #debug
 endmenu

+ 20 - 4
components/lwip/port/esp32/include/lwipopts.h

@@ -837,6 +837,15 @@
 #define ICMP6_DEBUG                      LWIP_DBG_OFF
 #endif
 
+/**
+ * DHCP_DEBUG: Enable debugging in dhcp.c.
+ */
+#ifdef CONFIG_LWIP_DHCP_DEBUG
+#define DHCP_DEBUG                      LWIP_DBG_ON
+#else
+#define DHCP_DEBUG                      LWIP_DBG_OFF
+#endif
+
 /**
  * IP_DEBUG: Enable debugging for IP.
  */
@@ -847,7 +856,7 @@
 #endif
 
 /**
- * IP_DEBUG: Enable debugging for IP.
+ * IP6_DEBUG: Enable debugging for IP6.
  */
 #ifdef CONFIG_LWIP_IP6_DEBUG
 #define IP6_DEBUG                        LWIP_DBG_ON
@@ -855,6 +864,15 @@
 #define IP6_DEBUG                        LWIP_DBG_OFF
 #endif
 
+/**
+ * TCP_DEBUG: Enable debugging for TCP.
+ */
+#ifdef CONFIG_LWIP_TCP_DEBUG
+#define TCP_DEBUG                        LWIP_DBG_ON
+#else
+#define TCP_DEBUG                        LWIP_DBG_OFF
+#endif
+
 /**
  * MEMP_DEBUG: Enable debugging in memp.c.
  */
@@ -962,11 +980,9 @@
 #define TCP_WND                         CONFIG_LWIP_TCP_WND_DEFAULT
 
 /**
- * DHCP_DEBUG: Enable debugging in dhcp.c.
+ * LWIP_DEBUG: Enable lwip debugging in other modules.
  */
-#define DHCP_DEBUG                      LWIP_DBG_OFF
 #define LWIP_DEBUG                      LWIP_DBG_OFF
-#define TCP_DEBUG                       LWIP_DBG_OFF
 
 #define CHECKSUM_CHECK_UDP              CONFIG_LWIP_CHECKSUM_CHECK_UDP
 #define CHECKSUM_CHECK_IP               CONFIG_LWIP_CHECKSUM_CHECK_IP