diff options
Diffstat (limited to 'FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h')
-rw-r--r-- | FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h | 85 |
1 files changed, 64 insertions, 21 deletions
diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h index d23410f5f..7194df3ee 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include/FreeRTOSIPConfigDefaults.h @@ -1,5 +1,5 @@ /* - * FreeRTOS+TCP V2.2.0 + * FreeRTOS+TCP V2.2.1 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a copy of @@ -36,6 +36,10 @@ will be removed. */ /* This file provides default values for configuration options that are missing from the FreeRTOSIPConfig.h configuration header file. */ +/* These macros are used to define away static keyword for CBMC proofs */ +#ifndef _static + #define _static static +#endif /* Ensure defined configuration constants are using the most up to date naming. */ #ifdef tcpconfigIP_TIME_TO_LIVE @@ -157,7 +161,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ * This macro will only be used if FreeRTOS_debug_printf() is defined for logging */ #ifndef ipconfigTCP_MAY_LOG_PORT - #define ipconfigTCP_MAY_LOG_PORT(xPort) ( ( xPort ) != 23u ) + #define ipconfigTCP_MAY_LOG_PORT(xPort) ( ( xPort ) != 23U ) #endif @@ -171,11 +175,11 @@ from the FreeRTOSIPConfig.h configuration header file. */ #ifndef ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS - #define ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) + #define ipconfigDNS_RECEIVE_BLOCK_TIME_TICKS pdMS_TO_TICKS( 5000U ) #endif #ifndef ipconfigDNS_SEND_BLOCK_TIME_TICKS - #define ipconfigDNS_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500u ) + #define ipconfigDNS_SEND_BLOCK_TIME_TICKS pdMS_TO_TICKS( 500U ) #endif /* * FreeRTOS debug logging routine (proposal) @@ -196,7 +200,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif /* ifdef ipconfigHAS_DEBUG_PRINTF */ #ifndef FreeRTOS_debug_printf - #define FreeRTOS_debug_printf( MSG ) do{} while(0) + #define FreeRTOS_debug_printf( MSG ) do{} while( ipFALSE_BOOL ) #define ipconfigHAS_DEBUG_PRINTF 0 #endif @@ -217,7 +221,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif /* ifdef ipconfigHAS_PRINTF */ #ifndef FreeRTOS_printf - #define FreeRTOS_printf( MSG ) do{} while(0) + #define FreeRTOS_printf( MSG ) do{} while( ipFALSE_BOOL ) #define ipconfigHAS_PRINTF 0 #endif @@ -227,7 +231,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ * An example of this is the netstat command, which produces many lines of logging */ #ifndef FreeRTOS_flush_logging - #define FreeRTOS_flush_logging( ) do{} while(0) + #define FreeRTOS_flush_logging( ) do{} while( ipFALSE_BOOL ) #endif /* Malloc functions. Within most applications of FreeRTOS, the couple @@ -274,7 +278,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif #ifndef ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS - #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( pdMS_TO_TICKS( 20 ) ) + #define ipconfigUDP_MAX_SEND_BLOCK_TIME_TICKS ( pdMS_TO_TICKS( 20U ) ) #endif #ifndef ipconfigARP_CACHE_ENTRIES @@ -282,11 +286,11 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif #ifndef ipconfigMAX_ARP_RETRANSMISSIONS - #define ipconfigMAX_ARP_RETRANSMISSIONS ( 5u ) + #define ipconfigMAX_ARP_RETRANSMISSIONS ( 5U ) #endif #ifndef ipconfigMAX_ARP_AGE - #define ipconfigMAX_ARP_AGE 150u + #define ipconfigMAX_ARP_AGE 150U #endif #ifndef ipconfigUSE_ARP_REVERSED_LOOKUP @@ -301,6 +305,10 @@ from the FreeRTOSIPConfig.h configuration header file. */ #define ipconfigINCLUDE_FULL_INET_ADDR 1 #endif +#ifndef ipconfigUSE_LINKED_RX_MESSAGES + #define ipconfigUSE_LINKED_RX_MESSAGES 0 +#endif + #ifndef ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS #define ipconfigNUM_NETWORK_BUFFER_DESCRIPTORS 45 #endif @@ -310,7 +318,30 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif #ifndef ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND - #define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 + #define ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND 1 +#endif + +/* Configuration to control whether packets with IP options, + * received over the network, should be passed up to the + * software stack OR should be dropped. + * If set to 1, the stack accepts IP packets that contain IP options, but does + * not process the options (IP options are not supported). + * If set to 0, the stack will drop IP packets that contain IP options. + */ +#ifndef ipconfigIP_PASS_PACKETS_WITH_IP_OPTIONS + #define ipconfigIP_PASS_PACKETS_WITH_IP_OPTIONS 1 +#endif + +/* Configuration to control whether UDP packets with + * checksum value of zero should be passed up the software + * stack OR should be dropped. + * If set to 1, the stack will accept UDP packets that have their checksum + * value set to 0. + * If set to 0, the stack will drop UDP packets that have their checksum value + * set to 0. + */ +#ifndef ipconfigUDP_PASS_ZERO_CHECKSUM_PACKETS + #define ipconfigUDP_PASS_ZERO_CHECKSUM_PACKETS 0 #endif #ifndef ipconfigUDP_TIME_TO_LIVE @@ -326,7 +357,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ * for each UDP socket. * Can be overridden with the socket option FREERTOS_SO_UDP_MAX_RX_PACKETS */ - #define ipconfigUDP_MAX_RX_PACKETS 0u + #define ipconfigUDP_MAX_RX_PACKETS 0U #endif #ifndef ipconfigUSE_DHCP @@ -359,7 +390,7 @@ from the FreeRTOSIPConfig.h configuration header file. */ #endif #ifndef ipconfigTCP_MSS - #define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ipSIZE_OF_IPv4_HEADER - ipSIZE_OF_TCP_HEADER ) + #define ipconfigTCP_MSS ( ipconfigNETWORK_MTU - ( ipSIZE_OF_IPv4_HEADER + ipSIZE_OF_TCP_HEADER ) ) #endif /* Each TCP socket has circular stream buffers for Rx and Tx, which @@ -367,19 +398,19 @@ from the FreeRTOSIPConfig.h configuration header file. */ * The defaults for these size are defined here, although * they can be overridden at runtime by using the setsockopt() call */ #ifndef ipconfigTCP_RX_BUFFER_LENGTH - #define ipconfigTCP_RX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ + #define ipconfigTCP_RX_BUFFER_LENGTH ( 4U * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ #endif /* Define the size of Tx stream buffer for TCP sockets */ #ifndef ipconfigTCP_TX_BUFFER_LENGTH -# define ipconfigTCP_TX_BUFFER_LENGTH ( 4u * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ +# define ipconfigTCP_TX_BUFFER_LENGTH ( 4U * ipconfigTCP_MSS ) /* defaults to 5840 bytes */ #endif #ifndef ipconfigMAXIMUM_DISCOVER_TX_PERIOD #ifdef _WINDOWS_ - #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 999 ) ) + #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 999U ) ) #else - #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 30000 ) ) + #define ipconfigMAXIMUM_DISCOVER_TX_PERIOD ( pdMS_TO_TICKS( 30000U ) ) #endif /* _WINDOWS_ */ #endif /* ipconfigMAXIMUM_DISCOVER_TX_PERIOD */ @@ -407,14 +438,22 @@ from the FreeRTOSIPConfig.h configuration header file. */ #ifndef ipconfigDNS_CACHE_NAME_LENGTH /* Per https://tools.ietf.org/html/rfc1035, 253 is the maximum string length of a DNS name. The following default accounts for a null terminator. */ - #define ipconfigDNS_CACHE_NAME_LENGTH 254 + #define ipconfigDNS_CACHE_NAME_LENGTH 254U #endif #ifndef ipconfigDNS_CACHE_ENTRIES #define ipconfigDNS_CACHE_ENTRIES 1 #endif + #endif /* ipconfigUSE_DNS_CACHE != 0 */ +/* When accessing services which have multiple IP addresses, setting this +greater than 1 can improve reliability by returning different IP address +answers on successive calls to FreeRTOS_gethostbyname(). */ +#ifndef ipconfigDNS_CACHE_ADDRESSES_PER_ENTRY + #define ipconfigDNS_CACHE_ADDRESSES_PER_ENTRY 1 +#endif + #ifndef ipconfigCHECK_IP_QUEUE_SPACE #define ipconfigCHECK_IP_QUEUE_SPACE 0 #endif @@ -544,7 +583,7 @@ connections, hang protection can help reduce the impact of SYN floods. */ /* Non-activity timeout is expressed in seconds. */ #ifndef ipconfigTCP_HANG_PROTECTION_TIME - #define ipconfigTCP_HANG_PROTECTION_TIME 30 + #define ipconfigTCP_HANG_PROTECTION_TIME 30U #endif #ifndef ipconfigTCP_IP_SANITY @@ -559,11 +598,15 @@ connections, hang protection can help reduce the impact of SYN floods. */ /* Expert option: define a value for 'ipBUFFER_PADDING'. When 'ipconfigBUFFER_PADDING' equals 0, 'ipBUFFER_PADDING' will get a default value of 8 + 2 bytes. */ - #define ipconfigBUFFER_PADDING 0 + #define ipconfigBUFFER_PADDING 0U #endif #ifndef ipconfigPACKET_FILLER_SIZE - #define ipconfigPACKET_FILLER_SIZE 2 + #define ipconfigPACKET_FILLER_SIZE 2U +#endif + +#ifndef ipconfigSELECT_USES_NOTIFY + #define ipconfigSELECT_USES_NOTIFY 0 #endif #endif /* FREERTOS_DEFAULT_IP_CONFIG_H */ |