dev
Fork of lwip by
lwipopts.h@12:931deec14b08, 2013-09-10 (annotated)
- Committer:
- bogdanm
- Date:
- Tue Sep 10 15:14:39 2013 +0300
- Revision:
- 12:931deec14b08
- Parent:
- 11:4b3f6f8b92d2
- Child:
- 14:3d3ad63396b2
Sync with git revision 171dda705c947bf910926a0b73d6a4797802554d
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
emilmont | 6:00bf89892c76 | 1 | /* Copyright (C) 2012 mbed.org, MIT License |
emilmont | 6:00bf89892c76 | 2 | * |
emilmont | 6:00bf89892c76 | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
emilmont | 6:00bf89892c76 | 4 | * and associated documentation files (the "Software"), to deal in the Software without restriction, |
emilmont | 6:00bf89892c76 | 5 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
emilmont | 6:00bf89892c76 | 6 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
emilmont | 6:00bf89892c76 | 7 | * furnished to do so, subject to the following conditions: |
emilmont | 6:00bf89892c76 | 8 | * |
emilmont | 6:00bf89892c76 | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
emilmont | 6:00bf89892c76 | 10 | * substantial portions of the Software. |
emilmont | 6:00bf89892c76 | 11 | * |
emilmont | 6:00bf89892c76 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
emilmont | 6:00bf89892c76 | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
emilmont | 6:00bf89892c76 | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
emilmont | 6:00bf89892c76 | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
emilmont | 6:00bf89892c76 | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
emilmont | 6:00bf89892c76 | 17 | */ |
emilmont | 6:00bf89892c76 | 18 | |
emilmont | 6:00bf89892c76 | 19 | #ifndef LWIPOPTS_H |
emilmont | 6:00bf89892c76 | 20 | #define LWIPOPTS_H |
emilmont | 6:00bf89892c76 | 21 | |
emilmont | 6:00bf89892c76 | 22 | #include "lwipopts_conf.h" |
emilmont | 6:00bf89892c76 | 23 | |
emilmont | 6:00bf89892c76 | 24 | // Operating System |
emilmont | 6:00bf89892c76 | 25 | #define NO_SYS 0 |
emilmont | 6:00bf89892c76 | 26 | |
emilmont | 6:00bf89892c76 | 27 | #if NO_SYS == 0 |
emilmont | 6:00bf89892c76 | 28 | #include "cmsis_os.h" |
emilmont | 6:00bf89892c76 | 29 | |
bogdanm | 12:931deec14b08 | 30 | #define SYS_LIGHTWEIGHT_PROT 1 |
bogdanm | 12:931deec14b08 | 31 | |
emilmont | 6:00bf89892c76 | 32 | #define LWIP_RAW 0 |
emilmont | 6:00bf89892c76 | 33 | |
bogdanm | 11:4b3f6f8b92d2 | 34 | #define TCPIP_MBOX_SIZE 8 |
bogdanm | 11:4b3f6f8b92d2 | 35 | #define DEFAULT_TCP_RECVMBOX_SIZE 8 |
bogdanm | 11:4b3f6f8b92d2 | 36 | #define DEFAULT_UDP_RECVMBOX_SIZE 8 |
bogdanm | 11:4b3f6f8b92d2 | 37 | #define DEFAULT_RAW_RECVMBOX_SIZE 8 |
bogdanm | 11:4b3f6f8b92d2 | 38 | #define DEFAULT_ACCEPTMBOX_SIZE 8 |
emilmont | 6:00bf89892c76 | 39 | |
emilmont | 6:00bf89892c76 | 40 | #define TCPIP_THREAD_STACKSIZE 1024 |
bogdanm | 11:4b3f6f8b92d2 | 41 | #define TCPIP_THREAD_PRIO (osPriorityNormal) |
emilmont | 6:00bf89892c76 | 42 | |
emilmont | 6:00bf89892c76 | 43 | #define DEFAULT_THREAD_STACKSIZE 512 |
emilmont | 6:00bf89892c76 | 44 | |
emilmont | 6:00bf89892c76 | 45 | #define MEMP_NUM_SYS_TIMEOUT 16 |
emilmont | 6:00bf89892c76 | 46 | #endif |
emilmont | 6:00bf89892c76 | 47 | |
emilmont | 6:00bf89892c76 | 48 | // 32-bit alignment |
emilmont | 6:00bf89892c76 | 49 | #define MEM_ALIGNMENT 4 |
emilmont | 6:00bf89892c76 | 50 | |
emilmont | 6:00bf89892c76 | 51 | #define MEM_SIZE 16362 |
emilmont | 6:00bf89892c76 | 52 | |
emilmont | 6:00bf89892c76 | 53 | #define PBUF_POOL_SIZE 5 |
emilmont | 6:00bf89892c76 | 54 | #define MEMP_NUM_TCP_PCB_LISTEN 4 |
emilmont | 6:00bf89892c76 | 55 | #define MEMP_NUM_TCP_PCB 4 |
emilmont | 6:00bf89892c76 | 56 | #define MEMP_NUM_PBUF 8 |
emilmont | 6:00bf89892c76 | 57 | |
emilmont | 6:00bf89892c76 | 58 | #define TCP_QUEUE_OOSEQ 0 |
emilmont | 6:00bf89892c76 | 59 | #define TCP_OVERSIZE 0 |
emilmont | 6:00bf89892c76 | 60 | |
emilmont | 6:00bf89892c76 | 61 | #define LWIP_DHCP 1 |
emilmont | 6:00bf89892c76 | 62 | #define LWIP_DNS 1 |
emilmont | 6:00bf89892c76 | 63 | |
emilmont | 8:f9d0ac9dd036 | 64 | // Support Multicast |
emilmont | 8:f9d0ac9dd036 | 65 | #include "stdlib.h" |
emilmont | 8:f9d0ac9dd036 | 66 | #define LWIP_IGMP 1 |
emilmont | 8:f9d0ac9dd036 | 67 | #define LWIP_RAND() rand() |
emilmont | 8:f9d0ac9dd036 | 68 | |
emilmont | 6:00bf89892c76 | 69 | #define LWIP_COMPAT_SOCKETS 0 |
emilmont | 6:00bf89892c76 | 70 | #define LWIP_POSIX_SOCKETS_IO_NAMES 0 |
emilmont | 6:00bf89892c76 | 71 | #define LWIP_SO_RCVTIMEO 1 |
emilmont | 6:00bf89892c76 | 72 | #define LWIP_TCP_KEEPALIVE 1 |
emilmont | 6:00bf89892c76 | 73 | |
emilmont | 6:00bf89892c76 | 74 | // Debug Options |
emilmont | 6:00bf89892c76 | 75 | // #define LWIP_DEBUG |
emilmont | 6:00bf89892c76 | 76 | #define UDP_LPC_EMAC LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 77 | #define SYS_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 78 | #define PPP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 79 | #define IP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 80 | #define MEM_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 81 | #define MEMP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 82 | #define PBUF_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 83 | #define API_LIB_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 84 | #define API_MSG_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 85 | #define TCPIP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 86 | #define SOCKETS_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 87 | #define TCP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 88 | #define TCP_INPUT_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 89 | #define TCP_FR_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 90 | #define TCP_RTO_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 91 | #define TCP_CWND_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 92 | #define TCP_WND_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 93 | #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 94 | #define TCP_RST_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 95 | #define TCP_QLEN_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 96 | #define ETHARP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 97 | #define NETIF_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 98 | #define DHCP_DEBUG LWIP_DBG_OFF |
emilmont | 6:00bf89892c76 | 99 | |
emilmont | 6:00bf89892c76 | 100 | #ifdef LWIP_DEBUG |
emilmont | 6:00bf89892c76 | 101 | #define MEMP_OVERFLOW_CHECK 1 |
emilmont | 6:00bf89892c76 | 102 | #define MEMP_SANITY_CHECK 1 |
emilmont | 6:00bf89892c76 | 103 | #else |
bogdanm | 12:931deec14b08 | 104 | #define LWIP_NOASSERT 1 |
emilmont | 6:00bf89892c76 | 105 | #define LWIP_STATS 0 |
emilmont | 6:00bf89892c76 | 106 | #endif |
emilmont | 6:00bf89892c76 | 107 | |
emilmont | 6:00bf89892c76 | 108 | #define LWIP_PLATFORM_BYTESWAP 1 |
emilmont | 6:00bf89892c76 | 109 | |
emilmont | 6:00bf89892c76 | 110 | #if LWIP_TRANSPORT_ETHERNET |
emilmont | 6:00bf89892c76 | 111 | |
emilmont | 6:00bf89892c76 | 112 | /* MSS should match the hardware packet size */ |
emilmont | 6:00bf89892c76 | 113 | #define TCP_MSS 1460 |
emilmont | 6:00bf89892c76 | 114 | #define TCP_SND_BUF (2 * TCP_MSS) |
emilmont | 6:00bf89892c76 | 115 | #define TCP_WND (2 * TCP_MSS) |
emilmont | 6:00bf89892c76 | 116 | #define TCP_SND_QUEUELEN (2 * TCP_SND_BUF/TCP_MSS) |
emilmont | 6:00bf89892c76 | 117 | |
emilmont | 6:00bf89892c76 | 118 | // Broadcast |
emilmont | 6:00bf89892c76 | 119 | #define IP_SOF_BROADCAST 1 |
emilmont | 6:00bf89892c76 | 120 | #define IP_SOF_BROADCAST_RECV 1 |
emilmont | 6:00bf89892c76 | 121 | |
emilmont | 6:00bf89892c76 | 122 | #define LWIP_BROADCAST_PING 1 |
emilmont | 6:00bf89892c76 | 123 | |
emilmont | 6:00bf89892c76 | 124 | #define LWIP_CHECKSUM_ON_COPY 1 |
emilmont | 6:00bf89892c76 | 125 | |
emilmont | 6:00bf89892c76 | 126 | #define LWIP_NETIF_HOSTNAME 1 |
emilmont | 6:00bf89892c76 | 127 | #define LWIP_NETIF_STATUS_CALLBACK 1 |
emilmont | 7:b061c4dba951 | 128 | #define LWIP_NETIF_LINK_CALLBACK 1 |
emilmont | 6:00bf89892c76 | 129 | |
emilmont | 6:00bf89892c76 | 130 | #elif LWIP_TRANSPORT_PPP |
emilmont | 6:00bf89892c76 | 131 | |
emilmont | 6:00bf89892c76 | 132 | #define TCP_SND_BUF (3 * 536) |
emilmont | 6:00bf89892c76 | 133 | #define TCP_WND (2 * 536) |
emilmont | 6:00bf89892c76 | 134 | |
emilmont | 6:00bf89892c76 | 135 | #define LWIP_ARP 0 |
emilmont | 6:00bf89892c76 | 136 | |
emilmont | 6:00bf89892c76 | 137 | #define PPP_SUPPORT 1 |
emilmont | 6:00bf89892c76 | 138 | #define CHAP_SUPPORT 1 |
emilmont | 6:00bf89892c76 | 139 | #define PAP_SUPPORT 1 |
emilmont | 6:00bf89892c76 | 140 | #define PPP_THREAD_STACKSIZE 4*192 |
emilmont | 6:00bf89892c76 | 141 | #define PPP_THREAD_PRIO 0 |
emilmont | 6:00bf89892c76 | 142 | |
emilmont | 6:00bf89892c76 | 143 | #define MAXNAMELEN 64 /* max length of hostname or name for auth */ |
emilmont | 6:00bf89892c76 | 144 | #define MAXSECRETLEN 64 |
emilmont | 6:00bf89892c76 | 145 | |
emilmont | 6:00bf89892c76 | 146 | #else |
emilmont | 6:00bf89892c76 | 147 | #error A transport mechanism (Ethernet or PPP) must be defined |
emilmont | 6:00bf89892c76 | 148 | #endif |
emilmont | 6:00bf89892c76 | 149 | |
emilmont | 6:00bf89892c76 | 150 | #endif /* LWIPOPTS_H_ */ |