Embedded TCP/IP stack: fnet_stack_config.h Source File From FNET previous page next page Embedded TCP/IP stack 4.1.0 FNET Overview FNET Quick Start FNET API fnet_stackstack fnet_stack_config.h 1 /************************************************************************** 2 * 3 * Copyright 2011-2017 by Andrey Butok. FNET Community. 4 * Copyright 2008-2010 by Andrey Butok. Freescale Semiconductor, Inc. 5 * 6 *************************************************************************** 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); you may 9 * not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 16 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 * 20 *************************************************************************** 21 * 22 * Main TCP/IP stack default configuration file. 23 * 24 ***************************************************************************/ 25 26 /************************************************************************ 27 * !!!DO NOT MODIFY THIS FILE!!! 28 ************************************************************************/ 29 30 #ifndef _FNET_STACK_CONFIG_H_ 31 32 #define _FNET_STACK_CONFIG_H_ 33 34 /***************************************************************************** 35 * IP6-specific parameters. 36 ******************************************************************************/ 40 /**************************************************************************/ 49 #ifndef FNET_CFG_IP6 50 #define FNET_CFG_IP6 (0) 51 #endif 52 53 /**************************************************************************/ 62 #ifndef FNET_CFG_ND6_NEIGHBOR_CACHE_SIZE 63 #define FNET_CFG_ND6_NEIGHBOR_CACHE_SIZE (5u) 64 #endif 65 66 /**************************************************************************/ 71 #ifndef FNET_CFG_ND6_PREFIX_LIST_SIZE 72 #define FNET_CFG_ND6_PREFIX_LIST_SIZE (4u) 73 #endif 74 75 /**************************************************************************/ 83 #ifndef FNET_CFG_ND6_ROUTER_LIST_SIZE 84 #define FNET_CFG_ND6_ROUTER_LIST_SIZE (2u) 85 #endif 86 87 /**************************************************************************/ 98 #ifndef FNET_CFG_ND6_DAD_TRANSMITS 99 #define FNET_CFG_ND6_DAD_TRANSMITS (1u) 100 #endif 101 102 /**************************************************************************/ 111 #ifndef FNET_CFG_ND6_RDNSS 112 #define FNET_CFG_ND6_RDNSS (1) 113 #endif 114 115 /**************************************************************************/ 124 #ifndef FNET_CFG_ND6_RDNSS_LIST_SIZE 125 #define FNET_CFG_ND6_RDNSS_LIST_SIZE (3u) 126 #endif 127 128 /**************************************************************************/ 138 #ifndef FNET_CFG_IP6_FRAGMENTATION 139 #define FNET_CFG_IP6_FRAGMENTATION (1) 140 #endif 141 142 /**************************************************************************/ 149 #ifndef FNET_CFG_IP6_PMTU_DISCOVERY 150 #define FNET_CFG_IP6_PMTU_DISCOVERY (1) 151 #endif 152 153 /**************************************************************************/ 158 #ifndef FNET_CFG_NETIF_IP6_ADDR_MAX 159 #define FNET_CFG_NETIF_IP6_ADDR_MAX (5u) 160 #endif 161 162 /**************************************************************************/ 171 #ifndef FNET_CFG_MLD 172 #define FNET_CFG_MLD (0) 173 #endif 174 175 181 /**************************************************************************/ 190 #ifndef FNET_CFG_IP4 191 #define FNET_CFG_IP4 (1) 192 #endif 193 194 /**************************************************************************/ 204 #ifndef FNET_CFG_IP4_FRAGMENTATION 205 #define FNET_CFG_IP4_FRAGMENTATION (0) 206 #endif 207 208 /**************************************************************************/ 215 #ifndef FNET_CFG_LOOPBACK_IP4_ADDR 216 #define FNET_CFG_LOOPBACK_IP4_ADDR (FNET_IP4_ADDR_INIT(127U, 0U, 0U, 1U)) 217 #endif 218 219 /**************************************************************************/ 227 #ifndef FNET_CFG_IGMP 228 #define FNET_CFG_IGMP (0) 229 #endif 230 231 /**************************************************************************/ 239 #ifndef FNET_CFG_IGMP_VERSION 240 #define FNET_CFG_IGMP_VERSION (2) 241 #endif 242 248 /***************************************************************************** 249 * TCP/IP stack general parameters. 250 ******************************************************************************/ 251 252 /**************************************************************************/ 262 #ifndef FNET_CFG_ASSET 263 #define FNET_CFG_ASSET (0) 264 #endif 265 266 /**************************************************************************/ 276 #ifndef FNET_CFG_TCP 277 #define FNET_CFG_TCP (1) 278 #endif 279 280 /**************************************************************************/ 287 #ifndef FNET_CFG_LOOPBACK 288 #define FNET_CFG_LOOPBACK (0) 289 #endif 290 291 /**************************************************************************/ 296 #ifndef FNET_CFG_LOOPBACK_NAME 297 #define FNET_CFG_LOOPBACK_NAME "loop" 298 #endif 299 300 /**************************************************************************/ 311 #ifndef FNET_CFG_LOOPBACK_MULTICAST 312 #define FNET_CFG_LOOPBACK_MULTICAST (0) 313 #endif 314 315 /**************************************************************************/ 326 #ifndef FNET_CFG_LOOPBACK_BROADCAST 327 #define FNET_CFG_LOOPBACK_BROADCAST (0) 328 #endif 329 330 /**************************************************************************/ 336 #ifndef FNET_CFG_LOOPBACK_MTU 337 #define FNET_CFG_LOOPBACK_MTU (1576U) 338 #endif 339 340 /**************************************************************************/ 349 #ifndef FNET_CFG_MULTICAST 350 #define FNET_CFG_MULTICAST (1) 351 #endif 352 353 /**************************************************************************/ 361 #ifndef FNET_CFG_MULTICAST_MAX 362 #define FNET_CFG_MULTICAST_MAX (10u) 363 #endif 364 365 /**************************************************************************/ 372 #ifndef FNET_CFG_MULTICAST_SOCKET_MAX 373 #define FNET_CFG_MULTICAST_SOCKET_MAX (1u) 374 #endif 375 376 /**************************************************************************/ 381 #ifndef FNET_CFG_ARP_TABLE_SIZE 382 #define FNET_CFG_ARP_TABLE_SIZE (10U) 383 #endif 384 385 /**************************************************************************/ 392 #ifndef FNET_CFG_ARP_EXPIRE_TIMEOUT 393 #define FNET_CFG_ARP_EXPIRE_TIMEOUT (1200U) 394 #endif 395 396 /**************************************************************************/ 405 #ifndef FNET_CFG_TCP_DISCARD_OUT_OF_ORDER 406 #define FNET_CFG_TCP_DISCARD_OUT_OF_ORDER (0) 407 #endif 408 409 /**************************************************************************/ 417 #ifndef FNET_CFG_TCP_URGENT 418 #define FNET_CFG_TCP_URGENT (0) 419 #endif 420 421 /**************************************************************************/ 431 #ifndef FNET_CFG_UDP 432 #define FNET_CFG_UDP (1) 433 #endif 434 435 /**************************************************************************/ 447 #ifndef FNET_CFG_UDP_CHECKSUM 448 #define FNET_CFG_UDP_CHECKSUM (1) 449 #endif 450 451 /**************************************************************************/ 458 #ifndef FNET_CFG_RAW 459 #define FNET_CFG_RAW (1) 460 #endif 461 462 463 /***************************************************************************** 464 * TCP/IP stack parameters. 465 ******************************************************************************/ 466 467 /**************************************************************************/ 477 #ifndef FNET_CFG_MULTITHREADING 478 #define FNET_CFG_MULTITHREADING (0) 479 #endif 480 481 /**************************************************************************/ 486 #ifndef FNET_CFG_SOCKET_MAX 487 #define FNET_CFG_SOCKET_MAX (12U) 488 #endif 489 490 /**************************************************************************/ 497 #ifndef FNET_CFG_SOCKET_BSD_NAMES 498 #define FNET_CFG_SOCKET_BSD_NAMES (1) 499 #endif 500 501 /**************************************************************************/ 512 #ifndef FNET_CFG_SOCKET_CALLBACK_ON_RX 513 #define FNET_CFG_SOCKET_CALLBACK_ON_RX (0U) 514 #endif 515 516 /**************************************************************************/ 541 #ifndef FNET_CFG_SOCKET_TCP_MSS 542 #define FNET_CFG_SOCKET_TCP_MSS (0u) 543 #endif 544 545 /**************************************************************************/ 552 #ifndef FNET_CFG_SOCKET_TCP_TX_BUF_SIZE 553 #define FNET_CFG_SOCKET_TCP_TX_BUF_SIZE (2U * 1024U) 554 #endif 555 556 /**************************************************************************/ 563 #ifndef FNET_CFG_SOCKET_TCP_RX_BUF_SIZE 564 #define FNET_CFG_SOCKET_TCP_RX_BUF_SIZE (2U * 1024U) 565 #endif 566 567 /**************************************************************************/ 574 #ifndef FNET_CFG_SOCKET_UDP_TX_BUF_SIZE 575 #define FNET_CFG_SOCKET_UDP_TX_BUF_SIZE (2U * 1024U) 576 #endif 577 578 /**************************************************************************/ 585 #ifndef FNET_CFG_SOCKET_UDP_RX_BUF_SIZE 586 #define FNET_CFG_SOCKET_UDP_RX_BUF_SIZE (2U * 1024U) 587 #endif 588 589 /**************************************************************************/ 596 #ifndef FNET_CFG_SOCKET_RAW_TX_BUF_SIZE 597 #define FNET_CFG_SOCKET_RAW_TX_BUF_SIZE (2U * 1024U) 598 #endif 599 600 /**************************************************************************/ 607 #ifndef FNET_CFG_SOCKET_RAW_RX_BUF_SIZE 608 #define FNET_CFG_SOCKET_RAW_RX_BUF_SIZE (2U * 1024U) 609 #endif 610 611 /**************************************************************************/ 618 #ifndef FNET_CFG_IP_MAX_PACKET 619 #define FNET_CFG_IP_MAX_PACKET (10U*1024U) 620 #endif 621 622 /**************************************************************************/ 633 #ifndef FNET_CFG_TIMER_POLL_AUTOMATIC 634 #define FNET_CFG_TIMER_POLL_AUTOMATIC (1) 635 #endif 636 637 /**************************************************************************/ 644 #ifndef FNET_CFG_ASSERT 645 #define FNET_CFG_ASSERT (0U) 646 #endif 647 648 /***************************************************************************** 649 * Function Overload 650 *****************************************************************************/ 651 #ifndef FNET_CFG_OVERLOAD_CHECKSUM_LOW 652 #define FNET_CFG_OVERLOAD_CHECKSUM_LOW (0) 653 #endif 654 655 /**************************************************************************/ 667 #ifndef FNET_CFG_OVERLOAD_MEMCPY 668 #define FNET_CFG_OVERLOAD_MEMCPY (0) 669 #endif 670 671 /* IPv4 and/or IPv6 must enaqbled.*/ 672 #if !FNET_CFG_IP4 && !FNET_CFG_IP6 673 #error "Please enable IPv4 or/and IPv6, by FNET_CFG_IP4 or/and FNET_CFG_IP6." 674 #endif 675 676 /***************************************************************************** 677 * DEBUGING INFO OUTPUT 678 *****************************************************************************/ 679 680 /**************************************************************************/ 687 #ifndef FNET_CFG_DEBUG 688 #define FNET_CFG_DEBUG (0) 689 #endif 690 691 #ifndef FNET_CFG_DEBUG_AUTOIP 692 #define FNET_CFG_DEBUG_AUTOIP (0) 693 #endif 694 695 #ifndef FNET_CFG_DEBUG_TIMER /* It will be printed to the UART '!' sign every second. */ 696 #define FNET_CFG_DEBUG_TIMER (0) 697 #endif 698 699 #ifndef FNET_CFG_DEBUG_HTTP 700 #define FNET_CFG_DEBUG_HTTP (0) 701 #endif 702 703 #ifndef FNET_CFG_DEBUG_DHCP_CLN 704 #define FNET_CFG_DEBUG_DHCP_CLN (0) 705 #endif 706 707 #ifndef FNET_CFG_DEBUG_DHCP_SRV 708 #define FNET_CFG_DEBUG_DHCP_SRV (0) 709 #endif 710 711 #ifndef FNET_CFG_DEBUG_ARP 712 #define FNET_CFG_DEBUG_ARP (0) 713 #endif 714 715 #ifndef FNET_CFG_DEBUG_MEMPOOL 716 #define FNET_CFG_DEBUG_MEMPOOL (0) 717 #endif 718 719 #ifndef FNET_CFG_DEBUG_TFTP_CLN 720 #define FNET_CFG_DEBUG_TFTP_CLN (0) 721 #endif 722 723 #ifndef FNET_CFG_DEBUG_TFTP_SRV 724 #define FNET_CFG_DEBUG_TFTP_SRV (0) 725 #endif 726 727 #ifndef FNET_CFG_DEBUG_STACK 728 #define FNET_CFG_DEBUG_STACK (0) 729 #endif 730 731 #ifndef FNET_CFG_DEBUG_TELNET 732 #define FNET_CFG_DEBUG_TELNET (0) 733 #endif 734 735 #ifndef FNET_CFG_DEBUG_SHELL 736 #define FNET_CFG_DEBUG_SHELL (0) 737 #endif 738 739 #ifndef FNET_CFG_DEBUG_DNS 740 #define FNET_CFG_DEBUG_DNS (0) 741 #endif 742 743 #ifndef FNET_CFG_DEBUG_STARTUP_MS 744 #define FNET_CFG_DEBUG_STARTUP_MS (0) 745 #endif 746 747 #ifndef FNET_CFG_DEBUG_IP6 748 #define FNET_CFG_DEBUG_IP6 (0) 749 #endif 750 751 #ifndef FNET_CFG_DEBUG_LINK 752 #define FNET_CFG_DEBUG_LINK (0) 753 #endif 754 755 #ifndef FNET_CFG_DEBUG_LLMNR 756 #define FNET_CFG_DEBUG_LLMNR (0) 757 #endif 758 759 #ifndef FNET_CFG_DEBUG_MDNS 760 #define FNET_CFG_DEBUG_MDNS (0) 761 #endif 762 763 #ifndef FNET_CFG_DEBUG_PING 764 #define FNET_CFG_DEBUG_PING (0) 765 #endif 766 767 #ifndef FNET_CFG_DEBUG_SNTP 768 #define FNET_CFG_DEBUG_SNTP (0) 769 #endif 770 771 #ifndef FNET_CFG_DEBUG_QCA 772 #define FNET_CFG_DEBUG_QCA (0) 773 #endif 774 775 #ifndef FNET_CFG_DEBUG_TRACE 776 #define FNET_CFG_DEBUG_TRACE (0) 777 #endif 778 779 #ifndef FNET_CFG_DEBUG_TRACE_IP4 780 #define FNET_CFG_DEBUG_TRACE_IP4 (0) 781 #endif 782 783 #ifndef FNET_CFG_DEBUG_TRACE_ICMP4 784 #define FNET_CFG_DEBUG_TRACE_ICMP4 (0) 785 #endif 786 787 #ifndef FNET_CFG_DEBUG_TRACE_IGMP 788 #define FNET_CFG_DEBUG_TRACE_IGMP (0) 789 #endif 790 791 #ifndef FNET_CFG_DEBUG_TRACE_ETH 792 #define FNET_CFG_DEBUG_TRACE_ETH (0) 793 #endif 794 795 #ifndef FNET_CFG_DEBUG_TRACE_ARP 796 #define FNET_CFG_DEBUG_TRACE_ARP (0) 797 #endif 798 799 #ifndef FNET_CFG_DEBUG_TRACE_UDP 800 #define FNET_CFG_DEBUG_TRACE_UDP (0) 801 #endif 802 803 #ifndef FNET_CFG_DEBUG_TRACE_TCP 804 #define FNET_CFG_DEBUG_TRACE_TCP (0) 805 #endif 806 807 /****************************************************************************** 808 * Obsolete configuration parameters 809 ******************************************************************************/ 810 #ifdef FNET_CFG_ETH_IP4_ADDR 811 #error "FNET_CFG_ETH_IP4_ADDR parameter is obsolete. It is user application parameter now." 812 #endif 813 #ifdef FNET_CFG_ETH_IP4_MASK 814 #error "FNET_CFG_ETH_IP4_MASK parameter is obsolete. It is user application parameter now." 815 #endif 816 #ifdef FNET_CFG_ETH_IP4_GW 817 #error "FNET_CFG_ETH_IP4_GW parameter is obsolete. It is user application parameter now." 818 #endif 819 #ifdef FNET_CFG_ETH_IP4_DNS 820 #error "FNET_CFG_ETH_IP4_DNS parameter is obsolete. It is user application parameter now." 821 #endif 822 #ifdef FNET_CFG_ETH_MAC_ADDR 823 #error "FNET_CFG_ETH_MAC_ADDR parameter is obsolete. It is user application parameter now." 824 #endif 825 #ifdef FNET_CFG_ETH 826 #error "FNET_CFG_ETH parameter is obsolete." 827 #endif 828 #ifdef FNET_CFG_ETH_MTU 829 #error "FNET_CFG_ETH_MTU parameter is obsolete." 830 #endif 831 #ifdef FNET_CFG_ETH0_IP4_ADDR 832 #error "FNET_CFG_ETH0_IP4_ADDR parameter is obsolete. It is user application parameter now." 833 #endif 834 #ifdef FNET_CFG_ETH0_IP4_MASK 835 #error "FNET_CFG_ETH0_IP4_MASK parameter is obsolete. It is user application parameter now." 836 #endif 837 #ifdef FNET_CFG_ETH0_IP4_GW 838 #error "FNET_CFG_ETH0_IP4_GW parameter is obsolete. It is user application parameter now." 839 #endif 840 #ifdef FNET_CFG_ETH0_IP4_DNS 841 #error "FNET_CFG_ETH0_IP4_DNS parameter is obsolete. It is user application parameter now." 842 #endif 843 #ifdef FNET_CFG_ETH1_IP4_ADDR 844 #error "FNET_CFG_ETH1_IP4_ADDR parameter is obsolete. It is user application parameter now." 845 #endif 846 #ifdef FNET_CFG_ETH1_IP4_MASK 847 #error "FNET_CFG_ETH1_IP4_MASK parameter is obsolete. It is user application parameter now." 848 #endif 849 #ifdef FNET_CFG_ETH1_IP4_GW 850 #error "FNET_CFG_ETH1_IP4_GW parameter is obsolete. It is user application parameter now." 851 #endif 852 #ifdef FNET_CFG_ETH1_IP4_DNS 853 #error "FNET_CFG_ETH1_IP4_DNS parameter is obsolete. It is user application parameter now." 854 #endif 855 #ifdef FNET_CFG_DEFAULT_IF 856 #error "FNET_CFG_DEFAULT_IF parameter is obsolete. It is user application parameter now." 857 #endif 858 #ifdef FNET_CFG_HEAP_SIZE 859 #error "FNET_CFG_HEAP_SIZE parameter is obsolete. It is user application parameter now." 860 #endif 861 864 #endif © 2005-2018 by Andrey Butok. http://fnet.sourceforge.net previous page start next page