Kconfig 41 KB

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