lwipopts.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612
  1. #ifndef __LWIPOPTS_H__
  2. #define __LWIPOPTS_H__
  3. #include <rtconfig.h>
  4. #define ERRNO 1
  5. #define LWIP_IPV4 1
  6. #ifdef RT_USING_LWIP_IPV6
  7. #define LWIP_IPV6 1
  8. #else
  9. #define LWIP_IPV6 0
  10. #endif /* RT_USING_LWIP_IPV6 */
  11. #define NO_SYS 0
  12. #define LWIP_SOCKET 1
  13. #define LWIP_NETCONN 1
  14. #ifdef RT_LWIP_IGMP
  15. #define LWIP_IGMP 1
  16. #else
  17. #define LWIP_IGMP 0
  18. #endif
  19. #ifdef RT_LWIP_ICMP
  20. #define LWIP_ICMP 1
  21. #else
  22. #define LWIP_ICMP 0
  23. #endif
  24. #ifdef RT_LWIP_SNMP
  25. #define LWIP_SNMP 1
  26. #else
  27. #define LWIP_SNMP 0
  28. #endif
  29. #ifdef RT_LWIP_DNS
  30. #define LWIP_DNS 1
  31. #else
  32. #define LWIP_DNS 0
  33. #endif
  34. #define LWIP_HAVE_LOOPIF 0
  35. #define LWIP_PLATFORM_BYTESWAP 0
  36. #ifndef BYTE_ORDER
  37. #define BYTE_ORDER LITTLE_ENDIAN
  38. #endif
  39. /* #define RT_LWIP_DEBUG */
  40. #ifdef RT_LWIP_DEBUG
  41. #define LWIP_DEBUG
  42. #endif
  43. /* ---------- Debug options ---------- */
  44. #ifdef LWIP_DEBUG
  45. #ifdef RT_LWIP_SYS_DEBUG
  46. #define SYS_DEBUG LWIP_DBG_ON
  47. #else
  48. #define SYS_DEBUG LWIP_DBG_OFF
  49. #endif
  50. #ifdef RT_LWIP_ETHARP_DEBUG
  51. #define ETHARP_DEBUG LWIP_DBG_ON
  52. #else
  53. #define ETHARP_DEBUG LWIP_DBG_OFF
  54. #endif
  55. #ifdef RT_LWIP_PPP_DEBUG
  56. #define PPP_DEBUG LWIP_DBG_ON
  57. #else
  58. #define PPP_DEBUG LWIP_DBG_OFF
  59. #endif
  60. #ifdef RT_LWIP_MEM_DEBUG
  61. #define MEM_DEBUG LWIP_DBG_ON
  62. #else
  63. #define MEM_DEBUG LWIP_DBG_OFF
  64. #endif
  65. #ifdef RT_LWIP_MEMP_DEBUG
  66. #define MEMP_DEBUG LWIP_DBG_ON
  67. #else
  68. #define MEMP_DEBUG LWIP_DBG_OFF
  69. #endif
  70. #ifdef RT_LWIP_PBUF_DEBUG
  71. #define PBUF_DEBUG LWIP_DBG_ON
  72. #else
  73. #define PBUF_DEBUG LWIP_DBG_OFF
  74. #endif
  75. #ifdef RT_LWIP_API_LIB_DEBUG
  76. #define API_LIB_DEBUG LWIP_DBG_ON
  77. #else
  78. #define API_LIB_DEBUG LWIP_DBG_OFF
  79. #endif
  80. #ifdef RT_LWIP_API_MSG_DEBUG
  81. #define API_MSG_DEBUG LWIP_DBG_ON
  82. #else
  83. #define API_MSG_DEBUG LWIP_DBG_OFF
  84. #endif
  85. #ifdef RT_LWIP_TCPIP_DEBUG
  86. #define TCPIP_DEBUG LWIP_DBG_ON
  87. #else
  88. #define TCPIP_DEBUG LWIP_DBG_OFF
  89. #endif
  90. #ifdef RT_LWIP_NETIF_DEBUG
  91. #define NETIF_DEBUG LWIP_DBG_ON
  92. #else
  93. #define NETIF_DEBUG LWIP_DBG_OFF
  94. #endif
  95. #ifdef RT_LWIP_SOCKETS_DEBUG
  96. #define SOCKETS_DEBUG LWIP_DBG_ON
  97. #else
  98. #define SOCKETS_DEBUG LWIP_DBG_OFF
  99. #endif
  100. #ifdef RT_LWIP_DNS_DEBUG
  101. #define DNS_DEBUG LWIP_DBG_ON
  102. #else
  103. #define DNS_DEBUG LWIP_DBG_OFF
  104. #endif
  105. #ifdef RT_LWIP_AUTOIP_DEBUG
  106. #define AUTOIP_DEBUG LWIP_DBG_ON
  107. #else
  108. #define AUTOIP_DEBUG LWIP_DBG_OFF
  109. #endif
  110. #ifdef RT_LWIP_DHCP_DEBUG
  111. #define DHCP_DEBUG LWIP_DBG_ON
  112. #else
  113. #define DHCP_DEBUG LWIP_DBG_OFF
  114. #endif
  115. #ifdef RT_LWIP_IP_DEBUG
  116. #define IP_DEBUG LWIP_DBG_ON
  117. #else
  118. #define IP_DEBUG LWIP_DBG_OFF
  119. #endif
  120. #ifdef RT_LWIP_IP_REASS_DEBUG
  121. #define IP_REASS_DEBUG LWIP_DBG_ON
  122. #else
  123. #define IP_REASS_DEBUG LWIP_DBG_OFF
  124. #endif
  125. #ifdef RT_LWIP_ICMP_DEBUG
  126. #define ICMP_DEBUG LWIP_DBG_ON
  127. #else
  128. #define ICMP_DEBUG LWIP_DBG_OFF
  129. #endif
  130. #ifdef RT_LWIP_IGMP_DEBUG
  131. #define IGMP_DEBUG LWIP_DBG_ON
  132. #else
  133. #define IGMP_DEBUG LWIP_DBG_OFF
  134. #endif
  135. #ifdef RT_LWIP_UDP_DEBUG
  136. #define UDP_DEBUG LWIP_DBG_ON
  137. #else
  138. #define UDP_DEBUG LWIP_DBG_OFF
  139. #endif
  140. #ifdef RT_LWIP_TCP_DEBUG
  141. #define TCP_DEBUG LWIP_DBG_ON
  142. #else
  143. #define TCP_DEBUG LWIP_DBG_OFF
  144. #endif
  145. #ifdef RT_LWIP_TCP_INPUT_DEBUG
  146. #define TCP_INPUT_DEBUG LWIP_DBG_ON
  147. #else
  148. #define TCP_INPUT_DEBUG LWIP_DBG_OFF
  149. #endif
  150. #ifdef RT_LWIP_TCP_OUTPUT_DEBUG
  151. #define TCP_OUTPUT_DEBUG LWIP_DBG_ON
  152. #else
  153. #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
  154. #endif
  155. #ifdef RT_LWIP_TCP_RTO_DEBUG
  156. #define TCP_RTO_DEBUG LWIP_DBG_ON
  157. #else
  158. #define TCP_RTO_DEBUG LWIP_DBG_OFF
  159. #endif
  160. #ifdef RT_LWIP_TCP_CWND_DEBUG
  161. #define TCP_CWND_DEBUG LWIP_DBG_ON
  162. #else
  163. #define TCP_CWND_DEBUG LWIP_DBG_OFF
  164. #endif
  165. #ifdef RT_LWIP_TCP_WND_DEBUG
  166. #define TCP_WND_DEBUG LWIP_DBG_ON
  167. #else
  168. #define TCP_WND_DEBUG LWIP_DBG_OFF
  169. #endif
  170. #ifdef RT_LWIP_TCP_FR_DEBUG
  171. #define TCP_FR_DEBUG LWIP_DBG_ON
  172. #else
  173. #define TCP_FR_DEBUG LWIP_DBG_OFF
  174. #endif
  175. #ifdef RT_LWIP_TCP_QLEN_DEBUG
  176. #define TCP_QLEN_DEBUG LWIP_DBG_ON
  177. #else
  178. #define TCP_QLEN_DEBUG LWIP_DBG_OFF
  179. #endif
  180. #ifdef RT_LWIP_TCP_RST_DEBUG
  181. #define TCP_RST_DEBUG LWIP_DBG_ON
  182. #else
  183. #define TCP_RST_DEBUG LWIP_DBG_OFF
  184. #endif
  185. #endif /* LWIP_DEBUG */
  186. #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
  187. /* ---------- Memory options ---------- */
  188. #define MEM_ALIGNMENT 4
  189. #define MEMP_OVERFLOW_CHECK 1 ////
  190. #define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1 ////
  191. //#define MEM_LIBC_MALLOC 1
  192. //#define MEM_USE_POOLS 1
  193. //#define MEMP_USE_CUSTOM_POOLS 1
  194. //#define MEM_SIZE (1024*64)
  195. #define MEMP_MEM_MALLOC 0
  196. /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
  197. sends a lot of data out of ROM (or other static memory), this
  198. should be set high. */
  199. #define MEMP_NUM_PBUF 32 //16
  200. /* the number of struct netconns */
  201. #ifdef RT_MEMP_NUM_NETCONN
  202. #define MEMP_NUM_NETCONN RT_MEMP_NUM_NETCONN
  203. #endif
  204. /* the number of UDP protocol control blocks. One per active RAW "connection". */
  205. #ifdef RT_LWIP_RAW_PCB_NUM
  206. #define MEMP_NUM_RAW_PCB RT_LWIP_RAW_PCB_NUM
  207. #endif
  208. /* the number of UDP protocol control blocks. One per active UDP "connection". */
  209. #ifdef RT_LWIP_UDP_PCB_NUM
  210. #define MEMP_NUM_UDP_PCB RT_LWIP_UDP_PCB_NUM
  211. #endif
  212. /* the number of simulatenously active TCP connections. */
  213. #ifdef RT_LWIP_TCP_PCB_NUM
  214. #define MEMP_NUM_TCP_PCB RT_LWIP_TCP_PCB_NUM
  215. #endif
  216. /* the number of simultaneously queued TCP */
  217. #ifdef RT_LWIP_TCP_SEG_NUM
  218. #define MEMP_NUM_TCP_SEG RT_LWIP_TCP_SEG_NUM
  219. #else
  220. #define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
  221. #endif
  222. /*
  223. * You can re-define following setting in rtcofnig.h to overwrite the default
  224. * setting in the lwip opts.h
  225. */
  226. /* MEMP_NUM_NETBUF: the number of struct netbufs. */
  227. // #define MEMP_NUM_NETBUF 2
  228. /* MEMP_NUM_NETCONN: the number of struct netconns. */
  229. // #define MEMP_NUM_NETCONN 4
  230. /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
  231. for sequential API communication and incoming packets. Used in
  232. src/api/tcpip.c. */
  233. // #define MEMP_NUM_TCPIP_MSG_API 16
  234. // #define MEMP_NUM_TCPIP_MSG_INPKT 16
  235. /* ---------- Pbuf options ---------- */
  236. /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
  237. #ifdef RT_LWIP_PBUF_NUM
  238. #define PBUF_POOL_SIZE RT_LWIP_PBUF_NUM
  239. #endif
  240. /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
  241. #ifdef RT_LWIP_PBUF_POOL_BUFSIZE
  242. #define PBUF_POOL_BUFSIZE RT_LWIP_PBUF_POOL_BUFSIZE
  243. #endif
  244. /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
  245. link level header. */
  246. #define PBUF_LINK_HLEN 16
  247. #ifdef RT_LWIP_ETH_PAD_SIZE
  248. #define ETH_PAD_SIZE RT_LWIP_ETH_PAD_SIZE
  249. #endif
  250. /** SYS_LIGHTWEIGHT_PROT
  251. * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
  252. * for certain critical regions during buffer allocation, deallocation and memory
  253. * allocation and deallocation.
  254. */
  255. #define SYS_LIGHTWEIGHT_PROT (NO_SYS==0)
  256. #ifdef LWIP_USING_NAT
  257. #define IP_NAT 1
  258. #else
  259. #define IP_NAT 0
  260. #endif
  261. /* ---------- TCP options ---------- */
  262. #ifdef RT_LWIP_TCP
  263. #define LWIP_TCP 1
  264. #else
  265. #define LWIP_TCP 0
  266. #endif
  267. #define TCP_TTL 255
  268. /* Controls if TCP should queue segments that arrive out of
  269. order. Define to 0 if your device is low on memory. */
  270. #define TCP_QUEUE_OOSEQ 1
  271. /* TCP Maximum segment size. */
  272. #define TCP_MSS 1460
  273. /* TCP sender buffer space (bytes). */
  274. #ifdef RT_LWIP_TCP_SND_BUF
  275. #define TCP_SND_BUF RT_LWIP_TCP_SND_BUF
  276. #else
  277. #define TCP_SND_BUF (TCP_MSS * 2)
  278. #endif
  279. /* TCP sender buffer space (pbufs). This must be at least = 2 *
  280. TCP_SND_BUF/TCP_MSS for things to work. */
  281. #define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS)
  282. /* TCP writable space (bytes). This must be less than or equal
  283. to TCP_SND_BUF. It is the amount of space which must be
  284. available in the tcp snd_buf for select to return writable */
  285. #define TCP_SNDLOWAT (TCP_SND_BUF/2)
  286. #define TCP_SNDQUEUELOWAT TCP_SND_QUEUELEN/2
  287. /* TCP receive window. */
  288. #ifdef RT_LWIP_TCP_WND
  289. #define TCP_WND RT_LWIP_TCP_WND
  290. #else
  291. #define TCP_WND (TCP_MSS * 2)
  292. #endif
  293. /* Maximum number of retransmissions of data segments. */
  294. #define TCP_MAXRTX 12
  295. /* Maximum number of retransmissions of SYN segments. */
  296. #define TCP_SYNMAXRTX 4
  297. /* tcpip thread options */
  298. #ifdef RT_LWIP_TCPTHREAD_PRIORITY
  299. #define TCPIP_MBOX_SIZE RT_LWIP_TCPTHREAD_MBOX_SIZE
  300. #define TCPIP_THREAD_PRIO RT_LWIP_TCPTHREAD_PRIORITY
  301. #define TCPIP_THREAD_STACKSIZE RT_LWIP_TCPTHREAD_STACKSIZE
  302. #else
  303. #define TCPIP_MBOX_SIZE 8
  304. #define TCPIP_THREAD_PRIO 128
  305. #define TCPIP_THREAD_STACKSIZE 4096
  306. #endif
  307. #define TCPIP_THREAD_NAME "tcpip"
  308. #define DEFAULT_TCP_RECVMBOX_SIZE 10
  309. /* ---------- ARP options ---------- */
  310. #define LWIP_ARP 1
  311. #define ARP_TABLE_SIZE 10
  312. #define ARP_QUEUEING 1
  313. /* ---------- IP options ---------- */
  314. /* Define IP_FORWARD to 1 if you wish to have the ability to forward
  315. IP packets across network interfaces. If you are going to run lwIP
  316. on a device with only one network interface, define this to 0. */
  317. #define IP_FORWARD 0
  318. /* IP reassembly and segmentation.These are orthogonal even
  319. * if they both deal with IP fragments */
  320. #ifdef RT_LWIP_REASSEMBLY_FRAG
  321. #define IP_REASSEMBLY 1
  322. #define IP_FRAG 1
  323. #define IP_REASS_MAX_PBUFS 10
  324. #define MEMP_NUM_REASSDATA 10
  325. #else
  326. #define IP_REASSEMBLY 0
  327. #define IP_FRAG 0
  328. #endif
  329. /* ---------- ICMP options ---------- */
  330. #define ICMP_TTL 255
  331. /* ---------- DHCP options ---------- */
  332. /* Define LWIP_DHCP to 1 if you want DHCP configuration of
  333. interfaces. */
  334. #ifdef RT_LWIP_DHCP
  335. #define LWIP_DHCP 1
  336. #else
  337. #define LWIP_DHCP 0
  338. #endif
  339. /* 1 if you want to do an ARP check on the offered address
  340. (recommended). */
  341. #define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
  342. /* ---------- AUTOIP options ------- */
  343. #define LWIP_AUTOIP 0
  344. #define LWIP_DHCP_AUTOIP_COOP (LWIP_DHCP && LWIP_AUTOIP)
  345. /* ---------- UDP options ---------- */
  346. #ifdef RT_LWIP_UDP
  347. #define LWIP_UDP 1
  348. #else
  349. #define LWIP_UDP 0
  350. #endif
  351. #define LWIP_UDPLITE 0
  352. #define UDP_TTL 255
  353. #define DEFAULT_UDP_RECVMBOX_SIZE 1
  354. /* ---------- RAW options ---------- */
  355. #ifdef RT_LWIP_RAW
  356. #define LWIP_RAW 1
  357. #else
  358. #define LWIP_RAW 0
  359. #endif
  360. #define DEFAULT_RAW_RECVMBOX_SIZE 1
  361. #define DEFAULT_ACCEPTMBOX_SIZE 10
  362. /* ---------- Statistics options ---------- */
  363. #ifdef RT_LWIP_STATS
  364. #define LWIP_STATS 1
  365. #define LWIP_STATS_DISPLAY 1
  366. #else
  367. #define LWIP_STATS 0
  368. #endif
  369. #if LWIP_STATS
  370. #define LINK_STATS 1
  371. #define IP_STATS 1
  372. #define ICMP_STATS 1
  373. #define IGMP_STATS 1
  374. #define IPFRAG_STATS 1
  375. #define UDP_STATS 1
  376. #define TCP_STATS 1
  377. #define MEM_STATS 1
  378. #define MEMP_STATS 1
  379. #define PBUF_STATS 1
  380. #define SYS_STATS 1
  381. #define MIB2_STATS 1
  382. #endif /* LWIP_STATS */
  383. /* ---------- PPP options ---------- */
  384. #ifdef RT_LWIP_PPP
  385. #define PPP_SUPPORT 1 /* Set > 0 for PPP */
  386. #else
  387. #define PPP_SUPPORT 0 /* Set > 0 for PPP */
  388. #endif
  389. #if PPP_SUPPORT
  390. #define NUM_PPP 1 /* Max PPP sessions. */
  391. /* Select modules to enable. Ideally these would be set in the makefile but
  392. * we're limited by the command line length so you need to modify the settings
  393. * in this file.
  394. */
  395. #ifdef RT_LWIP_PPPOE
  396. #define PPPOE_SUPPORT 1
  397. #else
  398. #define PPPOE_SUPPORT 0
  399. #endif
  400. #ifdef RT_LWIP_PPPOS
  401. #define PPPOS_SUPPORT 1
  402. #else
  403. #define PPPOS_SUPPORT 0
  404. #endif
  405. #define PAP_SUPPORT 1 /* Set > 0 for PAP. */
  406. #define CHAP_SUPPORT 1 /* Set > 0 for CHAP. */
  407. #define MSCHAP_SUPPORT 0 /* Set > 0 for MSCHAP (NOT FUNCTIONAL!) */
  408. #define CBCP_SUPPORT 0 /* Set > 0 for CBCP (NOT FUNCTIONAL!) */
  409. #define CCP_SUPPORT 0 /* Set > 0 for CCP (NOT FUNCTIONAL!) */
  410. #define VJ_SUPPORT 1 /* Set > 0 for VJ header compression. */
  411. #define MD5_SUPPORT 1 /* Set > 0 for MD5 (see also CHAP) */
  412. #endif /* PPP_SUPPORT */
  413. /**
  414. * LWIP_POSIX_SOCKETS_IO_NAMES==1: Enable POSIX-style sockets functions names.
  415. * Disable this option if you use a POSIX operating system that uses the same
  416. * names (read, write & close). (only used if you use sockets.c)
  417. */
  418. #ifndef LWIP_POSIX_SOCKETS_IO_NAMES
  419. #define LWIP_POSIX_SOCKETS_IO_NAMES 0
  420. #endif
  421. /**
  422. * LWIP_TCP_KEEPALIVE==1: Enable TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT
  423. * options processing. Note that TCP_KEEPIDLE and TCP_KEEPINTVL have to be set
  424. * in seconds. (does not require sockets.c, and will affect tcp.c)
  425. */
  426. #ifndef LWIP_TCP_KEEPALIVE
  427. #define LWIP_TCP_KEEPALIVE 1
  428. #endif
  429. /**
  430. * LWIP_NETIF_API==1: Support netif api (in netifapi.c)
  431. */
  432. #ifndef LWIP_NETIF_API
  433. #define LWIP_NETIF_API 1
  434. #endif
  435. #ifdef LWIP_IGMP
  436. #include <stdlib.h>
  437. #define LWIP_RAND rand
  438. #endif
  439. /*
  440. ------------------------------------
  441. ---------- Socket options ----------
  442. ------------------------------------
  443. */
  444. /*
  445. * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
  446. */
  447. #ifndef LWIP_SOCKET
  448. #define LWIP_SOCKET 1
  449. #endif
  450. /*
  451. * LWIP_COMPAT_SOCKETS==1: Enable BSD-style sockets functions names.
  452. * (only used if you use sockets.c)
  453. */
  454. #ifdef SAL_USING_POSIX
  455. #define LWIP_COMPAT_SOCKETS 0
  456. #else
  457. #ifndef LWIP_COMPAT_SOCKETS
  458. #define LWIP_COMPAT_SOCKETS 1
  459. #endif
  460. #endif
  461. /**
  462. * LWIP_SO_SNDTIMEO==1: Enable send timeout for sockets/netconns and
  463. * SO_SNDTIMEO processing.
  464. */
  465. #ifndef LWIP_SO_SNDTIMEO
  466. #define LWIP_SO_SNDTIMEO 1
  467. #endif
  468. /**
  469. * LWIP_SO_RCVTIMEO==1: Enable receive timeout for sockets/netconns and
  470. * SO_RCVTIMEO processing.
  471. */
  472. #ifndef LWIP_SO_RCVTIMEO
  473. #define LWIP_SO_RCVTIMEO 1
  474. #endif
  475. /**
  476. * LWIP_SO_RCVBUF==1: Enable SO_RCVBUF processing.
  477. */
  478. #ifndef LWIP_SO_RCVBUF
  479. #define LWIP_SO_RCVBUF 1
  480. #endif
  481. /**
  482. * If LWIP_SO_RCVBUF is used, this is the default value for recv_bufsize.
  483. */
  484. #ifndef RECV_BUFSIZE_DEFAULT
  485. #define RECV_BUFSIZE_DEFAULT 8192
  486. #endif
  487. /**
  488. * SO_REUSE==1: Enable SO_REUSEADDR option.
  489. */
  490. #ifndef SO_REUSE
  491. #define SO_REUSE 0
  492. #endif
  493. /*
  494. ------------------------------------
  495. ------- Applications options -------
  496. ------------------------------------
  497. */
  498. /**
  499. * Max. length of TFTP filename
  500. */
  501. #ifdef RT_LWIP_TFTP_MAX_FILENAME_LEN
  502. #define TFTP_MAX_FILENAME_LEN RT_LWIP_TFTP_MAX_FILENAME_LEN
  503. #elif defined(RT_DFS_ELM_MAX_LFN)
  504. #define TFTP_MAX_FILENAME_LEN RT_DFS_ELM_MAX_LFN
  505. #else
  506. #define TFTP_MAX_FILENAME_LEN 64
  507. #endif
  508. #endif /* __LWIPOPTS_H__ */