Kconfig 41 KB

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