-
Notifications
You must be signed in to change notification settings - Fork 7.3k
/
Kconfig
1515 lines (1277 loc) · 58.4 KB
/
Kconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
menu "LWIP"
config LWIP_ENABLE
bool "Enable LwIP stack"
default y if !IDF_TARGET_LINUX
default n if IDF_TARGET_LINUX
help
Builds normally if selected. Excludes LwIP from build if unselected, even if it is a
dependency of a component or application.
Some applications can switch their IP stacks, e.g., when switching between chip
and Linux targets (LwIP stack vs. Linux IP stack). Since the LwIP dependency cannot
easily be excluded based on a Kconfig option, it has to be a dependency in all cases.
This switch allows the LwIP stack to be built selectively, even if it is a dependency.
config LWIP_LOCAL_HOSTNAME
string "Local netif hostname"
default 'espressif'
help
The default name this device will report to other devices on the network.
Could be updated at runtime with esp_netif_set_hostname()
config LWIP_NETIF_API
bool "Enable usage of standard POSIX APIs in LWIP"
default n
help
If this feature is enabled, standard POSIX APIs: if_indextoname(), if_nametoindex()
could be used to convert network interface index to name
instead of IDF specific esp-netif APIs (such as esp_netif_get_netif_impl_name())
config LWIP_TCPIP_TASK_PRIO
int "LWIP TCP/IP Task Priority"
default 18
range 1 24
help
LWIP tcpip task priority. In case of high throughput, this parameter
could be changed up to (configMAX_PRIORITIES-1).
config LWIP_TCPIP_CORE_LOCKING
bool "Enable tcpip core locking"
default n
help
If Enable tcpip core locking,Creates a global mutex that is held
during TCPIP thread operations.Can be locked by client code to perform
lwIP operations without changing into TCPIP thread using callbacks.
See LOCK_TCPIP_CORE() and UNLOCK_TCPIP_CORE().
If disable tcpip core locking,TCP IP will perform tasks through context switching
config LWIP_TCPIP_CORE_LOCKING_INPUT
bool "Enable tcpip core locking input"
depends on LWIP_TCPIP_CORE_LOCKING
default n
help
when LWIP_TCPIP_CORE_LOCKING is enabled, this lets tcpip_input() grab the
mutex for input packets as well, instead of allocating a message and passing
it to tcpip_thread.
config LWIP_CHECK_THREAD_SAFETY
bool "Checks that lwip API runs in expected context"
default n
help
Enable to check that the project does not violate lwip thread safety.
If enabled, all lwip functions that require thread awareness run an assertion
to verify that the TCP/IP core functionality is either locked or accessed
from the correct thread.
config LWIP_DNS_SUPPORT_MDNS_QUERIES
bool "Enable mDNS queries in resolving host name"
default y
help
If this feature is enabled, standard API such as gethostbyname
support .local addresses by sending one shot multicast mDNS
query
config LWIP_L2_TO_L3_COPY
bool "Enable copy between Layer2 and Layer3 packets"
default n
help
If this feature is enabled, all traffic from layer2(WIFI Driver) will be
copied to a new buffer before sending it to layer3(LWIP stack), freeing
the layer2 buffer.
Please be notified that the total layer2 receiving buffer is fixed and
ESP32 currently supports 25 layer2 receiving buffer, when layer2 buffer
runs out of memory, then the incoming packets will be dropped in hardware.
The layer3 buffer is allocated from the heap, so the total layer3 receiving
buffer depends on the available heap size, when heap runs out of memory,
no copy will be sent to layer3 and packet will be dropped in layer2.
Please make sure you fully understand the impact of this feature before
enabling it.
config LWIP_IRAM_OPTIMIZATION
bool "Enable LWIP IRAM optimization"
default n
help
If this feature is enabled, some functions relating to RX/TX in LWIP will be
put into IRAM, it can improve UDP/TCP throughput by >10% for single core mode,
it doesn't help too much for dual core mode. On the other hand, it needs about
10KB IRAM for these optimizations.
If this feature is disabled, all lwip functions will be put into FLASH.
config LWIP_EXTRA_IRAM_OPTIMIZATION
bool "Enable LWIP IRAM optimization for TCP part"
default n
help
If this feature is enabled, some tcp part functions relating to RX/TX in LWIP will be
put into IRAM, it can improve TCP throughput. On the other hand, it needs about 17KB
IRAM for these optimizations.
config LWIP_TIMERS_ONDEMAND
bool "Enable LWIP Timers on demand"
default y
help
If this feature is enabled, IGMP and MLD6 timers will be activated only
when joining groups or receiving QUERY packets.
This feature will reduce the power consumption for applications which do not
use IGMP and MLD6.
config LWIP_ND6
bool "LWIP NDP6 Enable/Disable"
default y
depends on LWIP_IPV6
help
This option is used to disable the Network Discovery Protocol (NDP) if it is not required.
Please use this option with caution, as the NDP is essential for IPv6 functionality within a local network.
config LWIP_FORCE_ROUTER_FORWARDING
bool "LWIP Force Router Forwarding Enable/Disable"
default n
depends on LWIP_ND6
help
This option is used to set the the router flag for the NA packets.
When enabled, the router flag in NA packet will always set to 1,
otherwise, never set router flag for NA packets.
config LWIP_MAX_SOCKETS
int "Max number of open sockets"
range 1 253
default 10
help
The practical maximum limit is
determined by available heap memory at runtime.
Sockets take up a certain amount of memory, and allowing fewer
sockets to be open at the same time conserves memory. Specify
the maximum amount of sockets here. The valid value is from 1
to 253. If using value above 61, update CMakeLists defining
FD_SETSIZE to the number of sockets used plus the
expected open files (minimum of +3 for stdout, stderr and stdin).
config LWIP_USE_ONLY_LWIP_SELECT
bool "Support LWIP socket select() only (DEPRECATED)"
default n
help
This option is deprecated. Do not use this option, use VFS_SUPPORT_SELECT instead.
config LWIP_SO_LINGER
bool "Enable SO_LINGER processing"
default n
help
Enabling this option allows SO_LINGER processing.
l_onoff = 1,l_linger can set the timeout.
If l_linger=0, When a connection is closed, TCP will terminate the connection.
This means that TCP will discard any data packets stored in the socket send buffer
and send an RST to the peer.
If l_linger!=0,Then closesocket() calls to block the process until
the remaining data packets has been sent or timed out.
config LWIP_SO_REUSE
bool "Enable SO_REUSEADDR option"
default y
help
Enabling this option allows binding to a port which remains in
TIME_WAIT.
config LWIP_SO_REUSE_RXTOALL
bool "SO_REUSEADDR copies broadcast/multicast to all matches"
depends on LWIP_SO_REUSE
default y
help
Enabling this option means that any incoming broadcast or multicast
packet will be copied to all of the local sockets that it matches
(may be more than one if SO_REUSEADDR is set on the socket.)
This increases memory overhead as the packets need to be copied,
however they are only copied per matching socket. You can safely
disable it if you don't plan to receive broadcast or multicast
traffic on more than one socket at a time.
config LWIP_SO_RCVBUF
bool "Enable SO_RCVBUF option"
default n
help
Enabling this option allows checking for available data on a netconn.
config LWIP_NETBUF_RECVINFO
bool "Enable IP_PKTINFO option"
default n
help
Enabling this option allows checking for the destination address
of a received IPv4 Packet.
config LWIP_IP_DEFAULT_TTL
int "The value for Time-To-Live used by transport layers"
range 1 255
default 64
help
Set value for Time-To-Live used by transport layers.
config LWIP_IP4_FRAG
bool "Enable fragment outgoing IP4 packets"
default y
depends on LWIP_IPV4
help
Enabling this option allows fragmenting outgoing IP4 packets if their size
exceeds MTU.
config LWIP_IP6_FRAG
bool "Enable fragment outgoing IP6 packets"
default y
depends on LWIP_IPV6
help
Enabling this option allows fragmenting outgoing IP6 packets if their size
exceeds MTU.
config LWIP_IP4_REASSEMBLY
bool "Enable reassembly incoming fragmented IP4 packets"
default n
depends on LWIP_IPV4
help
Enabling this option allows reassemblying incoming fragmented IP4 packets.
config LWIP_IP6_REASSEMBLY
bool "Enable reassembly incoming fragmented IP6 packets"
default n
depends on LWIP_IPV6
help
Enabling this option allows reassemblying incoming fragmented IP6 packets.
config LWIP_IP_REASS_MAX_PBUFS
int "The maximum amount of pbufs waiting to be reassembled"
range 10 100
default 10
help
Set the maximum amount of pbufs waiting to be reassembled.
config LWIP_IP_FORWARD
bool "Enable IP forwarding"
default n
help
Enabling this option allows packets forwarding across multiple interfaces.
config LWIP_IPV4_NAPT
bool "Enable NAT"
depends on LWIP_IP_FORWARD
default n
help
Enabling this option allows Network Address and Port Translation.
config LWIP_IPV4_NAPT_PORTMAP
bool "Enable NAT Port Mapping"
depends on LWIP_IPV4_NAPT
default y
help
Enabling this option allows Port Forwarding or Port mapping.
config LWIP_STATS
bool "Enable LWIP statistics"
default n
help
Enabling this option allows LWIP statistics
config LWIP_ESP_GRATUITOUS_ARP
bool "Send gratuitous ARP periodically"
default y
depends on LWIP_IPV4
help
Enable this option allows to send gratuitous ARP periodically.
This option solve the compatibility issues.If the ARP table of the AP is old, and the AP
doesn't send ARP request to update it's ARP table, this will lead to the STA sending IP packet fail.
Thus we send gratuitous ARP periodically to let AP update it's ARP table.
config LWIP_GARP_TMR_INTERVAL
int "GARP timer interval(seconds)"
default 60
depends on LWIP_ESP_GRATUITOUS_ARP
help
Set the timer interval for gratuitous ARP. The default value is 60s
config LWIP_ESP_MLDV6_REPORT
bool "Send mldv6 report periodically"
depends on LWIP_IPV6
default y
help
Enable this option allows to send mldv6 report periodically.
This option solve the issue that failed to receive multicast data.
Some routers fail to forward multicast packets.
To solve this problem, send multicast mdlv6 report to routers regularly.
config LWIP_MLDV6_TMR_INTERVAL
int "mldv6 report timer interval(seconds)"
default 40
depends on LWIP_ESP_MLDV6_REPORT
help
Set the timer interval for mldv6 report. The default value is 30s
config LWIP_TCPIP_RECVMBOX_SIZE
int "TCPIP task receive mail box size"
default 32
range 6 64 if !LWIP_WND_SCALE
range 6 1024 if LWIP_WND_SCALE
help
Set TCPIP task receive mail box size. Generally bigger value means higher throughput
but more memory. The value should be bigger than UDP/TCP mail box size.
choice LWIP_DHCP_CHECKS_OFFERED_ADDRESS
prompt "Choose how DHCP validates offered IP"
default LWIP_DHCP_DOES_ARP_CHECK
depends on LWIP_IPV4
help
Choose the preferred way of DHCP client to check if the offered address
is available:
* Using Address Conflict Detection (ACD) module assures that the offered IP address
is properly probed and announced before binding in DHCP. This conforms to RFC5227,
but takes several seconds.
* Using ARP check, we only send two ARP requests to check for replies. This process
lasts 1 - 2 seconds.
* No conflict detection: We directly bind the offered address.
config LWIP_DHCP_DOES_ARP_CHECK
bool "DHCP provides simple ARP check"
depends on !LWIP_AUTOIP
config LWIP_DHCP_DOES_ACD_CHECK
bool "DHCP provides Address Conflict Detection (ACD)"
config LWIP_DHCP_DOES_NOT_CHECK_OFFERED_IP
bool "DHCP does not detect conflict on the offered IP"
endchoice
config LWIP_DHCP_DISABLE_CLIENT_ID
bool "DHCP: Disable Use of HW address as client identification"
default n
depends on LWIP_IPV4
help
This option could be used to disable DHCP client identification with its MAC address.
(Client id is used by DHCP servers to uniquely identify clients and are included
in the DHCP packets as an option 61)
Set this option to "y" in order to exclude option 61 from DHCP packets.
config LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
bool "DHCP: Disable Use of vendor class identification"
default y
depends on LWIP_IPV4
help
This option could be used to disable DHCP client vendor class identification.
Set this option to "y" in order to exclude option 60 from DHCP packets.
config LWIP_DHCP_RESTORE_LAST_IP
bool "DHCP: Restore last IP obtained from DHCP server"
default n
depends on LWIP_IPV4
help
When this option is enabled, DHCP client tries to re-obtain last valid IP address obtained from DHCP
server. Last valid DHCP configuration is stored in nvs and restored after reset/power-up. If IP is still
available, there is no need for sending discovery message to DHCP server and save some time.
config LWIP_DHCP_OPTIONS_LEN
int "DHCP total option length"
default 68 if LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
default 108 if !LWIP_DHCP_DISABLE_VENDOR_CLASS_ID
range 68 255
depends on LWIP_IPV4
help
Set total length of outgoing DHCP option msg. Generally bigger value means it can carry more
options and values. If your code meets LWIP_ASSERT due to option value is too long.
Please increase the LWIP_DHCP_OPTIONS_LEN value.
config LWIP_NUM_NETIF_CLIENT_DATA
int "Number of clients store data in netif"
default 0
range 0 256
help
Number of clients that may store data in client_data member array of struct netif.
config LWIP_DHCP_COARSE_TIMER_SECS
int "DHCP coarse timer interval(s)"
default 1
range 1 10
help
Set DHCP coarse interval in seconds.
A higher value will be less precise but cost less power consumption.
menu "DHCP server"
config LWIP_DHCPS
bool "DHCPS: Enable IPv4 Dynamic Host Configuration Protocol Server (DHCPS)"
default y
depends on LWIP_IPV4
help
Enabling this option allows the device to run the DHCP server
(to dynamically assign IPv4 addresses to clients).
config LWIP_DHCPS_LEASE_UNIT
int "Multiplier for lease time, in seconds"
range 1 3600
default 60
depends on LWIP_DHCPS
help
The DHCP server is calculating lease time multiplying the sent
and received times by this number of seconds per unit.
The default is 60, that equals one minute.
config LWIP_DHCPS_MAX_STATION_NUM
int "Maximum number of stations"
range 1 64
default 8
depends on LWIP_DHCPS
help
The maximum number of DHCP clients that are connected to the server.
After this number is exceeded, DHCP server removes of the oldest device
from it's address pool, without notification.
config LWIP_DHCPS_STATIC_ENTRIES
bool "Enable ARP static entries"
default y
depends on LWIP_DHCPS
help
Enabling this option allows DHCP server to support temporary static ARP entries
for DHCP Client. This will help the DHCP server to send the DHCP OFFER and DHCP ACK using IP unicast.
config LWIP_DHCPS_ADD_DNS
bool "Always add DNS option in DHCP responses"
default y
depends on LWIP_DHCPS
help
This allows the DNS option to be optional in the DHCP offers,
depending on the server's runtime configuration.
When enabled, the DHCP server will always add the DNS option to DHCP responses.
If a DNS server is not explicitly configured, the server's IP address will be used
as the fallback for the DNS option.
When disabled, the DHCP server will only include the DNS option in responses
if a DNS server has been explicitly configured.
This option will be removed in IDF v6.x
endmenu # DHCPS
menuconfig LWIP_AUTOIP
bool "Enable IPV4 Link-Local Addressing (AUTOIP)"
default n
depends on LWIP_IPV4
help
Enabling this option allows the device to self-assign an address
in the 169.256/16 range if none is assigned statically or via DHCP.
See RFC 3927.
config LWIP_AUTOIP_TRIES
int "DHCP Probes before self-assigning IPv4 LL address"
range 1 100
default 2
depends on LWIP_AUTOIP
help
DHCP client will send this many probes before self-assigning a
link local address.
From LWIP help: "This can be set as low as 1 to get an AutoIP
address very quickly, but you should be prepared to handle a
changing IP address when DHCP overrides AutoIP." (In the case of
ESP-IDF, this means multiple SYSTEM_EVENT_STA_GOT_IP events.)
config LWIP_AUTOIP_MAX_CONFLICTS
int "Max IP conflicts before rate limiting"
range 1 100
default 9
depends on LWIP_AUTOIP
help
If the AUTOIP functionality detects this many IP conflicts while
self-assigning an address, it will go into a rate limited mode.
config LWIP_AUTOIP_RATE_LIMIT_INTERVAL
int "Rate limited interval (seconds)"
range 5 120
default 20
depends on LWIP_AUTOIP
help
If rate limiting self-assignment requests, wait this long between
each request.
config LWIP_IPV4
bool "Enable IPv4"
default y
help
Enable IPv4 stack. If you want to use IPv6 only TCP/IP stack, disable this.
config LWIP_IPV6
bool "Enable IPv6"
default y
help
Enable IPv6 function. If not use IPv6 function, set this option to n.
If disabling LWIP_IPV6 then some other components (asio) will
no longer be available.
config LWIP_IPV6_AUTOCONFIG
bool "Enable IPV6 stateless address autoconfiguration (SLAAC)"
depends on LWIP_IPV6
default n
help
Enabling this option allows the devices to IPV6 stateless address autoconfiguration (SLAAC).
See RFC 4862.
config LWIP_IPV6_NUM_ADDRESSES
int "Number of IPv6 addresses on each network interface"
depends on LWIP_IPV6
default 3
help
The maximum number of IPv6 addresses on each interface. Any additional
addresses will be discarded.
config LWIP_IPV6_FORWARD
bool "Enable IPv6 forwarding between interfaces"
depends on LWIP_IPV6
default n
help
Forwarding IPv6 packets between interfaces is only required when acting as
a router.
config LWIP_IPV6_RDNSS_MAX_DNS_SERVERS
int "Use IPv6 Router Advertisement Recursive DNS Server Option"
depends on LWIP_IPV6_AUTOCONFIG
default 0
help
Use IPv6 Router Advertisement Recursive DNS Server Option (as per RFC 6106) to
copy a defined maximum number of DNS servers to the DNS module.
Set this option to a number of desired DNS servers advertised in the RA protocol.
This feature is disabled when set to 0.
config LWIP_IPV6_DHCP6
bool "Enable DHCPv6 stateless address autoconfiguration"
depends on LWIP_IPV6_AUTOCONFIG
default n
help
Enable DHCPv6 for IPv6 stateless address autoconfiguration.
Note that the dhcpv6 client has to be started using dhcp6_enable_stateless(netif);
Note that the stateful address autoconfiguration is not supported.
config LWIP_NETIF_STATUS_CALLBACK
bool "Enable status callback for network interfaces"
default n
help
Enable callbacks when the network interface is up/down and addresses are changed.
menuconfig LWIP_NETIF_LOOPBACK
bool "Support per-interface loopback"
default y
help
Enabling this option means that if a packet is sent with a destination
address equal to the interface's own IP address, it will "loop back" and
be received by this interface.
Disabling this option disables support of loopback interface in lwIP
config LWIP_LOOPBACK_MAX_PBUFS
int "Max queued loopback packets per interface"
range 0 16
default 8
depends on LWIP_NETIF_LOOPBACK
help
Configure the maximum number of packets which can be queued for
loopback on a given interface. Reducing this number may cause packets
to be dropped, but will avoid filling memory with queued packet data.
menu "TCP"
config LWIP_MAX_ACTIVE_TCP
int "Maximum active TCP Connections"
range 1 1024
default 16
help
The maximum number of simultaneously active TCP
connections. The practical maximum limit is
determined by available heap memory at runtime.
Changing this value by itself does not substantially
change the memory usage of LWIP, except for preventing
new TCP connections after the limit is reached.
config LWIP_MAX_LISTENING_TCP
int "Maximum listening TCP Connections"
range 1 1024
default 16
help
The maximum number of simultaneously listening TCP
connections. The practical maximum limit is
determined by available heap memory at runtime.
Changing this value by itself does not substantially
change the memory usage of LWIP, except for preventing
new listening TCP connections after the limit is reached.
config LWIP_TCP_HIGH_SPEED_RETRANSMISSION
bool "TCP high speed retransmissions"
default y
help
Speed up the TCP retransmission interval. If disabled,
it is recommended to change the number of SYN retransmissions to 6,
and TCP initial rto time to 3000.
config LWIP_TCP_MAXRTX
int "Maximum number of retransmissions of data segments"
default 12
range 3 12
help
Set maximum number of retransmissions of data segments.
config LWIP_TCP_SYNMAXRTX
int "Maximum number of retransmissions of SYN segments"
default 6 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
default 12 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
range 3 12
help
Set maximum number of retransmissions of SYN segments.
config LWIP_TCP_MSS
int "Maximum Segment Size (MSS)"
default 1440
range 536 1460
help
Set maximum segment size for TCP transmission.
Can be set lower to save RAM, the default value 1460(ipv4)/1440(ipv6) will give best throughput.
IPv4 TCP_MSS Range: 576 <= TCP_MSS <= 1460
IPv6 TCP_MSS Range: 1220<= TCP_MSS <= 1440
config LWIP_TCP_TMR_INTERVAL
int "TCP timer interval(ms)"
default 250
help
Set TCP timer interval in milliseconds.
Can be used to speed connections on bad networks.
A lower value will redeliver unacked packets faster.
config LWIP_TCP_MSL
int "Maximum segment lifetime (MSL)"
default 60000
help
Set maximum segment lifetime in milliseconds.
config LWIP_TCP_FIN_WAIT_TIMEOUT
int "Maximum FIN segment lifetime"
default 20000
help
Set maximum segment lifetime in milliseconds.
config LWIP_TCP_SND_BUF_DEFAULT
int "Default send buffer size"
default 5760 # 4 * default MSS
range 2440 65535 if !LWIP_WND_SCALE
range 2440 1024000 if LWIP_WND_SCALE
help
Set default send buffer size for new TCP sockets.
Per-socket send buffer size can be changed at runtime
with lwip_setsockopt(s, TCP_SNDBUF, ...).
This value must be at least 2x the MSS size, and the default
is 4x the default MSS size.
Setting a smaller default SNDBUF size can save some RAM, but
will decrease performance.
config LWIP_TCP_WND_DEFAULT
int "Default receive window size"
default 5760 # 4 * default MSS
range 2440 65535 if !LWIP_WND_SCALE
range 2440 1024000 if LWIP_WND_SCALE
help
Set default TCP receive window size for new TCP sockets.
Per-socket receive window size can be changed at runtime
with lwip_setsockopt(s, TCP_WINDOW, ...).
Setting a smaller default receive window size can save some RAM,
but will significantly decrease performance.
config LWIP_TCP_RECVMBOX_SIZE
int "Default TCP receive mail box size"
default 6
range 6 64 if !LWIP_WND_SCALE
range 6 1024 if LWIP_WND_SCALE
help
Set TCP receive mail box size. Generally bigger value means higher throughput
but more memory. The recommended value is: LWIP_TCP_WND_DEFAULT/TCP_MSS + 2, e.g. if
LWIP_TCP_WND_DEFAULT=14360, TCP_MSS=1436, then the recommended receive mail box size is
(14360/1436 + 2) = 12.
TCP receive mail box is a per socket mail box, when the application receives packets
from TCP socket, LWIP core firstly posts the packets to TCP receive mail box and the
application then fetches the packets from mail box. It means LWIP can caches maximum
LWIP_TCP_RECCVMBOX_SIZE packets for each TCP socket, so the maximum possible cached TCP packets
for all TCP sockets is LWIP_TCP_RECCVMBOX_SIZE multiples the maximum TCP socket number. In other
words, the bigger LWIP_TCP_RECVMBOX_SIZE means more memory.
On the other hand, if the receive mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the TCP
receive mail box is big enough to avoid packet drop between LWIP core and application.
config LWIP_TCP_ACCEPTMBOX_SIZE
int "Default TCP accept mail box size"
default 6
range 1 64 if !LWIP_WND_SCALE
range 1 255 if LWIP_WND_SCALE
help
Set TCP accept mail box size. Generally bigger value means supporting larger backlogs
but more memory. The recommended value is 6, but applications can set it to a lower value
if listening servers are meant to have a smaller backlog.
TCP accept mail box is a per socket mail box, when the application listens for connections
with a given listening TCP socket. If the mailbox is full, LWIP will send a RST packet and
the client will fail to connect.
config LWIP_TCP_QUEUE_OOSEQ
bool "Queue incoming out-of-order segments"
default y
help
Queue incoming out-of-order segments for later use.
Disable this option to save some RAM during TCP sessions, at the expense
of increased retransmissions if segments arrive out of order.
config LWIP_TCP_OOSEQ_TIMEOUT
int "Timeout for each pbuf queued in TCP OOSEQ, in RTOs."
depends on LWIP_TCP_QUEUE_OOSEQ
range 1 30
default 6
help
The timeout value is TCP_OOSEQ_TIMEOUT * RTO.
config LWIP_TCP_OOSEQ_MAX_PBUFS
int "The maximum number of pbufs queued on OOSEQ per pcb"
depends on LWIP_TCP_QUEUE_OOSEQ
range 0 12
default 4 if !(SPIRAM_TRY_ALLOCATE_WIFI_LWIP && !SPIRAM_IGNORE_NOTFOUND)
default 0 if (SPIRAM_TRY_ALLOCATE_WIFI_LWIP && !SPIRAM_IGNORE_NOTFOUND)
help
If LWIP_TCP_OOSEQ_MAX_PBUFS = 0, TCP will not control the number of OOSEQ pbufs.
In a poor network environment, many out-of-order tcp pbufs will be received.
These out-of-order pbufs will be cached in the TCP out-of-order queue which will
cause Wi-Fi/Ethernet fail to release RX buffer in time.
It is possible that all RX buffers for MAC layer are used by OOSEQ.
Control the number of out-of-order pbufs to ensure
that the MAC layer has enough RX buffer to receive packets.
In the Wi-Fi scenario, recommended OOSEQ PBUFS Range:
0 <= TCP_OOSEQ_MAX_PBUFS <= CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM/(MAX_TCP_NUMBER + 1)
In the Ethernet scenario,recommended Ethernet OOSEQ PBUFS Range:
0 <= TCP_OOSEQ_MAX_PBUFS <= CONFIG_ETH_DMA_RX_BUFFER_NUM/(MAX_TCP_NUMBER + 1)
Within the recommended value range, the larger the value, the better the performance.
MAX_TCP_NUMBER represent Maximum number of TCP connections in Wi-Fi(STA+SoftAP) and Ethernet scenario.
config LWIP_TCP_SACK_OUT
bool "Support sending selective acknowledgements"
default n
depends on LWIP_TCP_QUEUE_OOSEQ
help
TCP will support sending selective acknowledgements (SACKs).
choice LWIP_TCP_OVERSIZE
prompt "Pre-allocate transmit PBUF size"
default LWIP_TCP_OVERSIZE_MSS
help
Allows enabling "oversize" allocation of TCP transmission pbufs ahead of time,
which can reduce the length of pbuf chains used for transmission.
This will not make a difference to sockets where Nagle's algorithm
is disabled.
Default value of MSS is fine for most applications, 25% MSS may save
some RAM when only transmitting small amounts of data. Disabled will
have worst performance and fragmentation characteristics, but uses
least RAM overall.
config LWIP_TCP_OVERSIZE_MSS
bool "MSS"
config LWIP_TCP_OVERSIZE_QUARTER_MSS
bool "25% MSS"
config LWIP_TCP_OVERSIZE_DISABLE
bool "Disabled"
endchoice
config LWIP_WND_SCALE
bool "Support TCP window scale"
depends on (SPIRAM_TRY_ALLOCATE_WIFI_LWIP && !SPIRAM_IGNORE_NOTFOUND)
default n
help
Enable this feature to support TCP window scaling.
config LWIP_TCP_RCV_SCALE
int "Set TCP receiving window scaling factor"
depends on LWIP_WND_SCALE
range 0 14
default 0
help
Enable this feature to support TCP window scaling.
config LWIP_TCP_RTO_TIME
int "Default TCP rto time"
default 3000 if !LWIP_TCP_HIGH_SPEED_RETRANSMISSION
default 1500 if LWIP_TCP_HIGH_SPEED_RETRANSMISSION
help
Set default TCP rto time for a reasonable initial rto.
In bad network environment, recommend set value of rto time to 1500.
endmenu # TCP
menu "UDP"
config LWIP_MAX_UDP_PCBS
int "Maximum active UDP control blocks"
range 1 1024
default 16
help
The maximum number of active UDP "connections" (ie
UDP sockets sending/receiving data).
The practical maximum limit is determined by available
heap memory at runtime.
config LWIP_UDP_RECVMBOX_SIZE
int "Default UDP receive mail box size"
default 6
range 6 64
help
Set UDP receive mail box size. The recommended value is 6.
UDP receive mail box is a per socket mail box, when the application receives packets
from UDP socket, LWIP core firstly posts the packets to UDP receive mail box and the
application then fetches the packets from mail box. It means LWIP can caches maximum
UDP_RECCVMBOX_SIZE packets for each UDP socket, so the maximum possible cached UDP packets
for all UDP sockets is UDP_RECCVMBOX_SIZE multiples the maximum UDP socket number. In other
words, the bigger UDP_RECVMBOX_SIZE means more memory.
On the other hand, if the receive mail box is too small, the mail box may be full. If the
mail box is full, the LWIP drops the packets. So generally we need to make sure the UDP
receive mail box is big enough to avoid packet drop between LWIP core and application.
endmenu # UDP
menu "Checksums"
config LWIP_CHECKSUM_CHECK_IP
bool "Enable LWIP IP checksums"
default n
help
Enable checksum checking for received IP messages
config LWIP_CHECKSUM_CHECK_UDP
bool "Enable LWIP UDP checksums"
default n
help
Enable checksum checking for received UDP messages
config LWIP_CHECKSUM_CHECK_ICMP
bool "Enable LWIP ICMP checksums"
default y
help
Enable checksum checking for received ICMP messages
endmenu # Checksums
config LWIP_TCPIP_TASK_STACK_SIZE
int "TCP/IP Task Stack Size"
default 3072
# for high log levels, esp_netif API calls can end up
# a few calls deep and logging there can trigger a stack overflow
range 2048 65536 if LOG_DEFAULT_LEVEL < 4
range 2560 65536 if LOG_DEFAULT_LEVEL >= 4
help
Configure TCP/IP task stack size, used by LWIP to process multi-threaded TCP/IP operations.
Setting this stack too small will result in stack overflow crashes.
choice LWIP_TCPIP_TASK_AFFINITY
prompt "TCP/IP task affinity"
default LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
help
Allows setting LwIP tasks affinity, i.e. whether the task is pinned to
CPU0, pinned to CPU1, or allowed to run on any CPU.
Currently this applies to "TCP/IP" task and "Ping" task.
config LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
bool "No affinity"
config LWIP_TCPIP_TASK_AFFINITY_CPU0
bool "CPU0"
config LWIP_TCPIP_TASK_AFFINITY_CPU1
bool "CPU1"
depends on !FREERTOS_UNICORE
endchoice
config LWIP_TCPIP_TASK_AFFINITY
hex
default FREERTOS_NO_AFFINITY if LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY
default 0x0 if LWIP_TCPIP_TASK_AFFINITY_CPU0
default 0x1 if LWIP_TCPIP_TASK_AFFINITY_CPU1
config LWIP_IPV6_MEMP_NUM_ND6_QUEUE
int "Max number of IPv6 packets to queue during MAC resolution"
depends on LWIP_IPV6
range 3 20
default 3
help
Config max number of IPv6 packets to queue during MAC resolution.
config LWIP_IPV6_ND6_NUM_NEIGHBORS
int "Max number of entries in IPv6 neighbor cache"
depends on LWIP_IPV6
range 3 10
default 5
help
Config max number of entries in IPv6 neighbor cache
config LWIP_IPV6_ND6_NUM_PREFIXES
int "Max number of entries in IPv6 on-link prefixes cache"
depends on LWIP_IPV6
default 5
help
Maximum number of entries in IPv6 on-link prefixes cache
config LWIP_IPV6_ND6_NUM_ROUTERS
int "Max number of entries in IPv6 default routers cache"
depends on LWIP_IPV6
default 3
help
Maximum number of entries in IPv6 default routers cache
config LWIP_IPV6_ND6_NUM_DESTINATIONS
int "Max number of entries in IPv6 destinations cache"
depends on LWIP_IPV6
default 10
help
Maximum number of entries in IPv6 destinations cache
menuconfig LWIP_PPP_SUPPORT
bool "Enable PPP support"
default n
help
Enable PPP stack. Now only PPP over serial is possible.
config LWIP_PPP_ENABLE_IPV4
bool "Enable IPV4 support for PPP connections (IPCP)"
depends on LWIP_PPP_SUPPORT && LWIP_IPV4
default y
help
Enable IPCP protocol in PPP negotiations, which assigns IPv4 addresses to the PPP client,
as well as IPv4 DNS servers.
You can disable this if your modem supports IPv6 only.
config LWIP_PPP_ENABLE_IPV6
bool "Enable IPV6 support for PPP connections (IPV6CP)"
depends on LWIP_PPP_SUPPORT && LWIP_IPV6
default y
help
Enable IPV6 support in PPP for the local link between the DTE (processor) and DCE (modem).
There are some modems which do not support the IPV6 addressing in the local link.
If they are requested for IPV6CP negotiation, they may time out.
This would in turn fail the configuration for the whole link.
If your modem is not responding correctly to PPP Phase Network, try to disable IPV6 support.
config LWIP_PPP_NOTIFY_PHASE_SUPPORT
bool "Enable Notify Phase Callback"
depends on LWIP_PPP_SUPPORT
default n
help
Enable to set a callback which is called on change of the internal PPP state machine.
config LWIP_PPP_PAP_SUPPORT
bool "Enable PAP support"
depends on LWIP_PPP_SUPPORT
default n
help
Enable Password Authentication Protocol (PAP) support
config LWIP_PPP_CHAP_SUPPORT
bool "Enable CHAP support"
depends on LWIP_PPP_SUPPORT
default n
help
Enable Challenge Handshake Authentication Protocol (CHAP) support
config LWIP_PPP_MSCHAP_SUPPORT
bool "Enable MSCHAP support"