Преглед изворни кода

lwip: add ip frag and reassembly option in menuconfig

XiaXiaotian пре 9 година
родитељ
комит
15651b5923
2 измењених фајлова са 15 додато и 2 уклоњено
  1. 13 0
      components/lwip/Kconfig
  2. 2 2
      components/lwip/include/lwip/port/lwipopts.h

+ 13 - 0
components/lwip/Kconfig

@@ -49,6 +49,19 @@ config LWIP_DHCP_MAX_NTP_SERVERS
 		First argument of sntp_setserver/sntp_setservername functions
 		is limited to this value. 
 
+config LWIP_IP_FRAG
+    bool "Enable fragment outgoing IP packets"
+    default 0
+    help 
+        Enabling this option allows fragmenting outgoing IP packets if their size
+        exceeds MTU.
+
+config LWIP_IP_REASSEMBLY
+    bool "Enable reassembly incoming fragmented IP packets"
+    default 0
+    help 
+        Enabling this option allows reassemblying incoming fragmented IP packets.
+
 endmenu
 
 

+ 2 - 2
components/lwip/include/lwip/port/lwipopts.h

@@ -154,14 +154,14 @@
  * this option does not affect outgoing packet sizes, which can be controlled
  * via IP_FRAG.
  */
-#define IP_REASSEMBLY                   0
+#define IP_REASSEMBLY                   CONFIG_LWIP_IP_REASSEMBLY
 
 /**
  * IP_FRAG==1: Fragment outgoing IP packets if their size exceeds MTU. Note
  * that this option does not affect incoming packet sizes, which can be
  * controlled via IP_REASSEMBLY.
  */
-#define IP_FRAG                         0
+#define IP_FRAG                         CONFIG_LWIP_IP_FRAG
 
 /**
  * IP_REASS_MAXAGE: Maximum time (in multiples of IP_TMR_INTERVAL - so seconds, normally)