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