+++ /dev/null
-/*\r
- * FreeRTOS Kernel V10.2.1\r
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.\r
- *\r
- * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
- * this software and associated documentation files (the "Software"), to deal in\r
- * the Software without restriction, including without limitation the rights to\r
- * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
- * the Software, and to permit persons to whom the Software is furnished to do so,\r
- * subject to the following conditions:\r
- *\r
- * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software.\r
- *\r
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
- * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
- * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
- * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
- *\r
- * http://www.FreeRTOS.org\r
- * http://aws.amazon.com/freertos\r
- *\r
- * 1 tab == 4 spaces!\r
- */\r
-\r
-\r
-/*****************************************************************************\r
- *\r
- * See the following URL for configuration information.\r
- * http://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_IP_Configuration.html\r
- *\r
- *****************************************************************************/\r
-\r
-#ifndef FREERTOS_IP_CONFIG_H\r
-#define FREERTOS_IP_CONFIG_H\r
-\r
-/* Prototype for the function used to print out. In this case it prints to the\r
-console before the network is connected then a UDP port after the network has\r
-connected. */\r
-extern void vLoggingPrintf( const char *pcFormatString, ... );\r
-\r
-/* Set to 1 to print out debug messages. If ipconfigHAS_DEBUG_PRINTF is set to\r
-1 then FreeRTOS_debug_printf should be defined to the function used to print\r
-out the debugging messages. */\r
-#define ipconfigHAS_DEBUG_PRINTF 0\r
-#if( ipconfigHAS_DEBUG_PRINTF == 1 )\r
- #define FreeRTOS_debug_printf(X) vLoggingPrintf X\r
-#endif\r
-\r
-/* Set to 1 to print out non debugging messages, for example the output of the\r
-FreeRTOS_netstat() command, and ping replies. If ipconfigHAS_PRINTF is set to 1\r
-then FreeRTOS_printf should be set to the function used to print out the\r
-messages. */\r
-#define ipconfigHAS_PRINTF 1\r
-#if( ipconfigHAS_PRINTF == 1 )\r
- #define FreeRTOS_printf(X) vLoggingPrintf X\r
-#endif\r
-\r
-/* Define the byte order of the target MCU (the MCU FreeRTOS+TCP is executing\r
-on). Valid options are pdFREERTOS_BIG_ENDIAN and pdFREERTOS_LITTLE_ENDIAN. */\r
-#define ipconfigBYTE_ORDER pdFREERTOS_LITTLE_ENDIAN\r
-\r
-/* If the network card/driver includes checksum offloading (IP/TCP/UDP checksums)\r
-then set ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM to 1 to prevent the software\r
-stack repeating the checksum calculations. */\r
-#define ipconfigDRIVER_INCLUDED_RX_IP_CHECKSUM 1\r
-\r
-/* Several API's will block until the result is known, or the action has been\r
-performed, for example FreeRTOS_send() and FreeRTOS_recv(). The timeouts can be\r
-set per socket, using setsockopt(). If not set, the times below will be\r
-used as defaults. */\r
-#define ipconfigSOCK_DEFAULT_RECEIVE_BLOCK_TIME ( 5000 )\r
-#define ipconfigSOCK_DEFAULT_SEND_BLOCK_TIME ( 5000 )\r
-\r
-/* Include support for LLMNR: Link-local Multicast Name Resolution\r
-(non-Microsoft) */\r
-#define ipconfigUSE_LLMNR ( 0 )\r
-\r
-/* Include support for NBNS: NetBIOS Name Service (Microsoft) */\r
-#define ipconfigUSE_NBNS ( 0 )\r
-\r
-/* Include support for DNS caching. For TCP, having a small DNS cache is very\r
-useful. When a cache is present, ipconfigDNS_REQUEST_ATTEMPTS can be kept low\r
-and also DNS may use small timeouts. If a DNS reply comes in after the DNS\r
-socket has been destroyed, the result will be stored into the cache. The next\r
-call to FreeRTOS_gethostbyname() will return immediately, without even creating\r
-a socket. */\r
-#define ipconfigUSE_DNS_CACHE ( 1 )\r
-#define ipconfigDNS_CACHE_NAME_LENGTH ( 32 )\r
-#define ipconfigDNS_CACHE_ENTRIES ( 4 )\r
-#define ipconfigDNS_REQUEST_ATTEMPTS ( 2 )\r
-\r
-/* The IP stack executes it its own task (although any application task can make\r
-use of its services through the published sockets API). ipconfigUDP_TASK_PRIORITY\r
-sets the priority of the task that executes the IP stack. The priority is a\r
-standard FreeRTOS task priority so can take any value from 0 (the lowest\r
-priority) to (configMAX_PRIORITIES - 1) (the highest priority).\r
-configMAX_PRIORITIES is a standard FreeRTOS configuration parameter defined in\r
-FreeRTOSConfig.h, not FreeRTOSIPConfig.h. Consideration needs to be given as to\r
-the priority assigned to the task executing the IP stack relative to the\r
-priority assigned to tasks that use the IP stack. */\r
-#define ipconfigIP_TASK_PRIORITY ( configMAX_PRIORITIES - 2 )\r
-\r
-/* The size, in words (not bytes), of the stack allocated to the FreeRTOS+TCP\r
-task. This setting is less important when the FreeRTOS Win32 simulator is used\r
-as the Win32 simulator only stores a fixed amount of information on the task\r
-stack. FreeRTOS includes optional stack overflow detection, see:\r
-http://www.freertos.org/Stacks-and-stack-overflow-checking.html */\r
-#define ipconfigIP_TASK_STACK_SIZE_WORDS ( configMINIMAL_STACK_SIZE * 5 )\r
-\r
-/* ipconfigRAND32() is called by the IP stack to generate random numbers for\r
-things such as a DHCP transaction number or initial sequence number. Random\r
-number generation is performed via this macro to allow applications to use their\r
-own random number generation method. For example, it might be possible to\r
-generate a random number by sampling noise on an analogue input. */\r
-extern UBaseType_t uxRand();\r
-#define ipconfigRAND32() uxRand()\r
-\r
-/* If ipconfigUSE_NETWORK_EVENT_HOOK is set to 1 then FreeRTOS+TCP will call the\r
-network event hook at the appropriate times. If ipconfigUSE_NETWORK_EVENT_HOOK\r
-is not set to 1 then the network event hook will never be called. See\r
-http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/API/vApplicationIPNetworkEventHook.shtml\r
-*/\r
-#define ipconfigUSE_NETWORK_EVENT_HOOK 1\r
-\r
-/* Sockets have a send block time attribute. If FreeRTOS_sendto() is called but\r
-a network buffer cannot be obtained then the calling task is held in the Blocked\r
-state (so other tasks can continue to executed) until either a network buffer\r
-becomes available or the send block time expires. If the send block time expires\r
-then the send operation is aborted. The maximum allowable send block time is\r
-capped to the value set by ipconfigMAX_SEND_BLOCK_TIME_TICKS. Capping the\r
-maximum allowable send block time prevents prevents a deadlock occurring when\r
-all the network buffers are in use and the tasks that process (and subsequently\r
-free) the network buffers are themselves blocked waiting for a network buffer.\r
-ipconfigMAX_SEND_BLOCK_TIME_TICKS is specified in RTOS ticks. A time in\r
-milliseconds can be converted to a time in ticks by dividing the time in\r
-milliseconds by portTICK_PERIOD_MS. */\r
-#define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( 5000 / portTICK_PERIOD_MS )\r
-\r
-/* If ipconfigUSE_DHCP is 1 then FreeRTOS+TCP will attempt to retrieve an IP\r
-address, netmask, DNS server address and gateway address from a DHCP server. If\r
-ipconfigUSE_DHCP is 0 then FreeRTOS+TCP will use a static IP address. The\r
-stack will revert to using the static IP address even when ipconfigUSE_DHCP is\r
-set to 1 if a valid configuration cannot be obtained from a DHCP server for any\r
-reason. The static configuration used is that passed into the stack by the\r
-FreeRTOS_IPInit() function call. */\r
-#define ipconfigUSE_DHCP 0\r
-\r
-/* When ipconfigUSE_DHCP is set to 1, DHCP requests will be sent out at\r
-increasing time intervals until either a reply is received from a DHCP server\r
-and accepted, or the interval between transmissions reaches\r
-ipconfigMAXIMUM_DISCOVER_TX_PERIOD. The IP stack will revert to using the\r
-static IP address passed as a parameter to FreeRTOS_IPInit() if the\r
-re-transmission time interval reaches ipconfigMAXIMUM_DISCOVER_TX_PERIOD without\r
-a DHCP reply being received. */\r
-#define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( 120000 / portTICK_PERIOD_MS )\r
-\r
-/* The ARP cache is a table that maps IP addresses to MAC addresses. The IP\r
-stack can only send a UDP message to a remove IP address if it knowns the MAC\r
-address associated with the IP address, or the MAC address of the router used to\r
-contact the remote IP address. When a UDP message is received from a remote IP\r
-address the MAC address and IP address are added to the ARP cache. When a UDP\r
-message is sent to a remote IP address that does not already appear in the ARP\r
-cache then the UDP message is replaced by a ARP message that solicits the\r
-required MAC address information. ipconfigARP_CACHE_ENTRIES defines the maximum\r
-number of entries that can exist in the ARP table at any one time. */\r
-#define ipconfigARP_CACHE_ENTRIES 6\r
-\r
-/* ARP requests that do not result in an ARP response will be re-transmitted a\r
-maximum of ipconfigMAX_ARP_RETRANSMISSIONS times before the ARP request is\r
-aborted. */\r
-#define ipconfigMAX_ARP_RETRANSMISSIONS ( 5 )\r
-\r
-/* ipconfigMAX_ARP_AGE defines the maximum time between an entry in the ARP\r
-table being created or refreshed and the entry being removed because it is stale.\r
-New ARP requests are sent for ARP cache entries that are nearing their maximum\r
-age. ipconfigMAX_ARP_AGE is specified in tens of seconds, so a value of 150 is\r
-equal to 1500 seconds (or 25 minutes). */\r
-#define ipconfigMAX_ARP_AGE 150\r
-\r
-/* Implementing FreeRTOS_inet_addr() necessitates the use of string handling\r
-routines, which are relatively large. To save code space the full\r
-FreeRTOS_inet_addr() implementation is made optional, and a smaller and faster\r
-alternative called FreeRTOS_inet_addr_quick() is provided. FreeRTOS_inet_addr()\r
-takes an IP in decimal dot format (for example, "192.168.0.1") as its parameter.\r
-FreeRTOS_inet_addr_quick() takes an IP address as four separate numerical octets\r
-(for example, 192, 168, 0, 1) as its parameters. If\r
-ipconfigINCLUDE_FULL_INET_ADDR is set to 1 then both FreeRTOS_inet_addr() and\r
-FreeRTOS_indet_addr_quick() are available. If ipconfigINCLUDE_FULL_INET_ADDR is\r
-not set to 1 then only FreeRTOS_indet_addr_quick() is available. */\r
-#define ipconfigINCLUDE_FULL_INET_ADDR 1\r
-\r
-/* ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS defines the total number of network buffer that\r
-are available to the IP stack. The total number of network buffers is limited\r
-to ensure the total amount of RAM that can be consumed by the IP stack is capped\r
-to a pre-determinable value. */\r
-#define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 60\r
-\r
-/* A FreeRTOS queue is used to send events from application tasks to the IP\r
-stack. ipconfigEVENT_QUEUE_LENGTH sets the maximum number of events that can\r
-be queued for processing at any one time. The event queue must be a minimum of\r
-5 greater than the total number of network buffers. */\r
-#define ipconfigEVENT_QUEUE_LENGTH ( ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS + 5 )\r
-\r
-/* The address of a socket is the combination of its IP address and its port\r
-number. FreeRTOS_bind() is used to manually allocate a port number to a socket\r
-(to 'bind' the socket to a port), but manual binding is not normally necessary\r
-for client sockets (those sockets that initiate outgoing connections rather than\r
-wait for incoming connections on a known port number). If\r
-ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 1 then calling\r
-FreeRTOS_sendto() on a socket that has not yet been bound will result in the IP\r
-stack automatically binding the socket to a port number from the range\r
-socketAUTO_PORT_ALLOCATION_START_NUMBER to 0xffff. If\r
-ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND is set to 0 then calling FreeRTOS_sendto()\r
-on a socket that has not yet been bound will result in the send operation being\r
-aborted. */\r
-#define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1\r
-\r
-/* Defines the Time To Live (TTL) values used in outgoing UDP packets. */\r
-#define ipconfigUDP_TIME_TO_LIVE 128\r
-#define ipconfigTCP_TIME_TO_LIVE 128 /* also defined in FreeRTOSIPConfigDefaults.h */\r
-\r
-/* USE_TCP: Use TCP and all its features */\r
-#define ipconfigUSE_TCP ( 1 )\r
-\r
-/* USE_WIN: Let TCP use windowing mechanism. */\r
-#define ipconfigUSE_TCP_WIN ( 1 )\r
-\r
-/* The MTU is the maximum number of bytes the payload of a network frame can\r
-contain. For normal Ethernet V2 frames the maximum MTU is 1500. Setting a\r
-lower value can save RAM, depending on the buffer management scheme used. If\r
-ipconfigCAN_FRAGMENT_OUTGOING_PACKETS is 1 then (ipconfigNETWORK_MTU - 28) must\r
-be divisible by 8. */\r
-#define ipconfigNETWORK_MTU 1200\r
-\r
-/* Set ipconfigUSE_DNS to 1 to include a basic DNS client/resolver. DNS is used\r
-through the FreeRTOS_gethostbyname() API function. */\r
-#define ipconfigUSE_DNS 1\r
-\r
-/* If ipconfigREPLY_TO_INCOMING_PINGS is set to 1 then the IP stack will\r
-generate replies to incoming ICMP echo (ping) requests. */\r
-#define ipconfigREPLY_TO_INCOMING_PINGS 1\r
-\r
-/* If ipconfigSUPPORT_OUTGOING_PINGS is set to 1 then the\r
-FreeRTOS_SendPingRequest() API function is available. */\r
-#define ipconfigSUPPORT_OUTGOING_PINGS 0\r
-\r
-/* If ipconfigSUPPORT_SELECT_FUNCTION is set to 1 then the FreeRTOS_select()\r
-(and associated) API function is available. */\r
-#define ipconfigSUPPORT_SELECT_FUNCTION 1\r
-\r
-/* If ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES is set to 1 then Ethernet frames\r
-that are not in Ethernet II format will be dropped. This option is included for\r
-potential future IP stack developments. */\r
-#define ipconfigFILTER_OUT_NON_ETHERNET_II_FRAMES 1\r
-\r
-/* If ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES is set to 1 then it is the\r
-responsibility of the Ethernet interface to filter out packets that are of no\r
-interest. If the Ethernet interface does not implement this functionality, then\r
-set ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES to 0 to have the IP stack\r
-perform the filtering instead (it is much less efficient for the stack to do it\r
-because the packet will already have been passed into the stack). If the\r
-Ethernet driver does all the necessary filtering in hardware then software\r
-filtering can be removed by using a value other than 1 or 0. */\r
-#define ipconfigETHERNET_DRIVER_FILTERS_FRAME_TYPES 1\r
-\r
-/* The windows simulator cannot really simulate MAC interrupts, and needs to\r
-block occasionally to allow other tasks to run. */\r
-#define configWINDOWS_MAC_INTERRUPT_SIMULATOR_DELAY ( 20 / portTICK_PERIOD_MS )\r
-\r
-/* Advanced only: in order to access 32-bit fields in the IP packets with\r
-32-bit memory instructions, all packets will be stored 32-bit-aligned, plus 16-bits.\r
-This has to do with the contents of the IP-packets: all 32-bit fields are\r
-32-bit-aligned, plus 16-bit(!) */\r
-#define ipconfigPACKET_FILLER_SIZE 2\r
-\r
-/* Define the size of the pool of TCP window descriptors. On the average, each\r
-TCP socket will use up to 2 x 6 descriptors, meaning that it can have 2 x 6\r
-outstanding packets (for Rx and Tx). When using up to 10 TP sockets\r
-simultaneously, one could define TCP_WIN_SEG_COUNT as 120. */\r
-#define ipconfigTCP_WIN_SEG_COUNT 240\r
-\r
-/* Each TCP socket has a circular buffers for Rx and Tx, which have a fixed\r
-maximum size. Define the size of Rx buffer for TCP sockets. */\r
-#define ipconfigTCP_RX_BUFFER_LENGTH ( 1000 )\r
-\r
-/* Define the size of Tx buffer for TCP sockets. */\r
-#define ipconfigTCP_TX_BUFFER_LENGTH ( 1000 )\r
-\r
-/* When using call-back handlers, the driver may check if the handler points to\r
-real program memory (RAM or flash) or just has a random non-zero value. */\r
-#define ipconfigIS_VALID_PROG_ADDRESS(x) ( (x) != NULL )\r
-\r
-/* Include support for TCP hang protection. All sockets in a connecting or\r
-disconnecting stage will timeout after a period of non-activity. */\r
-#define ipconfigTCP_HANG_PROTECTION ( 1 )\r
-#define ipconfigTCP_HANG_PROTECTION_TIME ( 30 )\r
-\r
-/* Include support for TCP keep-alive messages. */\r
-#define ipconfigTCP_KEEP_ALIVE ( 1 )\r
-#define ipconfigTCP_KEEP_ALIVE_INTERVAL ( 20 ) /* in seconds */\r
-\r
-#define portINLINE __inline\r
-\r
-#endif /* FREERTOS_IP_CONFIG_H */\r