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