Kconfig 41 KB

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