/[lwip]/lwip/src/include/lwip/opt.h
ViewVC logotype

Diff of /lwip/src/include/lwip/opt.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by likewise, Wed Jan 8 10:09:42 2003 UTC revision 1.3 by jani, Fri Feb 21 16:43:46 2003 UTC
# Line 32  Line 32 
32  #ifndef __LWIP_OPT_H__  #ifndef __LWIP_OPT_H__
33  #define __LWIP_OPT_H__  #define __LWIP_OPT_H__
34    
35    #include "lwip/debug.h"
36    /* Include user options which override defaults */
37  #include "lwipopts.h"  #include "lwipopts.h"
38    
39  /* Define some handy default values for configuration parameters. */  /* Define some handy default values for configuration parameters. */
40    
41    
42    /*FIXME These were taken from unixsim lwipopts.More sensitive values should be here
43     * nicely documented and categorized
44     **/
45    
46    #define LWIP_COMPAT_SOCKETS
47    /* ---------- Memory options ---------- */
48    /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
49       lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
50       byte alignment -> define MEM_ALIGNMENT to 2. */
51    #define MEM_ALIGNMENT           1
52    
53    /* MEM_SIZE: the size of the heap memory. If the application will send
54    a lot of data that needs to be copied, this should be set high. */
55    #define MEM_SIZE                1600
56    
57    /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
58       sends a lot of data out of ROM (or other static memory), this
59       should be set high. */
60    #define MEMP_NUM_PBUF           16
61    /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
62       per active UDP "connection". */
63    #define MEMP_NUM_UDP_PCB        4
64    /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
65       connections. */
66    #define MEMP_NUM_TCP_PCB        5
67    /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
68       connections. */
69    #define MEMP_NUM_TCP_PCB_LISTEN 8
70    /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
71       segments. */
72    #define MEMP_NUM_TCP_SEG        16
73    /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
74       timeouts. */
75    #define MEMP_NUM_SYS_TIMEOUT    3
76    
77    /* The following four are used only with the sequential API and can be
78       set to 0 if the application only will use the raw API. */
79    /* MEMP_NUM_NETBUF: the number of struct netbufs. */
80    #define MEMP_NUM_NETBUF         2
81    /* MEMP_NUM_NETCONN: the number of struct netconns. */
82    #define MEMP_NUM_NETCONN        4
83    /* MEMP_NUM_APIMSG: the number of struct api_msg, used for
84       communication between the TCP/IP stack and the sequential
85       programs. */
86    #define MEMP_NUM_API_MSG        8
87    /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
88       for sequential API communication and incoming packets. Used in
89       src/api/tcpip.c. */
90    #define MEMP_NUM_TCPIP_MSG      8
91    
92    /* These two control is reclaimer functions should be compiled
93       in. Should always be turned on (1). */
94    #define MEM_RECLAIM             1
95    #define MEMP_RECLAIM            1
96    
97    /* ---------- Pbuf options ---------- */
98    /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
99    #define PBUF_POOL_SIZE          100
100    
101    /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
102    #define PBUF_POOL_BUFSIZE       128
103    
104    /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
105       link level header. */
106    #define PBUF_LINK_HLEN          16
107    
108    /** SYS_LIGHTWEIGHT_PROT
109     * define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
110     * for certain critical regions during buffer allocation, deallocation and memory
111     * allocation and deallocation.
112     */
113    /*#define SYS_LIGHTWEIGHT_PROT           1*/
114    
115    /* ---------- TCP options ---------- */
116    #define LWIP_TCP                1
117    #define TCP_TTL                 255
118    
119    /* Controls if TCP should queue segments that arrive out of
120       order. Define to 0 if your device is low on memory. */
121    #define TCP_QUEUE_OOSEQ         1
122    
123    /* TCP Maximum segment size. */
124    #define TCP_MSS                 128
125    
126    /* TCP sender buffer space (bytes). */
127    #define TCP_SND_BUF             256
128    
129    /* TCP sender buffer space (pbufs). This must be at least = 2 *
130       TCP_SND_BUF/TCP_MSS for things to work. */
131    #define TCP_SND_QUEUELEN        4 * TCP_SND_BUF/TCP_MSS
132    
133    /* TCP receive window. */
134    #define TCP_WND                 1024
135    
136    /* Maximum number of retransmissions of data segments. */
137    #define TCP_MAXRTX              12
138    
139    /* Maximum number of retransmissions of SYN segments. */
140    #define TCP_SYNMAXRTX           4
141    
142    /* TCP writable space (bytes). This must be less than or equal
143       to TCP_SND_BUF. It is the amount of space which must be
144       available in the tcp snd_buf for select to return writable */
145    #define TCP_SNDLOWAT            TCP_SND_BUF/2
146    
147    /* ---------- ARP options ---------- */
148    #define ARP_TABLE_SIZE 10
149    #define ARP_QUEUEING 1
150    /**
151     * - If enabled, cache entries are generated for every kind of ARP traffic or
152     * broadcast IP traffic. This enhances behaviour for sending to a dynamic set
153     * of hosts, for example if acting as a gateway.
154     * - If disabled, cache entries are generated only for IP destination addresses
155     * in use by lwIP or applications. This enhances performance if sending to a small,
156     * reasonably static number of hosts. Typically for embedded devices.
157     */
158    #define ETHARP_ALWAYS_INSERT 1
159    
160    
161    /* ---------- IP options ---------- */
162    /* Define IP_FORWARD to 1 if you wish to have the ability to forward
163       IP packets across network interfaces. If you are going to run lwIP
164       on a device with only one network interface, define this to 0. */
165    #define IP_FORWARD              1
166    
167    /* If defined to 1, IP options are allowed (but not parsed). If
168       defined to 0, all packets with IP options are dropped. */
169    #define IP_OPTIONS              1
170    
171    /* IP reassembly and segmentation.These are orthogonal even
172     * if they both deal with IP fragments */
173    #define IP_REASSEMBLY     1
174    #define IP_FRAG           1
175    
176    /* ---------- ICMP options ---------- */
177    #define ICMP_TTL                255
178    
179    /* ---------- DHCP options ---------- */
180    /* Define LWIP_DHCP to 1 if you want DHCP configuration of
181       interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
182       turning this on does currently not work. */
183    #define LWIP_DHCP               0
184    
185    /* 1 if you want to do an ARP check on the offered address
186       (recommended). */
187    #define DHCP_DOES_ARP_CHECK     1
188    
189    /* ---------- UDP options ---------- */
190    #define LWIP_UDP                1
191    #define UDP_TTL                 255
192    
193    
194    /* ---------- Statistics options ---------- */
195    #define STATS
196    
197    #ifdef STATS
198    #define LINK_STATS
199    #define IP_STATS
200    #define ICMP_STATS
201    #define UDP_STATS
202    #define TCP_STATS
203    #define MEM_STATS
204    #define MEMP_STATS
205    #define PBUF_STATS
206    #define SYS_STATS
207    #endif /* STATS */
208    
209    
210    /*FIXME*/
211    
212    
213  #ifndef ICMP_TTL  #ifndef ICMP_TTL
214  #define ICMP_TTL                255  #define ICMP_TTL                255
215  #endif  #endif
# Line 96  Line 270 
270  #define LWIP_CALLBACK_API 0  #define LWIP_CALLBACK_API 0
271  #endif /* LWIP_CALLBACK_API */  #endif /* LWIP_CALLBACK_API */
272    
273    /* Debugging options all default to off */
274    
275    #ifndef DEMO_DEBUG
276    #define DEMO_DEBUG      DBG_OFF
277    #endif
278    
279    #ifndef ETHARP_DEBUG
280    #define ETHARP_DEBUG     DBG_OFF
281    #endif
282    
283    #ifndef NETIF_DEBUG
284    #define NETIF_DEBUG      DBG_OFF
285    #endif
286    
287    #ifndef PBUF_DEBUG
288    #define PBUF_DEBUG       DBG_OFF
289    #endif
290    
291    #ifndef API_LIB_DEBUG
292    #define API_LIB_DEBUG    DBG_OFF
293    #endif
294    
295    #ifndef API_MSG_DEBUG
296    #define API_MSG_DEBUG    DBG_OFF
297    #endif
298    
299    #ifndef SOCKETS_DEBUG
300    #define SOCKETS_DEBUG    DBG_OFF
301    #endif
302    
303    #ifndef ICMP_DEBUG
304    #define ICMP_DEBUG       DBG_OFF
305    #endif
306    
307    #ifndef INET_DEBUG
308    #define INET_DEBUG       DBG_OFF
309    #endif
310    
311    #ifndef IP_DEBUG
312    #define IP_DEBUG         DBG_OFF
313    #endif
314    
315    #ifndef IP_REASS_DEBUG
316    #define IP_REASS_DEBUG   DBG_OFF
317    #endif
318    
319    #ifndef MEM_DEBUG
320    #define MEM_DEBUG        DBG_OFF
321    #endif
322    
323    #ifndef MEMP_DEBUG
324    #define MEMP_DEBUG       DBG_OFF
325    #endif
326    
327    #ifndef SYS_DEBUG
328    #define SYS_DEBUG        DBG_OFF
329    #endif
330    
331    #ifndef TCP_DEBUG
332    #define TCP_DEBUG        DBG_OFF
333    #endif
334    
335    #ifndef TCP_INPUT_DEBUG
336    #define TCP_INPUT_DEBUG  DBG_OFF
337    #endif
338    
339    #ifndef TCP_FR_DEBUG
340    #define TCP_FR_DEBUG     DBG_OFF
341    #endif
342    
343    #ifndef TCP_RTO_DEBUG
344    #define TCP_RTO_DEBUG    DBG_OFF
345    #endif
346    
347    #ifndef TCP_REXMIT_DEBUG
348    #define TCP_REXMIT_DEBUG DBG_OFF
349    #endif
350    
351    #ifndef TCP_CWND_DEBUG
352    #define TCP_CWND_DEBUG   DBG_OFF
353    #endif
354    
355    #ifndef TCP_WND_DEBUG
356    #define TCP_WND_DEBUG    DBG_OFF
357    #endif
358    
359    #ifndef TCP_OUTPUT_DEBUG
360    #define TCP_OUTPUT_DEBUG DBG_OFF
361    #endif
362    
363    #ifndef TCP_RST_DEBUG
364    #define TCP_RST_DEBUG    DBG_OFF
365    #endif
366    
367    #ifndef TCP_QLEN_DEBUG
368    #define TCP_QLEN_DEBUG   DBG_OFF
369    #endif
370    
371    #ifndef UDP_DEBUG
372    #define UDP_DEBUG        DBG_OFF
373    #endif
374    
375    #ifndef TCPIP_DEBUG
376    #define TCPIP_DEBUG      DBG_OFF
377    #endif
378    
379    #ifndef SLIP_DEBUG
380    #define SLIP_DEBUG       DBG_OFF
381    #endif
382    
383    #ifndef DHCP_DEBUG
384    #define DHCP_DEBUG       DBG_OFF
385    #endif
386    
387    
388  #endif /* __LWIP_OPT_H__ */  #endif /* __LWIP_OPT_H__ */
389    
390    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26