1menu "LWIP"
2
3    config LWIP_LOCAL_HOSTNAME
4        string "Local netif hostname"
5        default 'espressif'
6        help
7            The default name this device will report to other devices on the network.
8            Could be updated at runtime with esp_netif_set_hostname()
9
10    config LWIP_NETIF_API
11        bool "Enable usage of standard POSIX APIs in LWIP"
12        default n
13        help
14            If this feature is enabled, standard POSIX APIs: if_indextoname(), if_nametoindex()
15            could be used to convert network interface index to name
16            instead of IDF specific esp-netif APIs (such as esp_netif_get_netif_impl_name())
17
18    config LWIP_TCPIP_CORE_LOCKING
19        bool "Enable tcpip core locking"
20        default n
21        help
22            If Enable tcpip core locking,Creates a global mutex that is held
23            during TCPIP thread operations.Can be locked by client code to perform
24            lwIP operations without changing into TCPIP thread using callbacks.
25            See LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE().
26
27            If disable tcpip core locking,TCP IP will perform tasks through context switching.
28
29    config LWIP_DNS_SUPPORT_MDNS_QUERIES
30        bool "Enable mDNS queries in resolving host name"
31        default y
32        help
33            If this feature is enabled, standard API such as gethostbyname
34            support .local addresses by sending one shot multicast mDNS
35            query
36
37    config LWIP_L2_TO_L3_COPY
38        bool "Enable copy between Layer2 and Layer3 packets"
39        default n
40        help
41            If this feature is enabled, all traffic from layer2(WIFI Driver) will be
42            copied to a new buffer before sending it to layer3(LWIP stack), freeing
43            the layer2 buffer.
44            Please be notified that the total layer2 receiving buffer is fixed and
45            ESP32 currently supports 25 layer2 receiving buffer, when layer2 buffer
46            runs out of memory, then the incoming packets will be dropped in hardware.
47            The layer3 buffer is allocated from the heap, so the total layer3 receiving
48            buffer depends on the available heap size, when heap runs out of memory,
49            no copy will be sent to layer3 and packet will be dropped in layer2.
50            Please make sure you fully understand the impact of this feature before
51            enabling it.
52
53    config LWIP_IRAM_OPTIMIZATION
54        bool "Enable LWIP IRAM optimization"
55        default n
56        help
57            If this feature is enabled, some functions relating to RX/TX in LWIP will be
58            put into IRAM, it can improve UDP/TCP throughput by >10% for single core mode,
59            it doesn't help too much for dual core mode. On the other hand, it needs about
60            10KB IRAM for these optimizations.
61
62            If this feature is disabled, all lwip functions will be put into FLASH.
63
64    config LWIP_TIMERS_ONDEMAND
65        bool "Enable LWIP Timers on demand"
66        default y
67        help
68            If this feature is enabled, IGMP and MLD6 timers will be activated only
69            when joining groups or receiving QUERY packets.
70
71            This feature will reduce the power consumption for applications which do not
72            use IGMP and MLD6.
73
74    config LWIP_MAX_SOCKETS
75        int "Max number of open sockets"
76        range 1 16
77        default 10
78        help
79            Sockets take up a certain amount of memory, and allowing fewer
80            sockets to be open at the same time conserves memory. Specify
81            the maximum amount of sockets here. The valid value is from 1
82            to 16.
83
84    config LWIP_USE_ONLY_LWIP_SELECT
85        bool "Support LWIP socket select() only (DEPRECATED)"
86        default n
87        help
88            This option is deprecated. Use VFS_SUPPORT_SELECT instead, which is
89            the inverse of this option.
90
91            The virtual filesystem layer of select() redirects sockets to
92            lwip_select() and non-socket file descriptors to their respective driver
93            implementations. If this option is enabled then all calls of select()
94            will be redirected to lwip_select(), therefore, select can be used
95            for sockets only.
96
97    config LWIP_SO_LINGER
98        bool "Enable SO_LINGER processing"
99        default n
100        help
101            Enabling this option allows SO_LINGER processing.
102            l_onoff = 1,l_linger can set the timeout.
103
104            If l_linger=0, When a connection is closed, TCP will terminate the connection.
105            This means that TCP will discard any data packets stored in the socket send buffer
106            and send an RST to the peer.
107
108            If l_linger!=0,Then closesocket() calls to block the process until
109            the remaining data packets has been sent or timed out.
110
111    config LWIP_SO_REUSE
112        bool "Enable SO_REUSEADDR option"
113        default y
114        help
115            Enabling this option allows binding to a port which remains in
116            TIME_WAIT.
117
118    config LWIP_SO_REUSE_RXTOALL
119        bool "SO_REUSEADDR copies broadcast/multicast to all matches"
120        depends on LWIP_SO_REUSE
121        default y
122        help
123            Enabling this option means that any incoming broadcast or multicast
124            packet will be copied to all of the local sockets that it matches
125            (may be more than one if SO_REUSEADDR is set on the socket.)
126
127            This increases memory overhead as the packets need to be copied,
128            however they are only copied per matching socket. You can safely
129            disable it if you don't plan to receive broadcast or multicast
130            traffic on more than one socket at a time.
131
132    config LWIP_SO_RCVBUF
133        bool "Enable SO_RCVBUF option"
134        default n
135        help
136            Enabling this option allows checking for available data on a netconn.
137
138    config LWIP_NETBUF_RECVINFO
139        bool "Enable IP_PKTINFO option"
140        default n
141        help
142            Enabling this option allows checking for the destination address
143            of a received IPv4 Packet.
144
145    config LWIP_IP4_FRAG
146        bool "Enable fragment outgoing IP4 packets"
147        default y
148        help
149            Enabling this option allows fragmenting outgoing IP4 packets if their size
150            exceeds MTU.
151
152    config LWIP_IP6_FRAG
153        bool "Enable fragment outgoing IP6 packets"
154        default y
155        depends on LWIP_IPV6
156        help
157            Enabling this option allows fragmenting outgoing IP6 packets if their size
158            exceeds MTU.
159
160    config LWIP_IP4_REASSEMBLY
161        bool "Enable reassembly incoming fragmented IP4 packets"
162        default n
163        help
164            Enabling this option allows reassemblying incoming fragmented IP4 packets.
165
166    config LWIP_IP6_REASSEMBLY
167        bool "Enable reassembly incoming fragmented IP6 packets"
168        default n
169        depends on LWIP_IPV6
170        help
171            Enabling this option allows reassemblying incoming fragmented IP6 packets.
172
173    config LWIP_IP_FORWARD
174        bool "Enable IP forwarding"
175        default n
176        help
177            Enabling this option allows packets forwarding across multiple interfaces.
178
179    config LWIP_IPV4_NAPT
180        bool "Enable NAT (new/experimental)"
181        depends on LWIP_IP_FORWARD
182        select LWIP_L2_TO_L3_COPY
183        default n
184        help
185            Enabling this option allows Network Address and Port Translation.
186
187    config LWIP_STATS
188        bool "Enable LWIP statistics"
189        default n
190        help
191            Enabling this option allows LWIP statistics
192
193    config LWIP_ETHARP_TRUST_IP_MAC
194        bool "Enable LWIP ARP trust"
195        default n
196        help
197            Enabling this option allows ARP table to be updated.
198
199            If this option is enabled, the incoming IP packets cause the ARP table to be
200            updated with the source MAC and IP addresses supplied in the packet.
201            You may want to disable this if you do not trust LAN peers to have the
202            correct addresses, or as a limited approach to attempt to handle
203            spoofing. If disabled, lwIP will need to make a new ARP request if
204            the peer is not already in the ARP table, adding a little latency.
205            The peer *is* in the ARP table if it requested our address before.
206            Also notice that this slows down input processing of every IP packet!
207
208            There are two known issues in real application if this feature is enabled:
209            - The LAN peer may have bug to update the ARP table after the ARP entry is aged out.
210            If the ARP entry on the LAN peer is aged out but failed to be updated, all IP packets
211            sent from LWIP to the LAN peer will be dropped by LAN peer.
212            - The LAN peer may not be trustful, the LAN peer may send IP packets to LWIP with
213            two different MACs, but the same IP address. If this happens, the LWIP has problem
214            to receive IP packets from LAN peer.
215
216            So the recommendation is to disable this option.
217            Here the LAN peer means the other side to which the ESP station or soft-AP is connected.
218
219    config LWIP_ESP_GRATUITOUS_ARP
220        bool "Send gratuitous ARP periodically"
221        default y
222        help
223            Enable this option allows to send gratuitous ARP periodically.
224
225            This option solve the compatibility issues.If the ARP table of the AP is old, and the AP
226            doesn't send ARP request to update it's ARP table, this will lead to the STA sending IP packet fail.
227            Thus we send gratuitous ARP periodically to let AP update it's ARP table.
228
229    config LWIP_GARP_TMR_INTERVAL
230        int "GARP timer interval(seconds)"
231        default 60
232        depends on LWIP_ESP_GRATUITOUS_ARP
233        help
234            Set the timer interval for gratuitous ARP. The default value is 60s
235
236    config LWIP_TCPIP_RECVMBOX_SIZE
237        int "TCPIP task receive mail box size"
238        default 32
239        range 6 64 if !LWIP_WND_SCALE
240        range 6 1024 if LWIP_WND_SCALE
241        help
242            Set TCPIP task receive mail box size. Generally bigger value means higher throughput
243            but more memory. The value should be bigger than UDP/TCP mail box size.
244
245    config LWIP_DHCP_DOES_ARP_CHECK
246        bool "DHCP: Perform ARP check on any offered address"
247        default y
248        help
249            Enabling this option performs a check (via ARP request) if the offered IP address
250            is not already in use by another host on the network.
251
252    config LWIP_DHCP_DISABLE_CLIENT_ID
253        bool "DHCP: Disable Use of HW address as client identification"
254        default n
255        help
256            This option could be used to disable DHCP client identification with its MAC address.
257            (Client id is used by DHCP servers to uniquely identify clients and are included
258            in the DHCP packets as an option 61)
259            Set this option to "y" in order to exclude option 61 from DHCP packets.
260
261    config LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
262        bool "DHCP: Disable Use of vendor class identification"
263        default y
264        help
265            This option could be used to disable DHCP client vendor class identification.
266            Set this option to "y" in order to exclude option 60 from DHCP packets.
267
268    config LWIP_DHCP_RESTORE_LAST_IP
269        bool "DHCP: Restore last IP obtained from DHCP server"
270        default n
271        help
272            When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP
273            server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still
274            available, there is no need for sending discovery message to DHCP server and save some time.
275
276    config LWIP_DHCP_OPTIONS_LEN
277        int "DHCP total option length"
278        default 68 if LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
279        default 108 if !LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
280        range 68 255
281        help
282            Set total length of outgoing DHCP option msg. Generally bigger value means it can carry more
283            options and values. If your code meets LWIP_ASSERT due to option value is too long.
284            Please increase the LWIP_DHCP_OPTIONS_LEN value.
285
286    menu "DHCP server"
287
288        config LWIP_DHCPS
289            bool "DHCPS: Enable IPv4 Dynamic Host Configuration Protocol Server (DHCPS)"
290            default y
291            help
292                Enabling this option allows the device to run the DHCP server
293                (to dynamically assign IPv4 addresses to clients).
294
295        config LWIP_DHCPS_LEASE_UNIT
296            int "Multiplier for lease time, in seconds"
297            range 1 3600
298            default 60
299            depends on LWIP_DHCPS
300            help
301                The DHCP server is calculating lease time multiplying the sent
302                and received times by this number of seconds per unit.
303                The default is 60, that equals one minute.
304
305        config LWIP_DHCPS_MAX_STATION_NUM
306            int "Maximum number of stations"
307            range 1 64
308            default 8
309            depends on LWIP_DHCPS
310            help
311                The maximum number of DHCP clients that are connected to the server.
312                After this number is exceeded, DHCP server removes of the oldest device
313                from it's address pool, without notification.
314
315    endmenu # DHCPS
316
317    menuconfig LWIP_AUTOIP
318        bool "Enable IPV4 Link-Local Addressing (AUTOIP)"
319        default n
320        help
321            Enabling this option allows the device to self-assign an address
322            in the 169.256/16 range if none is assigned statically or via DHCP.
323
324            See RFC 3927.
325
326    config LWIP_AUTOIP_TRIES
327        int "DHCP Probes before self-assigning IPv4 LL address"
328        range 1 100
329        default 2
330        depends on LWIP_AUTOIP
331        help
332            DHCP client will send this many probes before self-assigning a
333            link local address.
334
335            From LWIP help: "This can be set as low as 1 to get an AutoIP
336            address very quickly, but you should be prepared to handle a
337            changing IP address when DHCP overrides AutoIP." (In the case of
338            ESP-IDF, this means multiple SYSTEM_EVENT_STA_GOT_IP events.)
339
340    config LWIP_AUTOIP_MAX_CONFLICTS
341        int "Max IP conflicts before rate limiting"
342        range 1 100
343        default 9
344        depends on LWIP_AUTOIP
345        help
346            If the AUTOIP functionality detects this many IP conflicts while
347            self-assigning an address, it will go into a rate limited mode.
348
349    config LWIP_AUTOIP_RATE_LIMIT_INTERVAL
350        int "Rate limited interval (seconds)"
351        range 5 120
352        default 20
353        depends on LWIP_AUTOIP
354        help
355            If rate limiting self-assignment requests, wait this long between
356            each request.
357
358    config LWIP_IPV6
359        bool "Enable IPv6"
360        default y
361        help
362            Enable IPv6 function. If not use IPv6 function, set this option to n.
363            If disabling LWIP_IPV6 then some other components (coap and asio) will
364            no longer be available.
365
366    config LWIP_IPV6_AUTOCONFIG
367        bool "Enable IPV6 stateless address autoconfiguration (SLAAC)"
368        depends on LWIP_IPV6
369        default n
370        help
371            Enabling this option allows the devices to IPV6 stateless address autoconfiguration (SLAAC).
372
373            See RFC 4862.
374
375    config LWIP_IPV6_NUM_ADDRESSES
376        int "Number of IPv6 addresses on each network interface"
377        depends on LWIP_IPV6
378        default 3
379        help
380            The maximum number of IPv6 addresses on each interface. Any additional
381            addresses will be discarded.
382
383    config LWIP_IPV6_FORWARD
384        bool "Enable IPv6 forwarding between interfaces"
385        depends on LWIP_IPV6
386        default n
387        help
388            Forwarding IPv6 packets between interfaces is only required when acting as
389            a router.
390
391    config LWIP_IPV6_RDNSS_MAX_DNS_SERVERS
392        int "Use IPv6 Router Advertisement Recursive DNS Server Option"
393        depends on LWIP_IPV6_AUTOCONFIG
394        default 0
395        help
396            Use IPv6 Router Advertisement Recursive DNS Server Option (as per RFC 6106) to
397            copy a defined maximum number of DNS servers to the DNS module.
398            Set this option to a number of desired DNS servers advertised in the RA protocol.
399            This feature is disabled when set to 0.
400
401    config LWIP_IPV6_DHCP6
402        bool "Enable DHCPv6 stateless address autoconfiguration"
403        depends on LWIP_IPV6_AUTOCONFIG
404        default n
405        help
406            Enable DHCPv6 for IPv6 stateless address autoconfiguration.
407            Note that the dhcpv6 client has to be started using dhcp6_enable_stateless(netif);
408            Note that the stateful address autoconfiguration is not supported.
409
410    config LWIP_NETIF_STATUS_CALLBACK
411        bool "Enable status callback for network interfaces"
412        default n
413        help
414            Enable callbacks when the network interface is up/down and addresses are changed.
415
416    menuconfig LWIP_NETIF_LOOPBACK
417        bool "Support per-interface loopback"
418        default y
419        help
420            Enabling this option means that if a packet is sent with a destination
421            address equal to the interface's own IP address, it will "loop back" and
422            be received by this interface.
423
424    config LWIP_LOOPBACK_MAX_PBUFS
425        int "Max queued loopback packets per interface"
426        range 0 16
427        default 8
428        depends on LWIP_NETIF_LOOPBACK
429        help
430            Configure the maximum number of packets which can be queued for
431            loopback on a given interface. Reducing this number may cause packets
432            to be dropped, but will avoid filling memory with queued packet data.
433
434    menu "TCP"
435
436        config LWIP_MAX_ACTIVE_TCP
437            int "Maximum active TCP Connections"
438            range 1 1024
439            default 16
440            help
441                The maximum number of simultaneously active TCP
442                connections. The practical maximum limit is
443                determined by available heap memory at runtime.
444
445                Changing this value by itself does not substantially
446                change the memory usage of LWIP, except for preventing
447                new TCP connections after the limit is reached.
448
449        config LWIP_MAX_LISTENING_TCP
450            int "Maximum listening TCP Connections"
451            range 1 1024
452            default 16
453            help
454                The maximum number of simultaneously listening TCP
455                connections. The practical maximum limit is
456                determined by available heap memory at runtime.
457
458                Changing this value by itself does not substantially
459                change the memory usage of LWIP, except for preventing
460                new listening TCP connections after the limit is reached.
461
462        config LWIP_TCP_HIGH_SPEED_RETRANSMISSION
463            bool "TCP high speed retransmissions"
464            default y
465            help
466                Speed up the TCP retransmission interval. If disabled,
467                it is recommended to change the number of SYN retransmissions to 6,
468                and TCP initial rto time to 3000.
469
470        config LWIP_TCP_MAXRTX
471            int "Maximum number of retransmissions of data segments"
472            default 12
473            range 3 12
474            help
475                Set maximum number of retransmissions of data segments.
476
477        config LWIP_TCP_SYNMAXRTX
478            int "Maximum number of retransmissions of SYN segments"
479            default 6 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
480            default 12 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
481            range 3 12
482            help
483                Set maximum number of retransmissions of SYN segments.
484
485        config LWIP_TCP_MSS
486            int "Maximum Segment Size (MSS)"
487            default 1440
488            range 536 1460
489            help
490                Set maximum segment size for TCP transmission.
491
492                Can be set lower to save RAM, the default value 1460(ipv4)/1440(ipv6) will give best throughput.
493                IPv4 TCP_MSS Range: 576 <= TCP_MSS <= 1460
494                IPv6 TCP_MSS Range: 1220<= TCP_mSS <= 1440
495
496        config LWIP_TCP_TMR_INTERVAL
497            int "TCP timer interval(ms)"
498            default 250
499            help
500                Set TCP timer interval in milliseconds.
501
502                Can be used to speed connections on bad networks.
503                A lower value will redeliver unacked packets faster.
504
505        config LWIP_TCP_MSL
506            int "Maximum segment lifetime (MSL)"
507            default 60000
508            help
509                Set maximum segment lifetime in in milliseconds.
510
511        config LWIP_TCP_SND_BUF_DEFAULT
512            int "Default send buffer size"
513            default 5744  # 4 * default MSS
514            range 2440 65535 if !LWIP_WND_SCALE
515            range 2440 1024000 if LWIP_WND_SCALE
516            help
517                Set default send buffer size for new TCP sockets.
518
519                Per-socket send buffer size can be changed at runtime
520                with lwip_setsockopt(s, TCP_SNDBUF, ...).
521
522                This value must be at least 2x the MSS size, and the default
523                is 4x the default MSS size.
524
525                Setting a smaller default SNDBUF size can save some RAM, but
526                will decrease performance.
527
528        config LWIP_TCP_WND_DEFAULT
529            int "Default receive window size"
530            default 5744 # 4 * default MSS
531            range 2440 65535 if !LWIP_WND_SCALE
532            range 2440 1024000 if LWIP_WND_SCALE
533            help
534                Set default TCP receive window size for new TCP sockets.
535
536                Per-socket receive window size can be changed at runtime
537                with lwip_setsockopt(s, TCP_WINDOW, ...).
538
539                Setting a smaller default receive window size can save some RAM,
540                but will significantly decrease performance.
541
542        config LWIP_TCP_RECVMBOX_SIZE
543            int "Default TCP receive mail box size"
544            default 6
545            range 6 64 if !LWIP_WND_SCALE
546            range 6 1024 if LWIP_WND_SCALE
547            help
548                Set TCP receive mail box size. Generally bigger value means higher throughput
549                but more memory. The recommended value is: LWIP_TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if
550                LWIP_TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box size is
551                (14360/1436 + 2) = 12.
552
553                TCP receive mail box is a per socket mail box, when the application receives packets
554                from TCP socket, LWIP core firstly posts the packets to TCP receive mail box and the
555                application then fetches the packets from mail box. It means LWIP can caches maximum
556                LWIP_TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets
557                for all TCP sockets is LWIP_TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other
558                words, the bigger LWIP_TCP_RECVMBOX_SIZE means more memory.
559                On the other hand, if the receiv mail box is too small, the mail box may be full. If the
560                mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
561                receive mail box is big enough to avoid packet drop between LWIP core and application.
562
563        config LWIP_TCP_QUEUE_OOSEQ
564            bool "Queue incoming out-of-order segments"
565            default y
566            help
567                Queue incoming out-of-order segments for later use.
568
569                Disable this option to save some RAM during TCP sessions, at the expense
570                of increased retransmissions if segments arrive out of order.
571
572        config LWIP_TCP_SACK_OUT
573            bool "Support sending selective acknowledgements"
574            default n
575            help
576                TCP will support sending selective acknowledgements (SACKs).
577
578        config LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES
579            bool "Keep TCP connections when IP changed"
580            default n
581            help
582                This option is enabled when the following scenario happen:
583                network dropped and reconnected, IP changes is like: 192.168.0.2->0.0.0.0->192.168.0.2
584
585                Disable this option to keep consistent with the original LWIP code behavior.
586
587
588        choice LWIP_TCP_OVERSIZE
589            prompt "Pre-allocate transmit PBUF size"
590            default LWIP_TCP_OVERSIZE_MSS
591            help
592                Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time,
593                which can reduce the length of pbuf chains used for transmission.
594
595                This will not make a difference to sockets where Nagle's algorithm
596                is disabled.
597
598                Default value of MSS is fine for most applications, 25% MSS may save
599                some RAM when only transmitting small amounts of data. Disabled will
600                have worst performance and fragmentation characteristics, but uses
601                least RAM overall.
602
603            config LWIP_TCP_OVERSIZE_MSS
604                bool "MSS"
605            config LWIP_TCP_OVERSIZE_QUARTER_MSS
606                bool "25% MSS"
607            config LWIP_TCP_OVERSIZE_DISABLE
608                bool "Disabled"
609
610        endchoice
611
612        config LWIP_WND_SCALE
613            bool "Support TCP window scale"
614            depends on SPIRAM_TRY_ALLOCATE_WIFI_LWIP
615            default n
616            help
617                Enable this feature to support TCP window scaling.
618
619        config LWIP_TCP_RCV_SCALE
620            int "Set TCP receiving window scaling factor"
621            depends on LWIP_WND_SCALE
622            range 0 14
623            default 0
624            help
625                Enable this feature to support TCP window scaling.
626
627        config LWIP_TCP_RTO_TIME
628            int "Default TCP rto time"
629            default 3000 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
630            default 1500 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
631            help
632                Set default TCP rto time for a reasonable initial rto.
633                In bad network environment, recommend set value of rto time to 1500.
634
635    endmenu # TCP
636
637    menu "UDP"
638
639        config LWIP_MAX_UDP_PCBS
640            int "Maximum active UDP control blocks"
641            range 1 1024
642            default 16
643            help
644                The maximum number of active UDP "connections" (ie
645                UDP sockets sending/receiving data).
646                The practical maximum limit is determined by available
647                heap memory at runtime.
648
649        config LWIP_UDP_RECVMBOX_SIZE
650            int "Default UDP receive mail box size"
651            default 6
652            range 6 64
653            help
654                Set UDP receive mail box size. The recommended value is 6.
655
656                UDP receive mail box is a per socket mail box, when the application receives packets
657                from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the
658                application then fetches the packets from mail box. It means LWIP can caches maximum
659                UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets
660                for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other
661                words, the bigger UDP_RECVMBOX_SIZE means more memory.
662                On the other hand, if the receiv mail box is too small, the mail box may be full. If the
663                mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP
664                receive mail box is big enough to avoid packet drop between LWIP core and application.
665
666    endmenu # UDP
667
668    menu "Checksums"
669
670        config LWIP_CHECKSUM_CHECK_IP
671            bool "Enable LWIP IP checksums"
672            default n
673            help
674                Enable checksum checking for received IP messages
675
676        config LWIP_CHECKSUM_CHECK_UDP
677            bool "Enable LWIP UDP checksums"
678            default n
679            help
680                Enable checksum checking for received UDP messages
681
682        config LWIP_CHECKSUM_CHECK_ICMP
683            bool "Enable LWIP ICMP checksums"
684            default y
685            help
686                Enable checksum checking for received ICMP messages
687
688    endmenu # Checksums
689
690    config LWIP_TCPIP_TASK_STACK_SIZE
691        int "TCP/IP Task Stack Size"
692        default 3072
693        # for high log levels, tcpip_adapter API calls can end up
694        # a few calls deep and logging there can trigger a stack overflow
695        range 2048 65536 if LOG_DEFAULT_LEVEL < 4
696        range 2560 65536 if LOG_DEFAULT_LEVEL >= 4
697        help
698            Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
699            Setting this stack too small will result in stack overflow crashes.
700
701    choice LWIP_TCPIP_TASK_AFFINITY
702        prompt "TCP/IP task affinity"
703        default LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
704        help
705            Allows setting LwIP tasks affinity, i.e. whether the task is pinned to
706            CPU0, pinned to CPU1, or allowed to run on any CPU.
707            Currently this applies to "TCP/IP" task and "Ping" task.
708
709        config LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
710            bool "No affinity"
711        config LWIP_TCPIP_TASK_AFFINITY_CPU0
712            bool "CPU0"
713        config LWIP_TCPIP_TASK_AFFINITY_CPU1
714            bool "CPU1"
715            depends on !FREERTOS_UNICORE
716
717    endchoice
718
719    config LWIP_TCPIP_TASK_AFFINITY
720        hex
721        default FREERTOS_NO_AFFINITY if LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
722        default 0x0 if LWIP_TCPIP_TASK_AFFINITY_CPU0
723        default 0x1 if LWIP_TCPIP_TASK_AFFINITY_CPU1
724
725
726    menuconfig LWIP_PPP_SUPPORT
727        bool "Enable PPP support (new/experimental)"
728        default n
729        help
730            Enable PPP stack. Now only PPP over serial is possible.
731
732            PPP over serial support is experimental and unsupported.
733
734    config LWIP_PPP_ENABLE_IPV6
735        bool "Enable IPV6 support for PPP connections (IPV6CP)"
736        depends on LWIP_PPP_SUPPORT && LWIP_IPV6
737        default y
738        help
739            Enable IPV6 support in PPP for the local link between the DTE (processor) and DCE (modem).
740            There are some modems which do not support the IPV6 addressing in the local link.
741            If they are requested for IPV6CP negotiation, they may time out.
742            This would in turn fail the configuration for the whole link.
743            If your modem is not responding correctly to PPP Phase Network, try to disable IPV6 support.
744
745    config LWIP_IPV6_MEMP_NUM_ND6_QUEUE
746        int "Max number of IPv6 packets to queue during MAC resolution"
747        depends on LWIP_IPV6
748        range 3 20
749        default 3
750        help
751            Config max number of IPv6 packets to queue during MAC resolution.
752
753    config LWIP_IPV6_ND6_NUM_NEIGHBORS
754        int "Max number of entries in IPv6 neighbor cache"
755        depends on LWIP_IPV6
756        range 3 10
757        default 5
758        help
759            Config max number of entries in IPv6 neighbor cache
760
761    config LWIP_PPP_NOTIFY_PHASE_SUPPORT
762        bool "Enable Notify Phase Callback"
763        depends on LWIP_PPP_SUPPORT
764        default n
765        help
766            Enable to set a callback which is called on change of the internal PPP state machine.
767
768    config LWIP_PPP_PAP_SUPPORT
769        bool "Enable PAP support"
770        depends on LWIP_PPP_SUPPORT
771        default n
772        help
773            Enable Password Authentication Protocol (PAP) support
774
775    config LWIP_PPP_CHAP_SUPPORT
776        bool "Enable CHAP support"
777        depends on LWIP_PPP_SUPPORT
778        default n
779        help
780            Enable Challenge Handshake Authentication Protocol (CHAP) support
781
782    config LWIP_PPP_MSCHAP_SUPPORT
783        bool "Enable MSCHAP support"
784        depends on LWIP_PPP_SUPPORT
785        default n
786        help
787            Enable Microsoft version of the Challenge-Handshake Authentication Protocol (MSCHAP) support
788
789    config LWIP_PPP_MPPE_SUPPORT
790        bool "Enable MPPE support"
791        depends on LWIP_PPP_SUPPORT
792        default n
793        help
794            Enable Microsoft Point-to-Point Encryption (MPPE) support
795
796    config LWIP_ENABLE_LCP_ECHO
797        bool "Enable LCP ECHO"
798        depends on LWIP_PPP_SUPPORT
799        default n
800        help
801            Enable LCP echo keepalive requests
802
803    config LWIP_LCP_ECHOINTERVAL
804        int "Echo interval (s)"
805        range 0 1000000
806        depends on LWIP_ENABLE_LCP_ECHO
807        default 3
808        help
809            Interval in seconds between keepalive LCP echo requests, 0 to disable.
810
811    config LWIP_LCP_MAXECHOFAILS
812        int "Maximum echo failures"
813        range 0 100000
814        depends on LWIP_ENABLE_LCP_ECHO
815        default 3
816        help
817            Number of consecutive unanswered echo requests before failure is indicated.
818
819    config LWIP_PPP_DEBUG_ON
820        bool "Enable PPP debug log output"
821        depends on LWIP_PPP_SUPPORT
822        default n
823        help
824            Enable PPP debug log output
825
826    menuconfig LWIP_SLIP_SUPPORT
827        bool "Enable SLIP support (new/experimental)"
828        default n
829        help
830            Enable SLIP stack. Now only SLIP over serial is possible.
831
832            SLIP over serial support is experimental and unsupported.
833
834    config LWIP_SLIP_DEBUG_ON
835        bool "Enable SLIP debug log output"
836        depends on LWIP_SLIP_SUPPORT
837        default n
838        help
839            Enable SLIP debug log output
840
841    menu "ICMP"
842
843        config LWIP_ICMP
844            bool "ICMP: Enable ICMP"
845            default y
846            help
847                Enable ICMP module for check network stability
848
849        config LWIP_MULTICAST_PING
850            bool "Respond to multicast pings"
851            default n
852            depends on LWIP_ICMP6 || LWIP_ICMP
853
854        config LWIP_BROADCAST_PING
855            bool "Respond to broadcast pings"
856            default n
857            depends on LWIP_ICMP
858
859    endmenu # ICMP
860
861    menu "LWIP RAW API"
862
863        config LWIP_MAX_RAW_PCBS
864            int "Maximum LWIP RAW PCBs"
865            range 1 1024
866            default 16
867            help
868                The maximum number of simultaneously active LWIP
869                RAW protocol control blocks. The practical maximum
870                limit is determined by available heap memory at runtime.
871
872    endmenu  # LWIP RAW API
873
874    menu "SNTP"
875
876        config LWIP_SNTP_MAX_SERVERS
877            int "Maximum number of NTP servers"
878            default 1
879            range 1 16
880            help
881                Set maximum number of NTP servers used by LwIP SNTP module.
882                First argument of sntp_setserver/sntp_setservername functions
883                is limited to this value.
884
885        config LWIP_DHCP_GET_NTP_SRV
886            bool "Request NTP servers from DHCP"
887            default n
888            help
889                If enabled, LWIP will add 'NTP' to Parameter-Request Option sent via DHCP-request.
890                DHCP server might reply with an NTP server address in option 42.
891                SNTP callback for such replies should be set accordingly (see sntp_servermode_dhcp() func.)
892
893        config LWIP_DHCP_MAX_NTP_SERVERS
894            int "Maximum number of NTP servers aquired via DHCP"
895            default 1
896            range 1 16
897            depends on LWIP_DHCP_GET_NTP_SRV
898            help
899                Set maximum number of NTP servers aquired via DHCP-offer.
900                Should be less or equal to "Maximum number of NTP servers", any extra servers would be just ignored.
901
902        config LWIP_SNTP_UPDATE_DELAY
903            int "Request interval to update time (ms)"
904            range 15000 4294967295
905            default 3600000
906            help
907                This option allows you to set the time update period via SNTP.
908                Default is 1 hour. Must not be below 15 seconds by specification.
909                (SNTPv4 RFC 4330 enforces a minimum update time of 15 seconds).
910
911    endmenu # SNTP
912
913    config LWIP_ESP_LWIP_ASSERT
914        bool "Enable LWIP ASSERT checks"
915        default y
916        depends on !COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE
917        help
918            Enable this option keeps LWIP assertion checks enabled.
919            It is recommended to keep this option enabled.
920
921            If asserts are disabled for the entire project, they are also disabled
922            for LWIP and this option is ignored.
923
924    menu "Hooks"
925
926        choice LWIP_HOOK_TCP_ISN
927            prompt "TCP ISN Hook"
928            default LWIP_HOOK_TCP_ISN_DEFAULT
929            help
930                Enables to define a TCP ISN hook to randomize initial sequence
931                number in TCP connection.
932                The default TCP ISN algorithm used in IDF (standardized in RFC 6528)
933                produces ISN by combining an MD5 of the new TCP id and a stable
934                secret with the current time.
935                This is because the lwIP implementation (`tcp_next_iss`) is not
936                very strong, as it does not take into consideration any platform
937                specific entropy source.
938
939                Set to LWIP_HOOK_TCP_ISN_CUSTOM to provide custom implementation.
940                Set to LWIP_HOOK_TCP_ISN_NONE to use lwIP implementation.
941
942
943            config LWIP_HOOK_TCP_ISN_NONE
944                bool "No hook declared"
945            config LWIP_HOOK_TCP_ISN_DEFAULT
946                bool "Default implementation"
947            config LWIP_HOOK_TCP_ISN_CUSTOM
948                bool "Custom implementation"
949
950        endchoice
951
952        choice LWIP_HOOK_IP6_ROUTE
953            prompt "IPv6 route Hook"
954            depends on LWIP_IPV6
955            default LWIP_HOOK_IP6_ROUTE_NONE
956            help
957                Enables custom IPv6 route hook.
958                Setting this to "default" provides weak implementation
959                stub that could be overwritten in application code.
960                Setting this to "custom" provides hook's declaration
961                only and expects the application to implement it.
962
963            config LWIP_HOOK_IP6_ROUTE_NONE
964                bool "No hook declared"
965            config LWIP_HOOK_IP6_ROUTE_DEFAULT
966                bool "Default (weak) implementation"
967            config LWIP_HOOK_IP6_ROUTE_CUSTOM
968                bool "Custom implementation"
969
970        endchoice
971
972        choice LWIP_HOOK_ND6_GET_GW
973            prompt "IPv6 get gateway Hook"
974            depends on LWIP_IPV6
975            default LWIP_HOOK_ND6_GET_GW_NONE
976            help
977                Enables custom IPv6 route hook.
978                Setting this to "default" provides weak implementation
979                stub that could be overwritten in application code.
980                Setting this to "custom" provides hook's declaration
981                only and expects the application to implement it.
982
983            config LWIP_HOOK_ND6_GET_GW_NONE
984                bool "No hook declared"
985            config LWIP_HOOK_ND6_GET_GW_DEFAULT
986                bool "Default (weak) implementation"
987            config LWIP_HOOK_ND6_GET_GW_CUSTOM
988                bool "Custom implementation"
989
990        endchoice
991
992        choice LWIP_HOOK_NETCONN_EXTERNAL_RESOLVE
993            prompt "Netconn external resolve Hook"
994            default LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE
995            help
996                Enables custom DNS resolve hook.
997                Setting this to "default" provides weak implementation
998                stub that could be overwritten in application code.
999                Setting this to "custom" provides hook's declaration
1000                only and expects the application to implement it.
1001
1002            config LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE
1003                bool "No hook declared"
1004            config LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT
1005                bool "Default (weak) implementation"
1006            config LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM
1007                bool "Custom implementation"
1008
1009        endchoice
1010
1011    endmenu # Hooks
1012
1013    menuconfig LWIP_DEBUG
1014        bool "Enable LWIP Debug"
1015        default n
1016        help
1017            Enabling this option allows different kinds of lwIP debug output.
1018
1019            All lwIP debug features increase the size of the final binary.
1020
1021    config LWIP_NETIF_DEBUG
1022        bool "Enable netif debug messages"
1023        depends on LWIP_DEBUG
1024        default n
1025
1026    config LWIP_PBUF_DEBUG
1027        bool "Enable pbuf debug messages"
1028        depends on LWIP_DEBUG
1029        default n
1030
1031    config LWIP_ETHARP_DEBUG
1032        bool "Enable etharp debug messages"
1033        depends on LWIP_DEBUG
1034        default n
1035
1036    config LWIP_API_LIB_DEBUG
1037        bool "Enable api lib debug messages"
1038        depends on LWIP_DEBUG
1039        default n
1040
1041    config LWIP_SOCKETS_DEBUG
1042        bool "Enable socket debug messages"
1043        depends on LWIP_DEBUG
1044        default n
1045
1046    config LWIP_IP_DEBUG
1047        bool "Enable IP debug messages"
1048        depends on LWIP_DEBUG
1049        default n
1050
1051    config LWIP_ICMP_DEBUG
1052        bool "Enable ICMP debug messages"
1053        depends on LWIP_DEBUG && LWIP_ICMP
1054        default n
1055
1056    config LWIP_DHCP_STATE_DEBUG
1057        bool "Enable DHCP state tracking"
1058        depends on LWIP_DEBUG
1059        default n
1060
1061    config LWIP_DHCP_DEBUG
1062        bool "Enable DHCP debug messages"
1063        depends on LWIP_DEBUG
1064        default n
1065
1066    config LWIP_IP6_DEBUG
1067        bool "Enable IP6 debug messages"
1068        depends on LWIP_DEBUG
1069        default n
1070
1071    config LWIP_ICMP6_DEBUG
1072        bool "Enable ICMP6 debug messages"
1073        depends on LWIP_DEBUG
1074        default n
1075
1076    config LWIP_TCP_DEBUG
1077        bool "Enable TCP debug messages"
1078        depends on LWIP_DEBUG
1079        default n
1080
1081    config LWIP_SNTP_DEBUG
1082        bool "Enable SNTP debug messages"
1083        depends on LWIP_DEBUG
1084        default n
1085
1086endmenu
1087