FreeRTOSIPConfigDefaults.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. /*
  2. * FreeRTOS+TCP V2.3.2 LTS Patch 1
  3. * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy of
  6. * this software and associated documentation files (the "Software"), to deal in
  7. * the Software without restriction, including without limitation the rights to
  8. * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
  9. * the Software, and to permit persons to whom the Software is furnished to do so,
  10. * subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in all
  13. * copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
  17. * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
  18. * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
  19. * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  20. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * http://www.FreeRTOS.org
  23. * http://aws.amazon.com/freertos
  24. *
  25. * 1 tab == 4 spaces!
  26. */
  27. #ifndef FREERTOS_DEFAULT_IP_CONFIG_H
  28. #define FREERTOS_DEFAULT_IP_CONFIG_H
  29. /* The error numbers defined in this file will be moved to the core FreeRTOS
  30. * code in future versions of FreeRTOS - at which time the following header file
  31. * will be removed. */
  32. #include "FreeRTOS_errno_TCP.h"
  33. /* This file provides default values for configuration options that are missing
  34. * from the FreeRTOSIPConfig.h configuration header file. */
  35. /* These macros are used to define away static keyword for CBMC proofs */
  36. #ifndef _static
  37. #define _static static
  38. #endif
  39. /* Ensure defined configuration constants are using the most up to date naming. */
  40. #ifdef tcpconfigIP_TIME_TO_LIVE
  41. #error now called: ipconfigTCP_TIME_TO_LIVE
  42. #endif
  43. #ifdef updconfigIP_TIME_TO_LIVE
  44. #error now called: ipconfigUDP_TIME_TO_LIVE
  45. #endif
  46. #ifdef ipFILLER_SIZE
  47. #error now called: ipconfigPACKET_FILLER_SIZE
  48. #endif
  49. #ifdef dnsMAX_REQUEST_ATTEMPTS
  50. #error now called: ipconfigDNS_REQUEST_ATTEMPTS
  51. #endif
  52. #ifdef ipconfigUDP_TASK_PRIORITY
  53. #error now called: ipconfigIP_TASK_PRIORITY
  54. #endif
  55. #ifdef ipconfigUDP_TASK_STACK_SIZE_WORDS
  56. #error now called: ipconfigIP_TASK_STACK_SIZE_WORDS
  57. #endif
  58. #ifdef ipconfigDRIVER_INCLUDED_RX_IP_FILTERING
  59. #error now called: ipconfigETHERNET_DRIVER_FILTERS_PACKETS
  60. #endif
  61. #ifdef ipconfigMAX_SEND_BLOCK_TIME_TICKS
  62. #error now called: ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS
  63. #endif
  64. #ifdef ipconfigUSE_RECEIVE_CONNECT_CALLBACKS
  65. #error now called: ipconfigUSE_CALLBACKS
  66. #endif
  67. #ifdef ipconfigNUM_NETWORK_BUFFERS
  68. #error now called: ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS
  69. #endif
  70. #ifdef ipconfigTCP_HANG_PROT
  71. #error now called: ipconfigTCP_HANG_PROTECTION
  72. #endif
  73. #ifdef ipconfigTCP_HANG_PROT_TIME
  74. #error now called: ipconfigTCP_HANG_PROTECTION_TIME
  75. #endif
  76. #ifdef FreeRTOS_lprintf
  77. #error now called: FreeRTOS_debug_printf
  78. #endif
  79. #if ( ipconfigEVENT_QUEUE_LENGTH < ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 ) )
  80. #error The ipconfigEVENT_QUEUE_LENGTH parameter must be at least ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5
  81. #endif
  82. #if ( ipconfigNETWORK_MTU < 46 )
  83. #error ipconfigNETWORK_MTU must be at least 46.
  84. #endif
  85. #ifdef ipconfigBUFFER_ALLOC_FIXED_SIZE
  86. #error ipconfigBUFFER_ALLOC_FIXED_SIZE was dropped and replaced by a const value, declared in BufferAllocation[12].c
  87. #endif
  88. #ifdef ipconfigNIC_SEND_PASSES_DMA
  89. #error now called: ipconfigZERO_COPY_TX_DRIVER
  90. #endif
  91. #ifdef HAS_TX_CRC_OFFLOADING
  92. /* _HT_ As these macro names have changed, throw an error
  93. * if they're still defined. */
  94. #error now called: ipconfigHAS_TX_CRC_OFFLOADING
  95. #endif
  96. #ifdef HAS_RX_CRC_OFFLOADING
  97. #error now called: ipconfigHAS_RX_CRC_OFFLOADING
  98. #endif
  99. #ifdef ipconfigTCP_RX_BUF_LEN
  100. #error ipconfigTCP_RX_BUF_LEN is now called ipconfigTCP_RX_BUFFER_LENGTH
  101. #endif
  102. #ifdef ipconfigTCP_TX_BUF_LEN
  103. #error ipconfigTCP_TX_BUF_LEN is now called ipconfigTCP_TX_BUFFER_LENGTH
  104. #endif
  105. #ifdef ipconfigDHCP_USES_USER_HOOK
  106. #error ipconfigDHCP_USES_USER_HOOK and its associated callback have been superseded - see http: /*www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html#ipconfigUSE_DHCP_HOOK */
  107. #endif
  108. #ifndef ipconfigUSE_TCP
  109. #define ipconfigUSE_TCP ( 1 )
  110. #endif
  111. #if ipconfigUSE_TCP
  112. /* Include support for TCP scaling windows */
  113. #ifndef ipconfigUSE_TCP_WIN
  114. #define ipconfigUSE_TCP_WIN ( 1 )
  115. #endif
  116. #ifndef ipconfigTCP_WIN_SEG_COUNT
  117. #define ipconfigTCP_WIN_SEG_COUNT ( 256 )
  118. #endif
  119. #ifndef ipconfigIGNORE_UNKNOWN_PACKETS
  120. /* When non-zero, TCP will not send RST packets in reply to
  121. * TCP packets which are unknown, or out-of-order. */
  122. #define ipconfigIGNORE_UNKNOWN_PACKETS ( 0 )
  123. #endif
  124. #endif /* if ipconfigUSE_TCP */
  125. /*
  126. * For debugging/logging: check if the port number is used for telnet
  127. * Some events will not be logged for telnet connections
  128. * because it would produce logging about the transmission of the logging...
  129. * This macro will only be used if FreeRTOS_debug_printf() is defined for logging
  130. */
  131. #ifndef ipconfigTCP_MAY_LOG_PORT
  132. #define ipconfigTCP_MAY_LOG_PORT( xPort ) ( ( xPort ) != 23U )
  133. #endif
  134. #ifndef ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME
  135. #define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME portMAX_DELAY
  136. #endif
  137. #ifndef ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME
  138. #define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME portMAX_DELAY
  139. #endif
  140. #ifndef ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS
  141. #define ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS pdMS_TO_TICKS( 5000U )
  142. #endif
  143. #ifndef ipconfigDNS_SEND_BLOCK_TIME_TICKS
  144. #define ipconfigDNS_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500U )
  145. #endif
  146. /*
  147. * FreeRTOS debug logging routine (proposal)
  148. * The macro will be called in the printf() style. Users can define
  149. * their own logging routine as:
  150. *
  151. * #define FreeRTOS_debug_printf( MSG ) my_printf MSG
  152. *
  153. * The FreeRTOS_debug_printf() must be thread-safe but does not have to be
  154. * interrupt-safe.
  155. */
  156. #ifdef ipconfigHAS_DEBUG_PRINTF
  157. #if ( ipconfigHAS_DEBUG_PRINTF == 0 )
  158. #ifdef FreeRTOS_debug_printf
  159. #error Do not define FreeRTOS_debug_print if ipconfigHAS_DEBUG_PRINTF is set to 0
  160. #endif /* ifdef FreeRTOS_debug_printf */
  161. #endif /* ( ipconfigHAS_DEBUG_PRINTF == 0 ) */
  162. #endif /* ifdef ipconfigHAS_DEBUG_PRINTF */
  163. #ifndef FreeRTOS_debug_printf
  164. #define FreeRTOS_debug_printf( MSG ) do {} while( ipFALSE_BOOL )
  165. #define ipconfigHAS_DEBUG_PRINTF 0
  166. #endif
  167. /*
  168. * FreeRTOS general logging routine (proposal)
  169. * Used in some utility functions such as FreeRTOS_netstat() and FreeRTOS_PrintARPCache()
  170. *
  171. * #define FreeRTOS_printf( MSG ) my_printf MSG
  172. *
  173. * The FreeRTOS_printf() must be thread-safe but does not have to be interrupt-safe
  174. */
  175. #ifdef ipconfigHAS_PRINTF
  176. #if ( ipconfigHAS_PRINTF == 0 )
  177. #ifdef FreeRTOS_printf
  178. #error Do not define FreeRTOS_print if ipconfigHAS_PRINTF is set to 0
  179. #endif /* ifdef FreeRTOS_debug_printf */
  180. #endif /* ( ipconfigHAS_PRINTF == 0 ) */
  181. #endif /* ifdef ipconfigHAS_PRINTF */
  182. #ifndef FreeRTOS_printf
  183. #define FreeRTOS_printf( MSG ) do {} while( ipFALSE_BOOL )
  184. #define ipconfigHAS_PRINTF 0
  185. #endif
  186. /*
  187. * In cases where a lot of logging is produced, FreeRTOS_flush_logging( )
  188. * will be called to give the logging module a chance to flush the data
  189. * An example of this is the netstat command, which produces many lines of logging
  190. */
  191. #ifndef FreeRTOS_flush_logging
  192. #define FreeRTOS_flush_logging() do {} while( ipFALSE_BOOL )
  193. #endif
  194. /* Malloc functions. Within most applications of FreeRTOS, the couple
  195. * pvPortMalloc()/vPortFree() will be used.
  196. * If there is also SDRAM, the user may decide to use a different memory
  197. * allocator:
  198. * MallocLarge is used to allocate large TCP buffers (for Rx/Tx)
  199. * MallocSocket is used to allocate the space for the sockets
  200. */
  201. #ifndef pvPortMallocLarge
  202. #define pvPortMallocLarge( x ) pvPortMalloc( x )
  203. #endif
  204. #ifndef vPortFreeLarge
  205. #define vPortFreeLarge( ptr ) vPortFree( ptr )
  206. #endif
  207. #ifndef pvPortMallocSocket
  208. #define pvPortMallocSocket( x ) pvPortMalloc( x )
  209. #endif
  210. #ifndef vPortFreeSocket
  211. #define vPortFreeSocket( ptr ) vPortFree( ptr )
  212. #endif
  213. /*
  214. * At several places within the library, random numbers are needed:
  215. * - DHCP: For creating a DHCP transaction number
  216. * - TCP: Set the Initial Sequence Number: this is the value of the first outgoing
  217. * sequence number being used when connecting to a peer.
  218. * Having a well randomized ISN is important to avoid spoofing
  219. * - UDP/TCP: for setting the first port number to be used, in case a socket
  220. * uses a 'random' or anonymous port number
  221. */
  222. #ifndef ipconfigRAND32
  223. #define ipconfigRAND32() rand()
  224. #endif
  225. /* --------------------------------------------------------
  226. * End of: HT Added some macro defaults for the PLUS-UDP project
  227. * -------------------------------------------------------- */
  228. #ifndef ipconfigUSE_NETWORK_EVENT_HOOK
  229. #define ipconfigUSE_NETWORK_EVENT_HOOK 0
  230. #endif
  231. #ifndef ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS
  232. #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( pdMS_TO_TICKS( 20U ) )
  233. #endif
  234. #ifndef ipconfigARP_CACHE_ENTRIES
  235. #define ipconfigARP_CACHE_ENTRIES 10
  236. #endif
  237. #ifndef ipconfigMAX_ARP_RETRANSMISSIONS
  238. #define ipconfigMAX_ARP_RETRANSMISSIONS ( 5U )
  239. #endif
  240. #ifndef ipconfigMAX_ARP_AGE
  241. #define ipconfigMAX_ARP_AGE 150U
  242. #endif
  243. #ifndef ipconfigUSE_ARP_REVERSED_LOOKUP
  244. #define ipconfigUSE_ARP_REVERSED_LOOKUP 0
  245. #endif
  246. #ifndef ipconfigUSE_ARP_REMOVE_ENTRY
  247. #define ipconfigUSE_ARP_REMOVE_ENTRY 0
  248. #endif
  249. #ifndef ipconfigINCLUDE_FULL_INET_ADDR
  250. #define ipconfigINCLUDE_FULL_INET_ADDR 1
  251. #endif
  252. #ifndef ipconfigUSE_LINKED_RX_MESSAGES
  253. #define ipconfigUSE_LINKED_RX_MESSAGES 0
  254. #endif
  255. #ifndef ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS
  256. #define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 45
  257. #endif
  258. #ifndef ipconfigEVENT_QUEUE_LENGTH
  259. #define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 )
  260. #endif
  261. #ifndef ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND
  262. #define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1
  263. #endif
  264. /* Configuration to control whether packets with IP options,
  265. * received over the network, should be passed up to the
  266. * software stack OR should be dropped.
  267. * If set to 1, the stack accepts IP packets that contain IP options, but does
  268. * not process the options (IP options are not supported).
  269. * If set to 0, the stack will drop IP packets that contain IP options.
  270. */
  271. #ifndef ipconfigIP_PASS_PACKETS_WITH_IP_OPTIONS
  272. #define ipconfigIP_PASS_PACKETS_WITH_IP_OPTIONS 1
  273. #endif
  274. /* Configuration to control whether UDP packets with
  275. * checksum value of zero should be passed up the software
  276. * stack OR should be dropped.
  277. * If set to 1, the stack will accept UDP packets that have their checksum
  278. * value set to 0.
  279. * If set to 0, the stack will drop UDP packets that have their checksum value
  280. * set to 0.
  281. */
  282. #ifndef ipconfigUDP_PASS_ZERO_CHECKSUM_PACKETS
  283. #define ipconfigUDP_PASS_ZERO_CHECKSUM_PACKETS 0
  284. #endif
  285. #ifndef ipconfigUDP_TIME_TO_LIVE
  286. #define ipconfigUDP_TIME_TO_LIVE 128
  287. #endif
  288. #ifndef ipconfigTCP_TIME_TO_LIVE
  289. #define ipconfigTCP_TIME_TO_LIVE 128
  290. #endif
  291. #ifndef ipconfigUDP_MAX_RX_PACKETS
  292. /* Make positive to define the maximum number of packets which will be buffered
  293. * for each UDP socket.
  294. * Can be overridden with the socket option FREERTOS_SO_UDP_MAX_RX_PACKETS
  295. */
  296. #define ipconfigUDP_MAX_RX_PACKETS 0U
  297. #endif
  298. #ifndef ipconfigUSE_DHCP
  299. #define ipconfigUSE_DHCP 1
  300. #endif
  301. #ifndef ipconfigUSE_DHCP_HOOK
  302. #define ipconfigUSE_DHCP_HOOK 0
  303. #endif
  304. #ifndef ipconfigDHCP_FALL_BACK_AUTO_IP
  305. /*
  306. * Only applicable when DHCP is in use:
  307. * If no DHCP server responds, use "Auto-IP" : the
  308. * device will allocate a random LinkLayer IP address.
  309. */
  310. #define ipconfigDHCP_FALL_BACK_AUTO_IP ( 0 )
  311. #endif
  312. #if ( ipconfigDHCP_FALL_BACK_AUTO_IP != 0 )
  313. #define ipconfigARP_USE_CLASH_DETECTION 1
  314. #endif
  315. #ifndef ipconfigARP_USE_CLASH_DETECTION
  316. #define ipconfigARP_USE_CLASH_DETECTION 0
  317. #endif
  318. #ifndef ipconfigNETWORK_MTU
  319. #define ipconfigNETWORK_MTU 1500
  320. #else
  321. #if ipconfigNETWORK_MTU > ( SIZE_MAX >> 1 )
  322. #undef ipconfigNETWORK_MTU
  323. #define ipconfigNETWORK_MTU ( SIZE_MAX >> 1 )
  324. #endif
  325. #endif
  326. #ifndef ipconfigTCP_MSS
  327. #define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) )
  328. #endif
  329. /* Each TCP socket has circular stream buffers for Rx and Tx, which
  330. * have a fixed maximum size.
  331. * The defaults for these size are defined here, although
  332. * they can be overridden at runtime by using the setsockopt() call */
  333. #ifndef ipconfigTCP_RX_BUFFER_LENGTH
  334. #define ipconfigTCP_RX_BUFFER_LENGTH ( 4U * ipconfigTCP_MSS ) /* defaults to 5840 bytes */
  335. #endif
  336. /* Define the size of Tx stream buffer for TCP sockets */
  337. #ifndef ipconfigTCP_TX_BUFFER_LENGTH
  338. #define ipconfigTCP_TX_BUFFER_LENGTH ( 4U * ipconfigTCP_MSS ) /* defaults to 5840 bytes */
  339. #endif
  340. #ifndef ipconfigMAXIMUM_DISCOVER_TX_PERIOD
  341. #ifdef _WINDOWS_
  342. #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 999U ) )
  343. #else
  344. #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 30000U ) )
  345. #endif /* _WINDOWS_ */
  346. #endif /* ipconfigMAXIMUM_DISCOVER_TX_PERIOD */
  347. #if ( ipconfigUSE_DNS == 0 )
  348. /* The DNS module will not be included. */
  349. #if ( ( ipconfigUSE_LLMNR != 0 ) || ( ipconfigUSE_NBNS != 0 ) )
  350. /* LLMNR and NBNS depend on DNS because those protocols share a lot of code. */
  351. #error When either LLMNR or NBNS is used, ipconfigUSE_DNS must be defined
  352. #endif
  353. #endif
  354. #ifndef ipconfigUSE_DNS
  355. #define ipconfigUSE_DNS 1
  356. #endif
  357. #ifndef ipconfigDNS_REQUEST_ATTEMPTS
  358. #define ipconfigDNS_REQUEST_ATTEMPTS 5
  359. #endif
  360. #ifndef ipconfigUSE_DNS_CACHE
  361. #define ipconfigUSE_DNS_CACHE 0
  362. #endif
  363. #if ( ipconfigUSE_DNS_CACHE != 0 )
  364. #ifndef ipconfigDNS_CACHE_NAME_LENGTH
  365. /* Per https://tools.ietf.org/html/rfc1035, 253 is the maximum string length
  366. * of a DNS name. The following default accounts for a null terminator. */
  367. #define ipconfigDNS_CACHE_NAME_LENGTH 254U
  368. #endif
  369. #ifndef ipconfigDNS_CACHE_ENTRIES
  370. #define ipconfigDNS_CACHE_ENTRIES 1
  371. #endif
  372. #endif /* ipconfigUSE_DNS_CACHE != 0 */
  373. /* When accessing services which have multiple IP addresses, setting this
  374. * greater than 1 can improve reliability by returning different IP address
  375. * answers on successive calls to FreeRTOS_gethostbyname(). */
  376. #ifndef ipconfigDNS_CACHE_ADDRESSES_PER_ENTRY
  377. #define ipconfigDNS_CACHE_ADDRESSES_PER_ENTRY 1
  378. #endif
  379. #ifndef ipconfigCHECK_IP_QUEUE_SPACE
  380. #define ipconfigCHECK_IP_QUEUE_SPACE 0
  381. #endif
  382. #ifndef ipconfigUSE_LLMNR
  383. /* Include support for LLMNR: Link-local Multicast Name Resolution (non-Microsoft) */
  384. #define ipconfigUSE_LLMNR ( 0 )
  385. #endif
  386. #ifndef ipconfigREPLY_TO_INCOMING_PINGS
  387. #define ipconfigREPLY_TO_INCOMING_PINGS 1
  388. #endif
  389. #ifndef ipconfigSUPPORT_OUTGOING_PINGS
  390. #define ipconfigSUPPORT_OUTGOING_PINGS 1
  391. #endif
  392. #ifndef ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES
  393. #define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1
  394. #endif
  395. #ifndef ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES
  396. #define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1
  397. #endif
  398. #ifndef configINCLUDE_TRACE_RELATED_CLI_COMMANDS
  399. #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS 0
  400. #else
  401. #define ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS configINCLUDE_TRACE_RELATED_CLI_COMMANDS
  402. #endif
  403. #ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM
  404. #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM ( 0 )
  405. #endif
  406. #ifndef ipconfigETHERNET_DRIVER_FILTERS_PACKETS
  407. #define ipconfigETHERNET_DRIVER_FILTERS_PACKETS ( 0 )
  408. #endif
  409. #ifndef ipconfigWATCHDOG_TIMER
  410. /* This macro will be called in every loop the IP-task makes. It may be
  411. * replaced by user-code that triggers a watchdog */
  412. #define ipconfigWATCHDOG_TIMER()
  413. #endif
  414. #ifndef ipconfigUSE_CALLBACKS
  415. #define ipconfigUSE_CALLBACKS ( 0 )
  416. #endif
  417. #if ( ipconfigUSE_CALLBACKS != 0 )
  418. #ifndef ipconfigIS_VALID_PROG_ADDRESS
  419. /* Replace this macro with a test returning non-zero if the memory pointer to by x
  420. * is valid memory which can contain executable code
  421. * In fact this is an extra safety measure: if a handler points to invalid memory,
  422. * it will not be called
  423. */
  424. #define ipconfigIS_VALID_PROG_ADDRESS( x ) ( ( x ) != NULL )
  425. #endif
  426. #endif
  427. #ifndef ipconfigHAS_INLINE_FUNCTIONS
  428. #define ipconfigHAS_INLINE_FUNCTIONS ( 1 )
  429. #endif
  430. #ifndef portINLINE
  431. #define portINLINE inline
  432. #endif
  433. #ifndef ipconfigZERO_COPY_TX_DRIVER
  434. /* When non-zero, the buffers passed to the SEND routine may be passed
  435. * to DMA. As soon as sending is ready, the buffers must be released by
  436. * calling vReleaseNetworkBufferAndDescriptor(), */
  437. #define ipconfigZERO_COPY_TX_DRIVER ( 0 )
  438. #endif
  439. #ifndef ipconfigZERO_COPY_RX_DRIVER
  440. /* This define doesn't mean much to the driver, except that it makes
  441. * sure that pxPacketBuffer_to_NetworkBuffer() will be included. */
  442. #define ipconfigZERO_COPY_RX_DRIVER ( 0 )
  443. #endif
  444. #ifndef ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM
  445. #define ipconfigDRIVER_INCLUDED_TX_IP_CHECKSUM 0
  446. #endif
  447. #ifndef ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM
  448. #define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 0
  449. #endif
  450. #ifndef ipconfigDHCP_REGISTER_HOSTNAME
  451. #define ipconfigDHCP_REGISTER_HOSTNAME 0
  452. #endif
  453. #ifndef ipconfigSOCKET_HAS_USER_SEMAPHORE
  454. #define ipconfigSOCKET_HAS_USER_SEMAPHORE 0
  455. #endif
  456. #ifndef ipconfigSOCKET_HAS_USER_WAKE_CALLBACK
  457. #define ipconfigSOCKET_HAS_USER_WAKE_CALLBACK 0
  458. #endif
  459. #ifndef ipconfigSUPPORT_SELECT_FUNCTION
  460. #define ipconfigSUPPORT_SELECT_FUNCTION 0
  461. #endif
  462. #ifndef ipconfigTCP_KEEP_ALIVE
  463. #define ipconfigTCP_KEEP_ALIVE 0
  464. #endif
  465. #ifndef ipconfigDNS_USE_CALLBACKS
  466. #define ipconfigDNS_USE_CALLBACKS 0
  467. #endif
  468. #ifndef ipconfigSUPPORT_SIGNALS
  469. #define ipconfigSUPPORT_SIGNALS 0
  470. #endif
  471. #ifndef ipconfigUSE_NBNS
  472. #define ipconfigUSE_NBNS 0
  473. #endif
  474. /* As an attack surface reduction for ports that listen for inbound
  475. * connections, hang protection can help reduce the impact of SYN floods. */
  476. #ifndef ipconfigTCP_HANG_PROTECTION
  477. #define ipconfigTCP_HANG_PROTECTION 1
  478. #endif
  479. /* Non-activity timeout is expressed in seconds. */
  480. #ifndef ipconfigTCP_HANG_PROTECTION_TIME
  481. #define ipconfigTCP_HANG_PROTECTION_TIME 30U
  482. #endif
  483. #ifndef ipconfigTCP_IP_SANITY
  484. #define ipconfigTCP_IP_SANITY 0
  485. #endif
  486. #ifndef ipconfigARP_STORES_REMOTE_ADDRESSES
  487. #define ipconfigARP_STORES_REMOTE_ADDRESSES 0
  488. #endif
  489. #ifndef ipconfigBUFFER_PADDING
  490. /* Expert option: define a value for 'ipBUFFER_PADDING'.
  491. * When 'ipconfigBUFFER_PADDING' equals 0,
  492. * 'ipBUFFER_PADDING' will get a default value of 8 + 2 bytes. */
  493. #define ipconfigBUFFER_PADDING 0U
  494. #endif
  495. #ifndef ipconfigPACKET_FILLER_SIZE
  496. #define ipconfigPACKET_FILLER_SIZE 2U
  497. #endif
  498. #ifndef ipconfigSELECT_USES_NOTIFY
  499. #define ipconfigSELECT_USES_NOTIFY 0
  500. #endif
  501. #endif /* FREERTOS_DEFAULT_IP_CONFIG_H */