4 bool "Enable copy between Layer2 and Layer3 packets"
7 If this feature is enabled, all traffic from layer2(WIFI Driver) will be
8 copied to a new buffer before sending it to layer3(LWIP stack), freeing
10 Please be notified that the total layer2 receiving buffer is fixed and
11 ESP32 currently supports 25 layer2 receiving buffer, when layer2 buffer
12 runs out of memory, then the incoming packets will be dropped in hardware.
13 The layer3 buffer is allocated from the heap, so the total layer3 receiving
14 buffer depends on the available heap size, when heap runs out of memory,
15 no copy will be sent to layer3 and packet will be dropped in layer2.
16 Please make sure you fully understand the impact of this feature before
19 config LWIP_IRAM_OPTIMIZATION
20 bool "Enable LWIP IRAM optimization"
23 If this feature is enabled, some functions relating to RX/TX in LWIP will be
24 put into IRAM, it can improve UDP/TCP throughput by >10% for single core mode,
25 it doesn't help too much for dual core mode. On the other hand, it needs about
26 10KB IRAM for these optimizations.
28 If this feature is disabled, all lwip functions will be put into FLASH.
30 config LWIP_MAX_SOCKETS
31 int "Max number of open sockets"
35 Sockets take up a certain amount of memory, and allowing fewer
36 sockets to be open at the same time conserves memory. Specify
37 the maximum amount of sockets here. The valid value is from 1
40 config USE_ONLY_LWIP_SELECT
41 bool "Support LWIP socket select() only"
44 The virtual filesystem layer of select() redirects sockets to
45 lwip_select() and non-socket file descriptors to their respective driver
46 implementations. If this option is enabled then all calls of select()
47 will be redirected to lwip_select(), therefore, select can be used
51 bool "Enable SO_REUSEADDR option"
54 Enabling this option allows binding to a port which remains in
57 config LWIP_SO_REUSE_RXTOALL
58 bool "SO_REUSEADDR copies broadcast/multicast to all matches"
59 depends on LWIP_SO_REUSE
62 Enabling this option means that any incoming broadcast or multicast
63 packet will be copied to all of the local sockets that it matches
64 (may be more than one if SO_REUSEADDR is set on the socket.)
66 This increases memory overhead as the packets need to be copied,
67 however they are only copied per matching socket. You can safely
68 disable it if you don't plan to receive broadcast or multicast
69 traffic on more than one socket at a time.
72 bool "Enable SO_RCVBUF option"
75 Enabling this option allows checking for available data on a netconn.
77 config LWIP_DHCP_MAX_NTP_SERVERS
78 int "Maximum number of NTP servers"
82 Set maximum number of NTP servers used by LwIP SNTP module.
83 First argument of sntp_setserver/sntp_setservername functions
84 is limited to this value.
87 bool "Enable fragment outgoing IP packets"
90 Enabling this option allows fragmenting outgoing IP packets if their size
93 config LWIP_IP_REASSEMBLY
94 bool "Enable reassembly incoming fragmented IP packets"
97 Enabling this option allows reassemblying incoming fragmented IP packets.
100 bool "Enable LWIP statistics"
103 Enabling this option allows LWIP statistics
105 config LWIP_ETHARP_TRUST_IP_MAC
106 bool "Enable LWIP ARP trust"
109 Enabling this option allows ARP table to be updated.
111 If this option is enabled, the incoming IP packets cause the ARP table to be
112 updated with the source MAC and IP addresses supplied in the packet.
113 You may want to disable this if you do not trust LAN peers to have the
114 correct addresses, or as a limited approach to attempt to handle
115 spoofing. If disabled, lwIP will need to make a new ARP request if
116 the peer is not already in the ARP table, adding a little latency.
117 The peer *is* in the ARP table if it requested our address before.
118 Also notice that this slows down input processing of every IP packet!
120 There are two known issues in real application if this feature is enabled:
121 - The LAN peer may have bug to update the ARP table after the ARP entry is aged out.
122 If the ARP entry on the LAN peer is aged out but failed to be updated, all IP packets
123 sent from LWIP to the LAN peer will be dropped by LAN peer.
124 - The LAN peer may not be trustful, the LAN peer may send IP packets to LWIP with
125 two different MACs, but the same IP address. If this happens, the LWIP has problem
126 to receive IP packets from LAN peer.
128 So the recommendation is to disable this option.
129 Here the LAN peer means the other side to which the ESP station or soft-AP is connected.
131 config TCPIP_RECVMBOX_SIZE
132 int "TCPIP task receive mail box size"
136 Set TCPIP task receive mail box size. Generally bigger value means higher throughput
137 but more memory. The value should be bigger than UDP/TCP mail box size.
139 config LWIP_DHCP_DOES_ARP_CHECK
140 bool "DHCP: Perform ARP check on any offered address"
143 Enabling this option performs a check (via ARP request) if the offered IP address
144 is not already in use by another host on the network.
148 config LWIP_DHCPS_LEASE_UNIT
149 int "Multiplier for lease time, in seconds"
153 The DHCP server is calculating lease time multiplying the sent
154 and received times by this number of seconds per unit.
155 The default is 60, that equals one minute.
157 config LWIP_DHCPS_MAX_STATION_NUM
158 int "Maximum number of stations"
162 The maximum number of DHCP clients that are connected to the server.
163 After this number is exceeded, DHCP server removes of the oldest device
164 from it's address pool, without notification.
168 menuconfig LWIP_AUTOIP
169 bool "Enable IPV4 Link-Local Addressing (AUTOIP)"
172 Enabling this option allows the device to self-assign an address
173 in the 169.256/16 range if none is assigned statically or via DHCP.
177 config LWIP_AUTOIP_TRIES
178 int "DHCP Probes before self-assigning IPv4 LL address"
181 depends on LWIP_AUTOIP
183 DHCP client will send this many probes before self-assigning a
186 From LWIP help: "This can be set as low as 1 to get an AutoIP
187 address very quickly, but you should be prepared to handle a
188 changing IP address when DHCP overrides AutoIP." (In the case of
189 ESP-IDF, this means multiple SYSTEM_EVENT_STA_GOT_IP events.)
191 config LWIP_AUTOIP_MAX_CONFLICTS
192 int "Max IP conflicts before rate limiting"
195 depends on LWIP_AUTOIP
197 If the AUTOIP functionality detects this many IP conflicts while
198 self-assigning an address, it will go into a rate limited mode.
200 config LWIP_AUTOIP_RATE_LIMIT_INTERVAL
201 int "Rate limited interval (seconds)"
204 depends on LWIP_AUTOIP
206 If rate limiting self-assignment requests, wait this long between
209 menuconfig LWIP_NETIF_LOOPBACK
210 bool "Support per-interface loopback"
213 Enabling this option means that if a packet is sent with a destination
214 address equal to the interface's own IP address, it will "loop back" and
215 be received by this interface.
217 config LWIP_LOOPBACK_MAX_PBUFS
218 int "Max queued loopback packets per interface"
221 depends on LWIP_NETIF_LOOPBACK
223 Configure the maximum number of packets which can be queued for
224 loopback on a given interface. Reducing this number may cause packets
225 to be dropped, but will avoid filling memory with queued packet data.
229 config LWIP_MAX_ACTIVE_TCP
230 int "Maximum active TCP Connections"
234 The maximum number of simultaneously active TCP
235 connections. The practical maximum limit is
236 determined by available heap memory at runtime.
238 Changing this value by itself does not substantially
239 change the memory usage of LWIP, except for preventing
240 new TCP connections after the limit is reached.
242 config LWIP_MAX_LISTENING_TCP
243 int "Maximum listening TCP Connections"
247 The maximum number of simultaneously listening TCP
248 connections. The practical maximum limit is
249 determined by available heap memory at runtime.
251 Changing this value by itself does not substantially
252 change the memory usage of LWIP, except for preventing
253 new listening TCP connections after the limit is reached.
257 int "Maximum number of retransmissions of data segments"
261 Set maximum number of retransmissions of data segments.
264 int "Maximum number of retransmissions of SYN segments"
268 Set maximum number of retransmissions of SYN segments.
271 int "Maximum Segment Size (MSS)"
275 Set maximum segment size for TCP transmission.
277 Can be set lower to save RAM, the default value 1436 will give best throughput.
280 int "Maximum segment lifetime (MSL)"
283 Set maximum segment lifetime in in milliseconds.
285 config TCP_SND_BUF_DEFAULT
286 int "Default send buffer size"
287 default 5744 # 4 * default MSS
290 Set default send buffer size for new TCP sockets.
292 Per-socket send buffer size can be changed at runtime
293 with lwip_setsockopt(s, TCP_SNDBUF, ...).
295 This value must be at least 2x the MSS size, and the default
296 is 4x the default MSS size.
298 Setting a smaller default SNDBUF size can save some RAM, but
299 will decrease performance.
301 config TCP_WND_DEFAULT
302 int "Default receive window size"
303 default 5744 # 4 * default MSS
306 Set default TCP receive window size for new TCP sockets.
308 Per-socket receive window size can be changed at runtime
309 with lwip_setsockopt(s, TCP_WINDOW, ...).
311 Setting a smaller default receive window size can save some RAM,
312 but will significantly decrease performance.
314 config TCP_RECVMBOX_SIZE
315 int "Default TCP receive mail box size"
319 Set TCP receive mail box size. Generally bigger value means higher throughput
320 but more memory. The recommended value is: TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if
321 TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box size is
322 (14360/1436 + 2) = 12.
324 TCP receive mail box is a per socket mail box, when the application receives packets
325 from TCP socket, LWIP core firstly posts the packets to TCP receive mail box and the
326 application then fetches the packets from mail box. It means LWIP can caches maximum
327 TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets
328 for all TCP sockets is TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other
329 words, the bigger TCP_RECVMBOX_SIZE means more memory.
330 On the other hand, if the receiv mail box is too small, the mail box may be full. If the
331 mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
332 receive mail box is big enough to avoid packet drop between LWIP core and application.
334 config TCP_QUEUE_OOSEQ
335 bool "Queue incoming out-of-order segments"
338 Queue incoming out-of-order segments for later use.
340 Disable this option to save some RAM during TCP sessions, at the expense
341 of increased retransmissions if segments arrive out of order.
343 config ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES
344 bool "Keep TCP connections when IP changed"
347 This option is enabled when the following scenario happen:
348 network dropped and reconnected, IP changes is like: 192.168.0.2->0.0.0.0->192.168.0.2
350 Disable this option to keep consistent with the original LWIP code behavior.
354 prompt "Pre-allocate transmit PBUF size"
355 default TCP_OVERSIZE_MSS
357 Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time,
358 which can reduce the length of pbuf chains used for transmission.
360 This will not make a difference to sockets where Nagle's algorithm
363 Default value of MSS is fine for most applications, 25% MSS may save
364 some RAM when only transmitting small amounts of data. Disabled will
365 have worst performance and fragmentation characteristics, but uses
368 config TCP_OVERSIZE_MSS
370 config TCP_OVERSIZE_QUARTER_MSS
372 config TCP_OVERSIZE_DISABLE
381 config LWIP_MAX_UDP_PCBS
382 int "Maximum active UDP control blocks"
386 The maximum number of active UDP "connections" (ie
387 UDP sockets sending/receiving data).
388 The practical maximum limit is determined by available
389 heap memory at runtime.
391 config UDP_RECVMBOX_SIZE
392 int "Default UDP receive mail box size"
396 Set UDP receive mail box size. The recommended value is 6.
398 UDP receive mail box is a per socket mail box, when the application receives packets
399 from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the
400 application then fetches the packets from mail box. It means LWIP can caches maximum
401 UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets
402 for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other
403 words, the bigger UDP_RECVMBOX_SIZE means more memory.
404 On the other hand, if the receiv mail box is too small, the mail box may be full. If the
405 mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP
406 receive mail box is big enough to avoid packet drop between LWIP core and application.
410 config TCPIP_TASK_STACK_SIZE
411 int "TCP/IP Task Stack Size"
413 # for high log levels, tcpip_adapter API calls can end up
414 # a few calls deep and logging there can trigger a stack overflow
415 range 2048 65536 if LOG_DEFAULT_LEVEL < 4
416 range 2560 65536 if LOG_DEFAULT_LEVEL >= 4
418 Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
419 Setting this stack too small will result in stack overflow crashes.
421 menuconfig PPP_SUPPORT
422 bool "Enable PPP support (new/experimental)"
425 Enable PPP stack. Now only PPP over serial is possible.
427 PPP over serial support is experimental and unsupported.
429 config PPP_PAP_SUPPORT
430 bool "Enable PAP support"
431 depends on PPP_SUPPORT
434 Enable Password Authentication Protocol (PAP) support
436 config PPP_CHAP_SUPPORT
437 bool "Enable CHAP support"
438 depends on PPP_SUPPORT
441 Enable Challenge Handshake Authentication Protocol (CHAP) support
443 config PPP_MSCHAP_SUPPORT
444 bool "Enable MSCHAP support"
445 depends on PPP_SUPPORT
448 Enable Microsoft version of the Challenge-Handshake Authentication Protocol (MSCHAP) support
450 config PPP_MPPE_SUPPORT
451 bool "Enable MPPE support"
452 depends on PPP_SUPPORT
455 Enable Microsoft Point-to-Point Encryption (MPPE) support
458 bool "Enable PPP debug log output"
459 depends on PPP_SUPPORT
462 Enable PPP debug log output
466 config LWIP_MULTICAST_PING
467 bool "Respond to multicast pings"
470 config LWIP_BROADCAST_PING
471 bool "Respond to broadcast pings"
478 config LWIP_MAX_RAW_PCBS
479 int "Maximum LWIP RAW PCBs"
483 The maximum number of simultaneously active LWIP
484 RAW protocol control blocks. The practical maximum
485 limit is determined by available heap memory at runtime.
487 endmenu # LWIP RAW API