lwipopts.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /**
  2. * \file lwipopts.h
  3. *
  4. * \brief Configuration options for lwIP
  5. */
  6. /* Copyright (c) 2010 Texas Instruments Incorporated
  7. * All rights reserved. */
  8. /*
  9. * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
  10. * All rights reserved.
  11. *
  12. * Redistribution and use in source and binary forms, with or without modification,
  13. * are permitted provided that the following conditions are met:
  14. *
  15. * 1. Redistributions of source code must retain the above copyright notice,
  16. * this list of conditions and the following disclaimer.
  17. * 2. Redistributions in binary form must reproduce the above copyright notice,
  18. * this list of conditions and the following disclaimer in the documentation
  19. * and/or other materials provided with the distribution.
  20. * 3. The name of the author may not be used to endorse or promote products
  21. * derived from this software without specific prior written permission.
  22. *
  23. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
  24. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  25. * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
  26. * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  27. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
  28. * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  29. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  30. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  31. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
  32. * OF SUCH DAMAGE.
  33. *
  34. * This file is part of the lwIP TCP/IP stack.
  35. *
  36. * Author: Adam Dunkels <adam@sics.se>
  37. *
  38. */
  39. #ifndef __LWIPOPTS_H__
  40. #define __LWIPOPTS_H__
  41. /*****************************************************************************
  42. ** CONFIGURATIONS
  43. *****************************************************************************/
  44. /*
  45. ** Give the MAC Address on the EVM here.
  46. */
  47. #define MAC_ADDRESS {0x00, 0x08, 0xEE, 0x03, 0x6A, 0xC6}
  48. /*
  49. ** If Static IP address to be used, give it here. This value shall be 0 if
  50. ** dynamic IP address is to be used.
  51. ** For Example, for IP Address 192.168.1.200, use the corresponding hex
  52. ** value 0xC0A801C8.
  53. */
  54. //#define STATIC_IP_ADDRESS 0xC0A801C8 //192.168.1.200
  55. /*****************************************************************************
  56. ** lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
  57. *****************************************************************************/
  58. #define HOST_TMR_INTERVAL 0
  59. #define DYNAMIC_HTTP_HEADERS
  60. /*****************************************************************************
  61. ** Platform specific locking
  62. *****************************************************************************/
  63. #define SYS_LIGHTWEIGHT_PROT 1
  64. #define NO_SYS 1
  65. /*****************************************************************************
  66. ** Memory Options
  67. *****************************************************************************/
  68. #define MEM_ALIGNMENT 4
  69. #define MEM_SIZE (50 * 1024) /* 50K */
  70. /*****************************************************************************
  71. ** Memory Options
  72. *****************************************************************************/
  73. #define MEMP_NUM_PBUF 48
  74. #define MEMP_NUM_TCP_PCB 16
  75. #define PBUF_POOL_SIZE 96
  76. /*****************************************************************************
  77. ** Memory Options
  78. *****************************************************************************/
  79. #define IP_REASSEMBLY 1
  80. #define IP_FRAG 1
  81. /*****************************************************************************
  82. ** DHCP Options
  83. *****************************************************************************/
  84. #define LWIP_DHCP 1
  85. #define DHCP_DOES_ARP_CHECK 0
  86. /*****************************************************************************
  87. ** Auto IP Options
  88. *****************************************************************************/
  89. #define LWIP_AUTOIP 0 /* default is 0 */
  90. #define LWIP_DHCP_AUTOIP_COOP ((LWIP_DHCP) && (LWIP_AUTOIP))
  91. /* default is 0 */
  92. #define LWIP_DHCP_AUTOIP_COOP_TRIES 5 /* default is 9 */
  93. /*****************************************************************************
  94. ** TCP Options
  95. *****************************************************************************/
  96. #define TCP_MSS 1500 /* default is 128 */
  97. #define TCP_WND 4 * TCP_MSS /* default is 2048 */
  98. #define TCP_SND_BUF (4 * TCP_MSS)
  99. /*****************************************************************************
  100. ** PBUF Options
  101. *****************************************************************************/
  102. #define PBUF_LINK_HLEN 14 /* default is 14 */
  103. #define PBUF_POOL_BUFSIZE 256
  104. /* default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)*/
  105. #define ETH_PAD_SIZE 0
  106. #define LWIP_NETCONN 0 /*default is 1*/
  107. /*****************************************************************************
  108. ** Socket Options
  109. *****************************************************************************/
  110. #define LWIP_SOCKET 0 /* default is 1 */
  111. /*****************************************************************************
  112. ** Debugging options
  113. *****************************************************************************/
  114. #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_ON
  115. #define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH)
  116. #endif /* __LWIPOPTS_H__ */