Debian Codegraph @

contrib/ports/old/ti_c6711/proj/lwipopts.h

raw
1 /*
2 * Copyright (c) 2001, Swedish Institute of Computer Science.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of the Institute nor the names of its contributors
14 * may be used to endorse or promote products derived from this software
15 * without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * This file is part of the lwIP TCP/IP stack.
30 *
31 * Author: Adam Dunkels <[email protected]>
32 *
33 * $Id: lwipopts.h,v 1.2 2007/09/07 23:28:54 fbernon Exp $
34 */
35 #ifndef __LWIPOPTS_H__
36 #define __LWIPOPTS_H__
37
38 // for TI C6000 DSP target, struct align....
39 //------------------------------------------------
40 #define ETH_PAD_SIZE 2
41 //------------------------------------------------
42
43 //------------------------------------------------
44 /* Critical Region Protection */
45 //------------------------------------------------
46 /** SYS_LIGHTWEIGHT_PROT
47 * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
48 * for certain critical regions during buffer allocation, deallocation and memory
49 * allocation and deallocation.
50 */
51 #define SYS_LIGHTWEIGHT_PROT 1 //millin
52
53 //----------------------------------------------------------------------
54 /* ---------- Memory options ---------- */
55 //----------------------------------------------------------------------
56
57 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
58 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
59 byte alignment -> define MEM_ALIGNMENT to 2. */
60 #define MEM_ALIGNMENT 4
61
62 /* MEM_SIZE: the size of the heap memory. If the application will send
63 a lot of data that needs to be copied, this should be set high. */
64 #define MEM_SIZE 65536
65
66 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
67 sends a lot of data out of ROM (or other static memory), this
68 should be set high. */
69 #define MEMP_NUM_PBUF 32
70
71 /* Number of raw connection PCBs */
72 #define MEMP_NUM_RAW_PCB 8
73
74 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
75 per active UDP "connection". */
76 #define MEMP_NUM_UDP_PCB 8
77
78 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
79 connections. */
80 #define MEMP_NUM_TCP_PCB 8
81
82 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
83 connections. */
84 #define MEMP_NUM_TCP_PCB_LISTEN 2
85
86 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
87 segments. */
88 #define MEMP_NUM_TCP_SEG 32
89
90 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
91 timeouts. */
92 #define MEMP_NUM_SYS_TIMEOUT 8
93
94
95 //----------------------------------------------------------------------
96 /* The following four are used only with the sequential API and can be
97 set to 0 if the application only will use the raw API. */
98 //----------------------------------------------------------------------
99 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
100 #define MEMP_NUM_NETBUF 32
101
102 /* MEMP_NUM_NETCONN: the number of struct netconns. */
103 #define MEMP_NUM_NETCONN 32
104
105 /* MEMP_NUM_TCPIP_MSG: the number of struct tcpip_msg, which is used
106 for sequential API communication and incoming packets. Used in
107 src/api/tcpip.c. */
108 #define MEMP_NUM_TCPIP_MSG_API 32
109 #define MEMP_NUM_TCPIP_MSG_INPKT 32
110
111 //----------------------------------------------------------------------
112 /* ---------- Pbuf options ---------- */
113 //----------------------------------------------------------------------
114 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
115 #define PBUF_POOL_SIZE 16
116
117 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
118 #define PBUF_POOL_BUFSIZE 1536
119
120
121
122 //----------------------------------------------------------------------
123 /* ---------- ARP options ---------- */
124 //----------------------------------------------------------------------
125 /** Number of active hardware address, IP address pairs cached */
126 #define ARP_TABLE_SIZE 10//10
127 /**
128 * If enabled, outgoing packets are queued during hardware address
129 * resolution.
130 *
131 * This feature has not stabilized yet. Single-packet queueing is
132 * believed to be stable, multi-packet queueing is believed to
133 * clash with the TCP segment queueing.
134 *
135 * As multi-packet-queueing is currently disabled, enabling this
136 * _should_ work, but we need your testing feedback on lwip-users.
137 *
138 */
139 #define ARP_QUEUEING 0
140 // if TCP was used, must disable this in v1.1.0 //millin
141
142
143 //----------------------------------------------------------------------
144 /* ---------- IP options ---------- */
145 //----------------------------------------------------------------------
146 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
147 IP packets across network interfaces. If you are going to run lwIP
148 on a device with only one network interface, define this to 0. */
149 #define IP_FORWARD 0
150
151 /* If defined to 1, IP options are allowed (but not parsed). If
152 defined to 0, all packets with IP options are dropped. */
153 #define IP_OPTIONS 0
154
155 /** IP reassembly and segmentation. Even if they both deal with IP
156 * fragments, note that these are orthogonal, one dealing with incoming
157 * packets, the other with outgoing packets
158 */
159
160 /** Reassemble incoming fragmented IP packets */
161 #define IP_REASSEMBLY 0
162
163 /** Fragment outgoing IP packets if their size exceeds MTU */
164 #define IP_FRAG 0
165
166
167 //----------------------------------------------------------------------
168 /* ---------- DHCP options ---------- */
169 //----------------------------------------------------------------------
170
171 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
172 interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
173 turning this on does currently not work. */
174 #define LWIP_DHCP 0
175
176 /* 1 if you want to do an ARP check on the offered address
177 (recommended). */
178 #define DHCP_DOES_ARP_CHECK 1
179
180
181 //----------------------------------------------------------------------
182 /* ---------- UDP options ---------- */
183 //----------------------------------------------------------------------
184 #define LWIP_UDP 1
185
186
187 //----------------------------------------------------------------------
188 /* ---------- TCP options ---------- */
189 //----------------------------------------------------------------------
190 #define LWIP_TCP 1
191
192 /* TCP receive window. */
193 #define TCP_WND 32768
194
195 /* Maximum number of retransmissions of data segments. */
196 #define TCP_MAXRTX 4
197
198 /* Maximum number of retransmissions of SYN segments. */
199 #define TCP_SYNMAXRTX 4
200
201 /* Controls if TCP should queue segments that arrive out of
202 order. Define to 0 if your device is low on memory. */
203 #define TCP_QUEUE_OOSEQ 1
204
205 /* TCP Maximum segment size. */
206 #define TCP_MSS 1476
207
208 /* TCP sender buffer space (bytes). */
209 #define TCP_SND_BUF 32768
210
211
212 //----------------------------------------------------------------------
213 /* ---------- Other options ---------- */
214 //----------------------------------------------------------------------
215
216 /* Support loop interface (127.0.0.1) */
217 #define LWIP_HAVE_LOOPIF 0
218
219 #define LWIP_COMPAT_SOCKETS 1
220
221 // for uC/OS-II port on TI DSP
222 #define TCPIP_THREAD_PRIO 5 //millin
223 //#define SLIPIF_THREAD_PRIO 1
224 //#define PPP_THREAD_PRIO 1
225
226
227 //----------------------------------------------------------------------
228 /* ---------- Socket Options ---------- */
229 //----------------------------------------------------------------------
230
231 /* Enable SO_REUSEADDR and SO_REUSEPORT options */
232 #define SO_REUSE 0
233
234
235 //----------------------------------------------------------------------
236 /* ---------- Statistics options ---------- */
237 //----------------------------------------------------------------------
238
239 #define STATS 0
240
241 #if LWIP_STATS
242
243 #define LWIP_STATS_DISPLAY 1
244 #define LINK_STATS 1
245 #define IP_STATS 1
246 #define IPFRAG_STATS 1
247 #define ICMP_STATS 1
248 #define UDP_STATS 1
249 #define TCP_STATS 1
250 #define MEM_STATS 1
251 #define MEMP_STATS 1
252 #define PBUF_STATS 1
253 #define SYS_STATS 1
254 #endif /* STATS */
255
256
257 //----------------------------------------------------------------------
258 /* ------------if you need to do debug-------------*/
259 //----------------------------------------------------------------------
260 /*
261 define LWIP_DEBUG in compiler and following...
262 */
263 #define LWIP_DBG_MIN_LEVEL LWIP_DBG_LEVEL_SERIOUS
264 //LWIP_DBG_LEVEL_WARNING LWIP_DBG_LEVEL_SERIOUS LWIP_DBG_LEVEL_SEVERE
265
266 #define LWIP_DBG_TYPES_ON 0//LWIP_DBG_TRACE | LWIP_DBG_STATE |LWIP_DBG_FRESH | LWIP_DBG_HALT
267 /*
268 Then, define debug class in opt.h
269 * --------------------------------------------------*/
270
271 #define ETHARP_DEBUG LWIP_DBG_OFF
272 #define NETIF_DEBUG LWIP_DBG_OFF
273 #define PBUF_DEBUG LWIP_DBG_OFF
274 #define API_LIB_DEBUG LWIP_DBG_OFF
275 #define API_MSG_DEBUG LWIP_DBG_OFF
276 #define SOCKETS_DEBUG LWIP_DBG_OFF
277 #define ICMP_DEBUG LWIP_DBG_OFF
278 #define INET_DEBUG LWIP_DBG_OFF
279 #define IP_DEBUG LWIP_DBG_OFF
280 #define IP_REASS_DEBUG LWIP_DBG_OFF
281 #define RAW_DEBUG LWIP_DBG_OFF
282 #define MEM_DEBUG LWIP_DBG_OFF
283 #define MEMP_DEBUG LWIP_DBG_OFF
284 #define SYS_DEBUG LWIP_DBG_OFF
285 #define TCP_DEBUG LWIP_DBG_OFF
286 #define TCP_INPUT_DEBUG LWIP_DBG_OFF
287 #define TCP_FR_DEBUG LWIP_DBG_OFF
288 #define TCP_RTO_DEBUG LWIP_DBG_OFF
289 #define TCP_CWND_DEBUG LWIP_DBG_OFF
290 #define TCP_WND_DEBUG LWIP_DBG_OFF
291 #define TCP_OUTPUT_DEBUG LWIP_DBG_OFF
292 #define TCP_RST_DEBUG LWIP_DBG_OFF
293 #define TCP_QLEN_DEBUG LWIP_DBG_OFF
294 #define UDP_DEBUG LWIP_DBG_OFF
295 #define TCPIP_DEBUG LWIP_DBG_OFF
296 #define PPP_DEBUG LWIP_DBG_OFF
297 #define SLIP_DEBUG LWIP_DBG_OFF
298 #define DHCP_DEBUG LWIP_DBG_OFF
299
300
301 #endif /* __LWIPOPTS_H__ */