]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/blob - src/include/arch/lwipopts.h
9629bad4a43fe2f46310403301f34425330006dc
[pes-rpp/rpp-lwip.git] / src / include / arch / lwipopts.h
1 /**
2  * \file lwipopts.h - Configuration options for lwIP
3  *
4  * Copyright (c) 2010 Texas Instruments Incorporated
5  */
6 /*
7  * Copyright (c) 2001-2004 Swedish Institute of Computer Science.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without modification,
11  * are permitted provided that the following conditions are met:
12  *
13  * 1. Redistributions of source code must retain the above copyright notice,
14  *    this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright notice,
16  *    this list of conditions and the following disclaimer in the documentation
17  *    and/or other materials provided with the distribution.
18  * 3. The name of the author may not be used to endorse or promote products
19  *    derived from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
22  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
23  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
24  * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
26  * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
29  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
30  * OF SUCH DAMAGE.
31  *
32  * This file is part of the lwIP TCP/IP stack.
33  *
34  * Author: Adam Dunkels <adam@sics.se>
35  *
36  */
37 //#include "rpp/sci.h"
38
39 #ifndef __LWIPOPTS_H__
40 #define __LWIPOPTS_H__
41
42
43 /*****************************************************************************
44 **                           CONFIGURATIONS
45 *****************************************************************************/
46 /*
47 ** If Static IP address to be used, give it here. This value shall be 0 if
48 ** dynamic IP address is to be used.
49 ** For Example, for IP Address 192.168.247.1, use the corresponding hex
50 ** value 0xC0A8F701.
51 */
52 #define STATIC_IP_ADDRESS               0
53
54 /*****************************************************************************
55 **            lwIP SPECIFIC DEFINITIONS - To be used by lwIP stack
56 *****************************************************************************/
57 #define HOST_TMR_INTERVAL               0
58 #define DYNAMIC_HTTP_HEADERS
59
60 /*****************************************************************************
61 **                    Platform specific locking
62 *****************************************************************************/
63 #define SYS_LIGHTWEIGHT_PROT            1 /* critical sections */
64 #define NO_SYS                          0
65
66 /*****************************************************************************
67 **                    TCPIP thread - used when NO_SYS defined to 0
68 *****************************************************************************/
69 #define TCPIP_THREAD_PRIO               0
70 #define TCPIP_THREAD_STACKSIZE          1000
71
72 /*****************************************************************************
73 **                          Memory Options
74 *****************************************************************************/
75 #define MEM_ALIGNMENT                   4 /* dflt 1 */
76 #define MEM_SIZE                        (30 * 1024) /* 30K */ /* dflt 1600 */
77 #define MEMP_NUM_PBUF                   48 /* dflt 16 */
78 #define MEMP_NUM_TCP_PCB                16 /* dflt 5 */
79 #define PBUF_POOL_SIZE                  96 /* dflt 16 */
80
81 /*****************************************************************************
82 **                           IP Options
83 *****************************************************************************/
84 #define IP_REASSEMBLY                   0
85 #define IP_FRAG                         0
86
87 /*****************************************************************************
88 **                           DHCP Options
89 *****************************************************************************/
90 #define LWIP_DHCP                       1
91 #define DHCP_DOES_ARP_CHECK             0
92
93 /*****************************************************************************
94 **                           Auto IP  Options
95 *****************************************************************************/
96 #define LWIP_AUTOIP                     0           /* default is 0 */
97 #define LWIP_DHCP_AUTOIP_COOP           ((LWIP_DHCP) && (LWIP_AUTOIP))
98                                                     /* default is 0 */
99 #define LWIP_DHCP_AUTOIP_COOP_TRIES     5           /* default is 9 */
100
101 /*****************************************************************************
102 **                           TCP  Options
103 *****************************************************************************/
104 #define TCP_WND                         4096   /* default is 2048 */
105 #define TCP_MSS                         1500        /* default is 128 */
106 #define TCP_SND_BUF                     (4 * TCP_MSS)
107
108 /*****************************************************************************
109 **                           PBUF  Options
110 *****************************************************************************/
111 #define PBUF_LINK_HLEN                  14      /* default is 14 */
112 #define PBUF_POOL_BUFSIZE               256
113                                            /* default is LWIP_MEM_ALIGN_SIZE(TCP_MSS+40+PBUF_LINK_HLEN)*/
114 #define ETH_PAD_SIZE                    0
115 #define MEMP_NUM_NETCONN                10
116 #define LWIP_NETCONN                    !NO_SYS & 1 /*default is 1 - can be used only when NO_SYS = 0*/
117
118 /*****************************************************************************
119 **                           Socket  Options
120 *****************************************************************************/
121 #define LWIP_SOCKET                     0           /* default is 1 */
122
123 #define LWIP_SO_RCVTIMEO                1           /* enable receive timeout; default is 0 */
124
125 /*****************************************************************************
126 **                          Mbox options
127 *****************************************************************************/
128 #define TCPIP_MBOX_SIZE                 20
129 #define DEFAULT_RAW_RECVMBOX_SIZE       10
130 #define DEFAULT_UDP_RECVMBOX_SIZE       10
131 #define DEFAULT_TCP_RECVMBOX_SIZE       10
132 #define DEFAULT_ACCEPTMBOX_SIZE         10
133
134 /*****************************************************************************
135 **                          Debugging options
136 *****************************************************************************/
137 #define LWIP_DBG_MIN_LEVEL              LWIP_DBG_LEVEL_ALL
138 #define LWIP_DBG_TYPES_ON               (LWIP_DBG_ON | LWIP_DBG_TRACE \
139                                          |LWIP_DBG_STATE | LWIP_DBG_FRESH)
140
141 #define ALL_DBG_ON                      0
142
143
144 /**
145  * ETHARP_DEBUG: Enable debugging in etharp.c.
146  */
147 #define ETHARP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
148
149 /**
150  * NETIF_DEBUG: Enable debugging in netif.c.
151  */
152 #define NETIF_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
153
154 /**
155  * PBUF_DEBUG: Enable debugging in pbuf.c.
156  */
157 #define PBUF_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
158
159 /**
160  * API_LIB_DEBUG: Enable debugging in api_lib.c.
161  */
162 #define API_LIB_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
163
164 /**
165  * API_MSG_DEBUG: Enable debugging in api_msg.c.
166  */
167 #define API_MSG_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
168
169 /**
170  * SOCKETS_DEBUG: Enable debugging in sockets.c.
171  */
172 #define SOCKETS_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
173
174 /**
175  * ICMP_DEBUG: Enable debugging in icmp.c.
176  */
177 #define ICMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
178
179 /**
180  * IGMP_DEBUG: Enable debugging in igmp.c.
181  */
182 #define IGMP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
183
184 /**
185  * INET_DEBUG: Enable debugging in inet.c.
186  */
187 #define INET_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
188
189 /**
190  * IP_DEBUG: Enable debugging for IP.
191  */
192 #define IP_DEBUG                        LWIP_DBG_ON | ALL_DBG_ON
193
194 /**
195  * IP_REASS_DEBUG: Enable debugging in ip_frag.c for both frag & reass.
196  */
197 #define IP_REASS_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
198
199 /**
200  * RAW_DEBUG: Enable debugging in raw.c.
201  */
202 #define RAW_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
203
204 /**
205  * MEM_DEBUG: Enable debugging in mem.c.
206  */
207 #define MEM_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
208
209 /**
210  * MEMP_DEBUG: Enable debugging in memp.c.
211  */
212 #define MEMP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
213
214 /**
215  * SYS_DEBUG: Enable debugging in sys.c.
216  */
217 #define SYS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
218
219 /**
220  * TIMERS_DEBUG: Enable debugging in timers.c.
221  */
222 #define TIMERS_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
223
224 /**
225  * TCP_DEBUG: Enable debugging for TCP.
226  */
227 #define TCP_DEBUG                       LWIP_DBG_ON | ALL_DBG_ON
228
229 /**
230  * TCP_INPUT_DEBUG: Enable debugging in tcp_in.c for incoming debug.
231  */
232 #define TCP_INPUT_DEBUG                 LWIP_DBG_ON | ALL_DBG_ON
233
234 /**
235  * TCP_FR_DEBUG: Enable debugging in tcp_in.c for fast retransmit.
236  */
237 #define TCP_FR_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
238
239 /**
240  * TCP_RTO_DEBUG: Enable debugging in TCP for retransmit
241  * timeout.
242  */
243 #define TCP_RTO_DEBUG                   LWIP_DBG_ON | ALL_DBG_ON
244
245 /**
246  * TCP_CWND_DEBUG: Enable debugging for TCP congestion window.
247  */
248 #define TCP_CWND_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
249
250 /**
251  * TCP_WND_DEBUG: Enable debugging in tcp_in.c for window updating.
252  */
253 #define TCP_WND_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
254
255 /**
256  * TCP_OUTPUT_DEBUG: Enable debugging in tcp_out.c output functions.
257  */
258 #define TCP_OUTPUT_DEBUG                LWIP_DBG_OFF | ALL_DBG_ON
259
260 /**
261  * TCP_RST_DEBUG: Enable debugging for TCP with the RST message.
262  */
263 #define TCP_RST_DEBUG                   LWIP_DBG_OFF | ALL_DBG_ON
264
265 /**
266  * TCP_QLEN_DEBUG: Enable debugging for TCP queue lengths.
267  */
268 #define TCP_QLEN_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
269
270 /**
271  * UDP_DEBUG: Enable debugging in UDP.
272  */
273 #define UDP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
274
275 /**
276  * TCPIP_DEBUG: Enable debugging in tcpip.c.
277  */
278 #define TCPIP_DEBUG                     LWIP_DBG_OFF | ALL_DBG_ON
279
280 /**
281  * PPP_DEBUG: Enable debugging for PPP.
282  */
283 #define PPP_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
284
285 /**
286  * SLIP_DEBUG: Enable debugging in slipif.c.
287  */
288 #define SLIP_DEBUG                      LWIP_DBG_OFF | ALL_DBG_ON
289
290 /**
291  * DHCP_DEBUG: Enable debugging in dhcp.c.
292  */
293 #define DHCP_DEBUG                      LWIP_DBG_ON | ALL_DBG_ON
294
295 /**
296  * AUTOIP_DEBUG: Enable debugging in autoip.c.
297  */
298 #define AUTOIP_DEBUG                    LWIP_DBG_OFF | ALL_DBG_ON
299
300 /**
301  * SNMP_MSG_DEBUG: Enable debugging for SNMP messages.
302  */
303 #define SNMP_MSG_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
304
305 /**
306  * SNMP_MIB_DEBUG: Enable debugging for SNMP MIBs.
307  */
308 #define SNMP_MIB_DEBUG                  LWIP_DBG_OFF | ALL_DBG_ON
309
310 /**
311  * DNS_DEBUG: Enable debugging for DNS.
312  */
313 #define DNS_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
314
315 /**
316  * IP6_DEBUG: Enable debugging for IPv6.
317  */
318 #define IP6_DEBUG                       LWIP_DBG_OFF | ALL_DBG_ON
319
320
321 #endif /* __LWIPOPTS_H__ */