Gleb Klochkov / Mbed OS Climatcontroll_Main

Dependencies:   esp8266-driver

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers fnet_stack_config.h Source File

fnet_stack_config.h

Go to the documentation of this file.
00001 /**************************************************************************
00002 *
00003 * Copyright 2011-2016 by Andrey Butok. FNET Community.
00004 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc.
00005 *
00006 ***************************************************************************
00007 *
00008 *  Licensed under the Apache License, Version 2.0 (the "License"); you may
00009 *  not use this file except in compliance with the License.
00010 *  You may obtain a copy of the License at
00011 *
00012 *  http://www.apache.org/licenses/LICENSE-2.0
00013 *
00014 *  Unless required by applicable law or agreed to in writing, software
00015 *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
00016 *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017 *  See the License for the specific language governing permissions and
00018 *  limitations under the License.
00019 *
00020 **********************************************************************/
00021 /*!
00022 *
00023 * @file fnet_stack_config.h
00024 *
00025 * @author Andrey Butok
00026 *
00027 * @brief Main TCP/IP stack default configuration file.
00028 *
00029 ***************************************************************************/
00030 
00031 /************************************************************************
00032  * !!!DO NOT MODIFY THIS FILE!!!
00033  ************************************************************************/
00034 
00035 #ifndef _FNET_STACK_CONFIG_H_
00036 
00037 #define _FNET_STACK_CONFIG_H_
00038 
00039 /*****************************************************************************
00040 *     IP6-specific parameters.
00041 ******************************************************************************/
00042 /*! @addtogroup fnet_platform_stack_ip6_config  */
00043 /*! @{ */
00044 
00045 /**************************************************************************/ /*!
00046  * @def     FNET_CFG_IP6
00047  * @brief   IPv6 protocol support:
00048  *               - @b @c 1 = is enabled.
00049  *               - @c 0 = is disabled (Default value).@n
00050  *
00051  * @see FNET_CFG_IP4
00052  * @showinitializer
00053  ******************************************************************************/
00054 #ifndef FNET_CFG_IP6
00055     #define FNET_CFG_IP6                        (0)
00056 #endif
00057 
00058 /**************************************************************************/ /*!
00059  * @def     FNET_CFG_ND6_NEIGHBOR_CACHE_SIZE
00060  * @brief   Maximum number of entries in neighbor cache (per interface).
00061  *
00062  * @note    A small cache size may result in an
00063  *          excessive number of Neighbor Discovery messages if entries are
00064  *          discarded and rebuilt in quick succession.
00065  * @showinitializer
00066  ******************************************************************************/
00067 #ifndef FNET_CFG_ND6_NEIGHBOR_CACHE_SIZE
00068     #define FNET_CFG_ND6_NEIGHBOR_CACHE_SIZE     (5u)
00069 #endif
00070 
00071 /**************************************************************************/ /*!
00072  * @def     FNET_CFG_ND6_PREFIX_LIST_SIZE
00073  * @brief   Maximum number of entries in the Prefix list (per interface).
00074  * @showinitializer
00075  ******************************************************************************/
00076 #ifndef FNET_CFG_ND6_PREFIX_LIST_SIZE
00077     #define FNET_CFG_ND6_PREFIX_LIST_SIZE       (4u)
00078 #endif
00079 
00080 /**************************************************************************/ /*!
00081  * @def     FNET_CFG_ND6_ROUTER_LIST_SIZE
00082  * @brief   Maximum number of entries in the Default Router list (per interface).
00083  *
00084  * @note    RFC4861: However, a host MUST retain at least two router
00085  *          addresses and SHOULD retain more.
00086  * @showinitializer
00087  ******************************************************************************/
00088 #ifndef FNET_CFG_ND6_ROUTER_LIST_SIZE
00089     #define FNET_CFG_ND6_ROUTER_LIST_SIZE       (2u)
00090 #endif
00091 
00092 /**************************************************************************/ /*!
00093  * @def     FNET_CFG_ND6_DAD_TRANSMITS
00094  * @brief   (RFC4862 5.1)The number of consecutive Neighbor
00095  *          Solicitation messages sent while performing Duplicate Address
00096  *          Detection on a tentative address. A value of zero indicates that
00097  *          Duplicate Address Detection is not performed on tentative
00098  *          addresses. A value of one indicates a single transmission with no
00099  *          follow-up retransmissions. @n
00100  *          Default is @c 1.
00101  * @showinitializer
00102  ******************************************************************************/
00103 #ifndef FNET_CFG_ND6_DAD_TRANSMITS
00104     #define FNET_CFG_ND6_DAD_TRANSMITS          (1u)
00105 #endif
00106 
00107 /**************************************************************************/ /*!
00108  * @def     FNET_CFG_ND6_RDNSS
00109  * @brief   Recursive DNS Server Option (RFC6106) support via router advertisemnt:
00110  *               - @b @c 1 = is enabled (Default value).
00111  *               - @c 0 = is disabled.@n
00112  * @see FNET_CFG_ND6_RDNSS_LIST_SIZE
00113  *
00114  * @showinitializer
00115  ******************************************************************************/
00116 #ifndef FNET_CFG_ND6_RDNSS
00117     #define FNET_CFG_ND6_RDNSS                  (1)
00118 #endif
00119 
00120 /**************************************************************************/ /*!
00121  * @def     FNET_CFG_ND6_RDNSS_LIST_SIZE
00122  * @brief   Maximum number of entries in the RDNSS address list (per interface).
00123  *
00124  * @note    RFC6106: Specified a sufficient number of RDNSS addresses as three.
00125  *
00126  * @see FNET_CFG_ND6_RDNSS
00127  * @showinitializer
00128  ******************************************************************************/
00129 #ifndef FNET_CFG_ND6_RDNSS_LIST_SIZE
00130     #define FNET_CFG_ND6_RDNSS_LIST_SIZE        (3u)
00131 #endif
00132 
00133 /**************************************************************************/ /*!
00134  * @def      FNET_CFG_IP6_FRAGMENTATION
00135  * @brief    IPv6 fragmentation:
00136  *               - @b @c 1 = is enabled (Default value). @n The IPv6 will attempt
00137  *                        to reassemble the IPv6 packet fragments and will be able to
00138  *                        generate fragmented IPv6 packets.
00139  *               - @c 0 = is disabled. The IPv6 will
00140  *                        silently discard the fragmented IPv6 packets..
00141  * @showinitializer
00142  ******************************************************************************/
00143 #ifndef FNET_CFG_IP6_FRAGMENTATION
00144     #define FNET_CFG_IP6_FRAGMENTATION          (1)
00145 #endif
00146 
00147 /**************************************************************************/ /*!
00148  * @def      FNET_CFG_IP6_PMTU_DISCOVERY
00149  * @brief    Path MTU Discovery for IPv6:
00150  *               - @b @c 1 = is enabled (Default value).
00151  *               - @c 0 = is disabled.
00152  * @showinitializer
00153  ******************************************************************************/
00154 #ifndef FNET_CFG_IP6_PMTU_DISCOVERY
00155     #define FNET_CFG_IP6_PMTU_DISCOVERY         (1)
00156 #endif
00157 
00158 /**************************************************************************/ /*!
00159  * @def      FNET_CFG_NETIF_IP6_ADDR_MAX
00160  * @brief    Maximum number of IPv6 addresses that can be bound to an interface.
00161  * @showinitializer
00162  ******************************************************************************/
00163 #ifndef FNET_CFG_NETIF_IP6_ADDR_MAX
00164     #define FNET_CFG_NETIF_IP6_ADDR_MAX         (5u)
00165 #endif
00166 
00167 /**************************************************************************/ /*!
00168  * @def      FNET_CFG_MLD
00169  * @brief    Multicast Listener Discovery (MLDv1) support:
00170  *               - @c 1 = is enabled. Its enabling is optional for multicast
00171  *                        traffic that takes place inside only one local network.
00172  *               - @b @c 0 = is disabled (Default value).
00173  *
00174  * @showinitializer
00175  ******************************************************************************/
00176 #ifndef FNET_CFG_MLD
00177     #define FNET_CFG_MLD                        (0)
00178 #endif
00179 
00180 
00181 /*! @} */
00182 
00183 /*! @addtogroup fnet_platform_stack_ip4_config  */
00184 /*! @{ */
00185 
00186 /**************************************************************************/ /*!
00187  * @def     FNET_CFG_IP4
00188  * @brief   IPv4 protocol support:
00189  *               - @b @c 1 = is enabled (Default value).
00190  *               - @c 0 = is disabled.@n
00191  *
00192  * @see FNET_CFG_IP6
00193  * @showinitializer
00194  ******************************************************************************/
00195 #ifndef FNET_CFG_IP4
00196     #define FNET_CFG_IP4                        (1)
00197 #endif
00198 
00199 /**************************************************************************/ /*!
00200  * @def      FNET_CFG_IP4_FRAGMENTATION
00201  * @brief    IP fragmentation:
00202  *               - @c 1 = is enabled. The IP will attempt
00203  *                        to reassemble the IP packet fragments and will be able to
00204  *                        generate fragmented IP packets.
00205  *               - @b @c 0 = is disabled (Default value). The IP will
00206  *                        silently discard the fragmented IP packets..
00207  * @showinitializer
00208  ******************************************************************************/
00209 #ifndef FNET_CFG_IP4_FRAGMENTATION
00210     #define FNET_CFG_IP4_FRAGMENTATION          (0)
00211 #endif
00212 
00213 /**************************************************************************/ /*!
00214  * @def      FNET_CFG_LOOPBACK_IP4_ADDR
00215  * @brief    Defines the IP address for the Loopback interface.
00216  *           By default it is set to 127.0.0.1.
00217  *           At runtime, it can be changed by @ref fnet_netif_set_ip4_addr().
00218  * @showinitializer
00219  ******************************************************************************/
00220 #ifndef FNET_CFG_LOOPBACK_IP4_ADDR
00221     #define FNET_CFG_LOOPBACK_IP4_ADDR   (FNET_IP4_ADDR_INIT(127U, 0U, 0U, 1U))
00222 #endif
00223 
00224 /**************************************************************************/ /*!
00225  * @def      FNET_CFG_IGMP
00226  * @brief    Internet Group Management Protocol (IGMP) support:
00227  *               - @c 1 = is enabled. It sets @ref FNET_CFG_MULTICAST to 1 automatically.
00228  *               - @b @c 0 = is disabled (Default value).@n
00229  * @see FNET_CFG_IGMP_VERSION
00230  * @showinitializer
00231  ******************************************************************************/
00232 #ifndef FNET_CFG_IGMP
00233     #define FNET_CFG_IGMP                   (0)
00234 #endif
00235 
00236 /**************************************************************************/ /*!
00237  * @def      FNET_CFG_IGMP_VERSION
00238  * @brief    Internet Group Management Protocol (IGMP) version:
00239  *               - @c 1 = IGMPv1 - RFC1112.
00240  *               - @b @c 2 = IGMPv2 - RFC2236 (Default value).@n
00241  * @see FNET_CFG_IGMP
00242  * @showinitializer
00243  ******************************************************************************/
00244 #ifndef FNET_CFG_IGMP_VERSION
00245     #define FNET_CFG_IGMP_VERSION           (2)
00246 #endif
00247 
00248 /*! @} */
00249 
00250 /*! @addtogroup fnet_stack_config */
00251 /*! @{ */
00252 
00253 /*****************************************************************************
00254 *     TCP/IP stack general parameters.
00255 ******************************************************************************/
00256 
00257 /**************************************************************************/ /*!
00258  * @def      FNET_CFG_ASSET
00259  * @brief    FNET_ASSERT() support:
00260  *               - @c 1 = is enabled.
00261  *               - @b @c 0 = is disabled (Default value).@n
00262  *           @n
00263  *           Asserts check that the given condition is true, otherwise it prints error message 
00264  *           and stops the program execution. By default, it is disabled.
00265  * @showinitializer
00266  ******************************************************************************/
00267 #ifndef FNET_CFG_ASSET
00268     #define FNET_CFG_ASSET                  (0)
00269 #endif
00270 
00271 /**************************************************************************/ /*!
00272  * @def      FNET_CFG_TCP
00273  * @brief    TCP protocol support:
00274  *               - @b @c 1 = is enabled (Default value).
00275  *               - @c 0 = is disabled.@n
00276  *           @n
00277  *           You can disable it to save a substantial amount of code, if
00278  *           your application needs the UDP only. By default, it is enabled.
00279  * @showinitializer
00280  ******************************************************************************/
00281 #ifndef FNET_CFG_TCP
00282     #define FNET_CFG_TCP                    (1)
00283 #endif
00284 
00285 /**************************************************************************/ /*!
00286  * @def      FNET_CFG_LOOPBACK
00287  * @brief    Loopback interface:
00288  *               - @c 1 = is enabled.
00289  *               - @b @c 0 = is disabled (Default value).
00290  * @showinitializer
00291  ******************************************************************************/
00292 #ifndef FNET_CFG_LOOPBACK
00293     #define FNET_CFG_LOOPBACK              (0)
00294 #endif
00295 
00296 /**************************************************************************/ /*!
00297  * @def      FNET_CFG_LOOPBACK_NAME
00298  * @brief    Defines name for the Loopback interface.
00299  * @showinitializer
00300  ******************************************************************************/
00301 #ifndef FNET_CFG_LOOPBACK_NAME
00302     #define FNET_CFG_LOOPBACK_NAME            "loop"
00303 #endif
00304 
00305 /**************************************************************************/ /*!
00306  * @def      FNET_CFG_LOOPBACK_MULTICAST
00307  * @brief    Local loopback of multicast datagrams:
00308  *               - @c 1 = is enabled.@n
00309  *                        It means that the sending system should receive a
00310  *                        copy of the multicast datagrams that are transmitted.@n
00311  *                        It is valid only if @ref FNET_CFG_LOOPBACK is ser to @c 1.
00312  *               - @b @c 0 = is disabled (Default value).@n
00313  * @see FNET_CFG_LOOPBACK
00314  * @showinitializer
00315  ******************************************************************************/
00316 #ifndef FNET_CFG_LOOPBACK_MULTICAST
00317     #define FNET_CFG_LOOPBACK_MULTICAST     (0)
00318 #endif
00319 
00320 /**************************************************************************/ /*!
00321  * @def      FNET_CFG_LOOPBACK_BROADCAST
00322  * @brief    Local loopback of broadcast datagrams:
00323  *               - @c 1 = is enabled.@n
00324  *                        It means that the sending system should receive a
00325  *                        copy of the broadcast datagrams that are transmitted.@n
00326  *                        It is valid only if @ref FNET_CFG_LOOPBACK is ser to @c 1.
00327  *               - @b @c 0 = is disabled (Default value).@n
00328  * @see FNET_CFG_LOOPBACK
00329  * @showinitializer
00330  ******************************************************************************/
00331 #ifndef FNET_CFG_LOOPBACK_BROADCAST
00332     #define FNET_CFG_LOOPBACK_BROADCAST     (0)
00333 #endif
00334 
00335 /**************************************************************************/ /*!
00336  * @def      FNET_CFG_LOOPBACK_MTU
00337  * @brief    Defines the Maximum Transmission Unit for the Loopback interface.
00338  *           By default, it is set to 1576.
00339  * @showinitializer
00340  ******************************************************************************/
00341 #ifndef FNET_CFG_LOOPBACK_MTU
00342     #define FNET_CFG_LOOPBACK_MTU           (1576U)
00343 #endif
00344 
00345 /**************************************************************************/ /*!
00346  * @def      FNET_CFG_MULTICAST
00347  * @brief    Multicast group support:
00348  *               - @c 1 = is enabled (Default value). @n
00349  *                 It is set automatically  to @c 1, if @c FNET_CFG_IP6 is set to @c 1.
00350  *               - @c 0 = is disabled .@n
00351  * @see FNET_CFG_MULTICAST_MAX, FNET_CFG_MULTICAST_SOCKET_MAX, FNET_CFG_IGMP
00352  * @showinitializer
00353  ******************************************************************************/
00354 #ifndef FNET_CFG_MULTICAST
00355     #define FNET_CFG_MULTICAST              (1)
00356 #endif
00357 
00358 /**************************************************************************/ /*!
00359  * @def      FNET_CFG_MULTICAST_MAX
00360  * @brief    Maximum number of unique multicast memberships may exist at
00361  *           the same time in the whole system.@n
00362  *           You may join the same host group address on multiple interfaces.
00363  * @see FNET_CFG_MULTICAST, FNET_CFG_MULTICAST_SOCKET_MAX
00364  * @showinitializer
00365  ******************************************************************************/
00366 #ifndef FNET_CFG_MULTICAST_MAX
00367     #define FNET_CFG_MULTICAST_MAX          (5u)
00368 #endif
00369 
00370 /**************************************************************************/ /*!
00371  * @def      FNET_CFG_MULTICAST_SOCKET_MAX
00372  * @brief    Maximum number of multicast memberships may exist at
00373  *           the same time per one socket.
00374  * @see FNET_CFG_MULTICAST, FNET_CFG_MULTICAST_MAX
00375  * @showinitializer
00376  ******************************************************************************/
00377 #ifndef FNET_CFG_MULTICAST_SOCKET_MAX
00378     #define FNET_CFG_MULTICAST_SOCKET_MAX   (1u)
00379 #endif
00380 
00381 /**************************************************************************/ /*!
00382  * @def      FNET_CFG_DNS
00383  * @brief    DNS IPv4 address support, by network interface:
00384  *               - @c 1 = is enabled.
00385  *               - @b @c 0 = is disabled (Default value).@n
00386  * @showinitializer
00387  ******************************************************************************/
00388 #ifndef FNET_CFG_DNS
00389     #define FNET_CFG_DNS                    (0)
00390 #endif
00391 
00392 /**************************************************************************/ /*!
00393  * @def      FNET_CFG_ARP_TABLE_SIZE
00394  * @brief    Maximum number of entries in the ARP table, by network interface.
00395  * @showinitializer
00396  ******************************************************************************/
00397 #ifndef FNET_CFG_ARP_TABLE_SIZE
00398     #define FNET_CFG_ARP_TABLE_SIZE         (10U)
00399 #endif
00400 
00401 
00402 /**************************************************************************/ /*!
00403  * @def     FNET_CFG_ARP_EXPIRE_TIMEOUT
00404  * @brief   Period of time after which ARP cache entries are automatically expired (in seconds).@n
00405  *          If set to @c 0, the expiration is disabled (not recommended).
00406  *          Default value is 1200 seconds (20 minutes).
00407  * @showinitializer
00408  ******************************************************************************/
00409 #ifndef FNET_CFG_ARP_EXPIRE_TIMEOUT
00410     #define FNET_CFG_ARP_EXPIRE_TIMEOUT     (1200U)
00411 #endif
00412 
00413 /**************************************************************************/ /*!
00414  * @def      FNET_CFG_TCP_DISCARD_OUT_OF_ORDER
00415  * @brief    Discarding of TCP segments that are received out of order:
00416  *               - @c 1 = is enabled.
00417  *               - @b @c 0 = is disabled (Default value).@n
00418  *           @n
00419  *           But you may enable it, to save RAM.
00420  * @showinitializer
00421  ******************************************************************************/
00422 #ifndef FNET_CFG_TCP_DISCARD_OUT_OF_ORDER
00423     #define FNET_CFG_TCP_DISCARD_OUT_OF_ORDER   (0)
00424 #endif
00425 
00426 /**************************************************************************/ /*!
00427  * @def      FNET_CFG_TCP_URGENT
00428  * @brief    TCP "urgent" (out-of-band) data processing:
00429  *               - @c 1 = is enabled.
00430  *               - @b @c 0 = is disabled (Default value).
00431  * @see SO_OOBINLINE, TCP_URGRCVD, TCP_BSD, MSG_OOB
00432  * @showinitializer
00433  ******************************************************************************/
00434 #ifndef FNET_CFG_TCP_URGENT
00435     #define FNET_CFG_TCP_URGENT                 (0)
00436 #endif
00437 
00438 /**************************************************************************/ /*!
00439  * @def      FNET_CFG_UDP
00440  * @brief    UDP protocol support:
00441  *               - @b @c 1 = is enabled (Default value).
00442  *               - @c 0 = is disabled.@n
00443  *           @n
00444  *           You can disable it to save some amount of code, if your
00445  *           application needs the TCP only. By default, it is enabled.
00446  * @showinitializer
00447  ******************************************************************************/
00448 #ifndef FNET_CFG_UDP
00449     #define FNET_CFG_UDP                        (1)
00450 #endif
00451 
00452 /**************************************************************************/ /*!
00453  * @def      FNET_CFG_UDP_CHECKSUM
00454  * @brief    UDP checksum:
00455  *               - @b @c 1 = The UDP checksum will be generated for transmitted
00456  *                        datagrams and verified on received UDP datagrams (Default value).
00457  *               - @c 0 = The UDP checksum will not be generated for transmitted
00458  *                        datagrams and won't be verified on received UDP datagrams.
00459  *           @n@n
00460  *           You can disable it to speed the UDP applications up.
00461  *           By default, it is enabled.
00462  * @showinitializer
00463  ******************************************************************************/
00464 #ifndef FNET_CFG_UDP_CHECKSUM
00465     #define FNET_CFG_UDP_CHECKSUM               (1)
00466 #endif
00467 
00468 /**************************************************************************/ /*!
00469  * @def      FNET_CFG_RAW
00470  * @brief    RAW socket support:
00471  *               - @c 1 = is enabled (Default value).
00472  *               - @b @c 0 = is disabled .@n
00473  * @showinitializer
00474  ******************************************************************************/
00475 #ifndef FNET_CFG_RAW
00476     #define FNET_CFG_RAW                        (1)
00477 #endif
00478 
00479 
00480 /*****************************************************************************
00481 *   TCP/IP stack parameters.
00482 ******************************************************************************/
00483 
00484 /**************************************************************************/ /*!
00485  * @def      FNET_CFG_MULTITHREADING
00486  * @brief    Multi-threading support:
00487  *               - @c 1 = is enabled (experimental feature). @n
00488  *                 If the FNET User API may be called simultaneously from different RTOS threads, this parameter must be enabled to avoid race conditions.
00489  *                 This feature is under development. User application must implement Mutex API defined fnet_mutex_api_t.
00490  *               - @b @c 0 = is disabled (Default value).@n
00491  *                 This is default state for bare-metal applications or if the FNET User API is called simultaneously only from one RTOS thread.
00492  * @see fnet_mutex_api_t
00493  ******************************************************************************/
00494 #ifndef FNET_CFG_MULTITHREADING
00495     #define FNET_CFG_MULTITHREADING             (0)
00496 #endif
00497 
00498 /**************************************************************************/ /*!
00499  * @def      FNET_CFG_SOCKET_MAX
00500  * @brief    Maximum number of sockets that can exist at the same time.
00501  * @showinitializer
00502  ******************************************************************************/
00503 #ifndef FNET_CFG_SOCKET_MAX
00504     #define FNET_CFG_SOCKET_MAX                 (10U)
00505 #endif
00506 
00507 /**************************************************************************/ /*!
00508  * @def      FNET_CFG_SOCKET_BSD_NAMES
00509  * @brief    BSD Socket API names:
00510  *               - @c 1 = are supported  (Default value).
00511  *               - @b @c 0 = are not supported.@n
00512  * @showinitializer
00513  ******************************************************************************/
00514 #ifndef FNET_CFG_SOCKET_BSD_NAMES
00515     #define FNET_CFG_SOCKET_BSD_NAMES           (1)
00516 #endif
00517 
00518 /**************************************************************************/ /*!
00519  * @def      FNET_CFG_SOCKET_CALLBACK_ON_RX
00520  * @brief    "Socket Rx" event handler callback:
00521  *               - @c 1 = is supported (Default value).
00522  *               - @b @c 0 = is not supported.@n
00523  * This event occurs when the socket layer receives any packet for any existing socket.
00524  * It can be a packet with or without data-payload including ACK, FIN and SYN.@n
00525  * The user callback is registered by fnet_socket_set_callback_on_rx().
00526  * @see fnet_socket_set_callback_on_rx()
00527  * @showinitializer
00528  ******************************************************************************/
00529 #ifndef FNET_CFG_SOCKET_CALLBACK_ON_RX
00530     #define FNET_CFG_SOCKET_CALLBACK_ON_RX         (0U)
00531 #endif
00532 
00533 /**************************************************************************/ /*!
00534  * @def      FNET_CFG_SOCKET_TCP_MSS
00535  * @brief    The default value of the @ref TCP_MSS option
00536  *           (TCP Maximum Segment Size).
00537  *      The TCP Maximum Segment Size (MSS) defines the maximum amount
00538  *      of data that a host is willing to accept in a single TCP segment.@n
00539  *      This Maximum Segment Size (MSS) announcement is sent from the
00540  *      data receiver to the data sender and says "I can accept TCP segments
00541  *      up to size X". The size (X) may be larger or smaller than the
00542  *      default.@n
00543  *      The MSS counts only data octets in the segment, it does not count the
00544  *      TCP header or the IP header.@n
00545  *      This option can be set to:
00546  *          - @b @c 0 = This is the default value. The selection of the MSS is
00547  *              automatic and is based on the MTU of the outgoing
00548  *              interface minus 40 (does not include
00549  *              the 20 byte IP header and the 20 byte TCP header).@n
00550  *              It is done to assist in avoiding of IP fragmentation
00551  *              at the endpoints of the TCP connection.
00552  *          - Non-zero value (up to 64K) = The TCP segment could be as large as 64K
00553  *              (the maximum IP datagram size), but it could be fragmented
00554  *              at the IP layer in order to be transmitted
00555  *              across the network to the receiving host.
00556  * @showinitializer
00557  ******************************************************************************/
00558 #ifndef FNET_CFG_SOCKET_TCP_MSS
00559     #define FNET_CFG_SOCKET_TCP_MSS             (0u)
00560 #endif
00561 
00562 /**************************************************************************/ /*!
00563  * @def      FNET_CFG_SOCKET_TCP_TX_BUF_SIZE
00564  * @brief    Default maximum size for the TCP send-socket buffer.
00565  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00566  *           using the @ref SO_SNDBUF socket option.
00567  * @showinitializer
00568  ******************************************************************************/
00569 #ifndef FNET_CFG_SOCKET_TCP_TX_BUF_SIZE
00570     #define FNET_CFG_SOCKET_TCP_TX_BUF_SIZE     (2U * 1024U)
00571 #endif
00572 
00573 /**************************************************************************/ /*!
00574  * @def      FNET_CFG_SOCKET_TCP_RX_BUF_SIZE
00575  * @brief    Default maximum size for the TCP receive-socket buffer.
00576  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00577  *           using the @ref SO_RCVBUF socket option.
00578  * @showinitializer
00579  ******************************************************************************/
00580 #ifndef FNET_CFG_SOCKET_TCP_RX_BUF_SIZE
00581     #define FNET_CFG_SOCKET_TCP_RX_BUF_SIZE     (2U * 1024U)
00582 #endif
00583 
00584 /**************************************************************************/ /*!
00585  * @def      FNET_CFG_SOCKET_UDP_TX_BUF_SIZE
00586  * @brief    Default maximum size for the UDP send-socket buffer.
00587  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00588  *           using the @ref SO_SNDBUF socket option.
00589  * @showinitializer
00590  ******************************************************************************/
00591 #ifndef FNET_CFG_SOCKET_UDP_TX_BUF_SIZE
00592     #define FNET_CFG_SOCKET_UDP_TX_BUF_SIZE     (2U * 1024U)
00593 #endif
00594 
00595 /**************************************************************************/ /*!
00596  * @def      FNET_CFG_SOCKET_UDP_RX_BUF_SIZE
00597  * @brief    Default maximum size for the UDP receive-socket buffer.
00598  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00599  *           using the @ref SO_RCVBUF socket option.
00600  * @showinitializer
00601  ******************************************************************************/
00602 #ifndef FNET_CFG_SOCKET_UDP_RX_BUF_SIZE
00603     #define FNET_CFG_SOCKET_UDP_RX_BUF_SIZE     (2U * 1024U)
00604 #endif
00605 
00606 /**************************************************************************/ /*!
00607  * @def      FNET_CFG_SOCKET_RAW_TX_BUF_SIZE
00608  * @brief    Default maximum size for the RAW send-socket buffer.
00609  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00610  *           using the @ref SO_SNDBUF socket option.
00611  * @showinitializer
00612  ******************************************************************************/
00613 #ifndef FNET_CFG_SOCKET_RAW_TX_BUF_SIZE
00614     #define FNET_CFG_SOCKET_RAW_TX_BUF_SIZE     (2U * 1024U)
00615 #endif
00616 
00617 /**************************************************************************/ /*!
00618  * @def      FNET_CFG_SOCKET_RAW_RX_BUF_SIZE
00619  * @brief    Default maximum size for the RAW receive-socket buffer.
00620  *           At runtime, it can be changed by @ref fnet_socket_setopt()
00621  *           using the @ref SO_RCVBUF socket option.
00622  * @showinitializer
00623  ******************************************************************************/
00624 #ifndef FNET_CFG_SOCKET_RAW_RX_BUF_SIZE
00625     #define FNET_CFG_SOCKET_RAW_RX_BUF_SIZE     (2U * 1024U)
00626 #endif
00627 
00628 /**************************************************************************/ /*!
00629  * @def      FNET_CFG_IP_MAX_PACKET
00630  * @brief    Maximum size for the IPv4 and IPv6 datagram,
00631  *           the largest value is 65535. @n
00632  *           Default value is 10 KB.
00633  * @showinitializer
00634  ******************************************************************************/
00635 #ifndef FNET_CFG_IP_MAX_PACKET
00636     #define FNET_CFG_IP_MAX_PACKET              (10U*1024U)
00637 #endif
00638 
00639 /*****************************************************************************
00640  * Function Overload
00641  *****************************************************************************/
00642 #ifndef FNET_CFG_OVERLOAD_CHECKSUM_LOW
00643     #define FNET_CFG_OVERLOAD_CHECKSUM_LOW      (0)
00644 #endif
00645 
00646 /**************************************************************************/ /*!
00647  * @def      FNET_CFG_OVERLOAD_MEMCPY
00648  * @brief    Your own alternate implementation for fnet_memcpy().
00649  *               - @c 1 = is enabled.
00650  *               - @b @c 0 = is disabled (Default value).@n
00651  *           For example, to use standard memcpy() instead of FNET own implementation, add  to fnet_user_config.h:
00652             @verbatim
00653                #define FNET_CFG_OVERLOAD_MEMCPY    1
00654                #define fnet_memcpy    memcpy
00655             @endverbatim
00656  * @showinitializer
00657  ******************************************************************************/
00658 #ifndef FNET_CFG_OVERLOAD_MEMCPY
00659     #define FNET_CFG_OVERLOAD_MEMCPY            (0)
00660 #endif
00661 
00662 /* IPv4 and/or IPv6 must enaqbled.*/
00663 #if !FNET_CFG_IP4 && !FNET_CFG_IP6
00664     #error "Please enable IPv4 or/and IPv6, by FNET_CFG_IP4 or/and FNET_CFG_IP6."
00665 #endif
00666 
00667 /*****************************************************************************
00668  * DEBUGING INFO OUTPUT
00669  *****************************************************************************/
00670 
00671 /**************************************************************************/ /*!
00672  * @internal
00673  * @brief    Debugging output:
00674  *               - @c 1 = is enabled.
00675  *               - @c 0 = is disabled.
00676  * @internal
00677  ******************************************************************************/
00678 #ifndef FNET_CFG_DEBUG
00679     #define FNET_CFG_DEBUG              (0)
00680 #endif
00681 
00682 #ifndef FNET_CFG_DEBUG_AUTOIP
00683     #define FNET_CFG_DEBUG_AUTOIP       (0)
00684 #endif
00685 
00686 #ifndef FNET_CFG_DEBUG_TIMER  /* It will be printed to the UART '!' sign every second. */
00687     #define FNET_CFG_DEBUG_TIMER        (0)
00688 #endif
00689 
00690 #ifndef FNET_CFG_DEBUG_HTTP
00691     #define FNET_CFG_DEBUG_HTTP         (0)
00692 #endif
00693 
00694 #ifndef FNET_CFG_DEBUG_DHCP
00695     #define FNET_CFG_DEBUG_DHCP         (0)
00696 #endif
00697 
00698 #ifndef FNET_CFG_DEBUG_ARP
00699     #define FNET_CFG_DEBUG_ARP          (0)
00700 #endif
00701 
00702 #ifndef FNET_CFG_DEBUG_MEMPOOL
00703     #define FNET_CFG_DEBUG_MEMPOOL      (0)
00704 #endif
00705 
00706 #ifndef FNET_CFG_DEBUG_TFTP_CLN
00707     #define FNET_CFG_DEBUG_TFTP_CLN     (0)
00708 #endif
00709 
00710 #ifndef FNET_CFG_DEBUG_TFTP_SRV
00711     #define FNET_CFG_DEBUG_TFTP_SRV     (0)
00712 #endif
00713 
00714 #ifndef FNET_CFG_DEBUG_STACK
00715     #define FNET_CFG_DEBUG_STACK        (0)
00716 #endif
00717 
00718 #ifndef FNET_CFG_DEBUG_TELNET
00719     #define FNET_CFG_DEBUG_TELNET       (0)
00720 #endif
00721 
00722 #ifndef FNET_CFG_DEBUG_SHELL
00723     #define FNET_CFG_DEBUG_SHELL        (0)
00724 #endif
00725 
00726 #ifndef FNET_CFG_DEBUG_DNS
00727     #define FNET_CFG_DEBUG_DNS          (0)
00728 #endif
00729 
00730 #ifndef FNET_CFG_DEBUG_STARTUP_MS
00731     #define FNET_CFG_DEBUG_STARTUP_MS   (0)
00732 #endif
00733 
00734 #ifndef FNET_CFG_DEBUG_IP6
00735     #define FNET_CFG_DEBUG_IP6          (0)
00736 #endif
00737 
00738 #ifndef FNET_CFG_DEBUG_LINK
00739     #define FNET_CFG_DEBUG_LINK         (0)
00740 #endif
00741 
00742 #ifndef FNET_CFG_DEBUG_LLMNR
00743     #define FNET_CFG_DEBUG_LLMNR        (0)
00744 #endif
00745 
00746 #ifndef FNET_CFG_DEBUG_MDNS
00747     #define FNET_CFG_DEBUG_MDNS        (0)
00748 #endif
00749 
00750 #ifndef FNET_CFG_DEBUG_PING
00751     #define FNET_CFG_DEBUG_PING         (0)
00752 #endif
00753 
00754 #ifndef FNET_CFG_DEBUG_TRACE
00755     #define FNET_CFG_DEBUG_TRACE        (0)
00756 #endif
00757 
00758 #ifndef FNET_CFG_DEBUG_TRACE_IP
00759     #define FNET_CFG_DEBUG_TRACE_IP     (0)
00760 #endif
00761 
00762 #ifndef FNET_CFG_DEBUG_TRACE_ICMP
00763     #define FNET_CFG_DEBUG_TRACE_ICMP   (0)
00764 #endif
00765 
00766 #ifndef FNET_CFG_DEBUG_TRACE_IGMP
00767     #define FNET_CFG_DEBUG_TRACE_IGMP   (0)
00768 #endif
00769 
00770 #ifndef FNET_CFG_DEBUG_TRACE_ETH
00771     #define FNET_CFG_DEBUG_TRACE_ETH    (0)
00772 #endif
00773 
00774 #ifndef FNET_CFG_DEBUG_TRACE_ARP
00775     #define FNET_CFG_DEBUG_TRACE_ARP    (0)
00776 #endif
00777 
00778 #ifndef FNET_CFG_DEBUG_TRACE_UDP
00779     #define FNET_CFG_DEBUG_TRACE_UDP    (0)
00780 #endif
00781 
00782 #ifndef FNET_CFG_DEBUG_TRACE_TCP
00783     #define FNET_CFG_DEBUG_TRACE_TCP    (0)
00784 #endif
00785 
00786 
00787 /******************************************************************************
00788  * Obsolete configuration parameters
00789  ******************************************************************************/
00790 #ifdef FNET_CFG_ETH_IP4_ADDR
00791     #error "FNET_CFG_ETH_IP4_ADDR parameter is obsolete. It is user application parameter now."
00792 #endif
00793 #ifdef FNET_CFG_ETH_IP4_MASK
00794     #error "FNET_CFG_ETH_IP4_MASK parameter is obsolete. It is user application parameter now."
00795 #endif
00796 #ifdef FNET_CFG_ETH_IP4_GW
00797     #error "FNET_CFG_ETH_IP4_GW parameter is obsolete. It is user application parameter now."
00798 #endif
00799 #ifdef FNET_CFG_ETH_IP4_DNS
00800     #error "FNET_CFG_ETH_IP4_DNS parameter is obsolete. It is user application parameter now."
00801 #endif
00802 #ifdef FNET_CFG_ETH_MAC_ADDR
00803     #error "FNET_CFG_ETH_MAC_ADDR parameter is obsolete. It is user application parameter now."
00804 #endif
00805 #ifdef FNET_CFG_ETH
00806     #error "FNET_CFG_ETH parameter is obsolete."
00807 #endif
00808 #ifdef FNET_CFG_ETH_MTU
00809     #error "FNET_CFG_ETH_MTU parameter is obsolete."
00810 #endif
00811 
00812 
00813 
00814 #ifdef FNET_CFG_ETH0_IP4_ADDR
00815     #error "FNET_CFG_ETH0_IP4_ADDR parameter is obsolete. It is user application parameter now."
00816 #endif
00817 #ifdef FNET_CFG_ETH0_IP4_MASK
00818     #error "FNET_CFG_ETH0_IP4_MASK parameter is obsolete. It is user application parameter now."
00819 #endif
00820 #ifdef FNET_CFG_ETH0_IP4_GW
00821     #error "FNET_CFG_ETH0_IP4_GW parameter is obsolete. It is user application parameter now."
00822 #endif
00823 #ifdef FNET_CFG_ETH0_IP4_DNS
00824     #error "FNET_CFG_ETH0_IP4_DNS parameter is obsolete. It is user application parameter now."
00825 #endif
00826 #ifdef FNET_CFG_ETH1_IP4_ADDR
00827     #error "FNET_CFG_ETH1_IP4_ADDR parameter is obsolete. It is user application parameter now."
00828 #endif
00829 #ifdef FNET_CFG_ETH1_IP4_MASK
00830     #error "FNET_CFG_ETH1_IP4_MASK parameter is obsolete. It is user application parameter now."
00831 #endif
00832 #ifdef FNET_CFG_ETH1_IP4_GW
00833     #error "FNET_CFG_ETH1_IP4_GW parameter is obsolete. It is user application parameter now."
00834 #endif
00835 #ifdef FNET_CFG_ETH1_IP4_DNS
00836     #error "FNET_CFG_ETH1_IP4_DNS parameter is obsolete. It is user application parameter now."
00837 #endif
00838 #ifdef FNET_CFG_DEFAULT_IF
00839     #error "FNET_CFG_DEFAULT_IF parameter is obsolete. It is user application parameter now."
00840 #endif
00841 #ifdef FAPP_CFG_HEAP_SIZE
00842     #error "FAPP_CFG_HEAP_SIZE parameter is obsolete. It is user application parameter now."
00843 #endif
00844 
00845 
00846 
00847 /*! @} */
00848 
00849 #endif