OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [ARM9_STR91X_IAR/] [lwip/] [include/] [lwip/] [lwipopts.h] - Blame information for rev 585

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 577 jeremybenn
/*
2
 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3
 * All rights reserved.
4
 *
5
 * Redistribution and use in source and binary forms, with or without modification,
6
 * are permitted provided that the following conditions are met:
7
 *
8
 * 1. Redistributions of source code must retain the above copyright notice,
9
 *    this list of conditions and the following disclaimer.
10
 * 2. Redistributions in binary form must reproduce the above copyright notice,
11
 *    this list of conditions and the following disclaimer in the documentation
12
 *    and/or other materials provided with the distribution.
13
 * 3. The name of the author may not be used to endorse or promote products
14
 *    derived from this software without specific prior written permission.
15
 *
16
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
17
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
19
 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
21
 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25
 * OF SUCH DAMAGE.
26
 *
27
 * This file is part of the lwIP TCP/IP stack.
28
 *
29
 * Author: Adam Dunkels <adam@sics.se>
30
 *
31
 */
32
#ifndef __LWIPOPTS_H__
33
#define __LWIPOPTS_H__
34
 
35
#define LWIP_NOASSERT 1 // To suppress some errors for now (no debug output)
36
#define SYS_LIGHTWEIGHT_PROT            1
37
 
38
#define TCPIP_THREAD_PRIO       3
39
 
40
#define ETH_PAD_SIZE 2
41
 
42
/* ---------- Memory options ---------- */
43
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
44
   lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
45
   byte alignment -> define MEM_ALIGNMENT to 2. */
46
#define MEM_ALIGNMENT           4
47
 
48
/* MEM_SIZE: the size of the heap memory. If the application will send
49
a lot of data that needs to be copied, this should be set high. */
50
#define MEM_SIZE                8000
51
 
52
/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
53
   sends a lot of data out of ROM (or other static memory), this
54
   should be set high. */
55
#define MEMP_NUM_PBUF           40
56
/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
57
   per active UDP "connection". */
58
#define MEMP_NUM_UDP_PCB        4
59
/* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
60
   connections. */
61
#define MEMP_NUM_TCP_PCB        10
62
/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
63
   connections. */
64
#define MEMP_NUM_TCP_PCB_LISTEN 8
65
/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
66
   segments. */
67
#define MEMP_NUM_TCP_SEG        8
68
/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
69
   timeouts. */
70
#define MEMP_NUM_SYS_TIMEOUT    3
71
 
72
 
73
/* The following four are used only with the sequential API and can be
74
   set to 0 if the application only will use the raw API. */
75
/* MEMP_NUM_NETBUF: the number of struct netbufs. */
76
#define MEMP_NUM_NETBUF         4
77
/* MEMP_NUM_NETCONN: the number of struct netconns. */
78
#define MEMP_NUM_NETCONN        4
79
/* MEMP_NUM_APIMSG: the number of struct api_msg, used for
80
   communication between the TCP/IP stack and the sequential
81
   programs. */
82
#define MEMP_NUM_API_MSG        8
83
/* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
84
   for sequential API communication and incoming packets. Used in
85
   src/api/tcpip.c. */
86
#define MEMP_NUM_TCPIP_MSG      8
87
 
88
/* These two control is reclaimer functions should be compiled
89
   in. Should always be turned on (1). */
90
#define MEM_RECLAIM             1
91
#define MEMP_RECLAIM            1
92
 
93
/* ---------- Pbuf options ---------- */
94
/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
95
#define PBUF_POOL_SIZE          8
96
 
97
/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
98
#define PBUF_POOL_BUFSIZE       1500
99
 
100
/* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
101
   link level header. */
102
#define PBUF_LINK_HLEN          16
103
 
104
/* ---------- TCP options ---------- */
105
#define LWIP_TCP                1
106
#define TCP_TTL                 255
107
 
108
/* Controls if TCP should queue segments that arrive out of
109
   order. Define to 0 if your device is low on memory. */
110
#define TCP_QUEUE_OOSEQ         1
111
 
112
/* TCP Maximum segment size. */
113
#define TCP_MSS                 1500
114
 
115
/* TCP sender buffer space (bytes). */
116
#define TCP_SND_BUF             1500
117
 
118
/* TCP sender buffer space (pbufs). This must be at least = 2 *
119
   TCP_SND_BUF/TCP_MSS for things to work. */
120
#define TCP_SND_QUEUELEN        6 * TCP_SND_BUF/TCP_MSS
121
 
122
/* TCP receive window. */
123
#define TCP_WND                 1500
124
 
125
/* Maximum number of retransmissions of data segments. */
126
#define TCP_MAXRTX              12
127
 
128
/* Maximum number of retransmissions of SYN segments. */
129
#define TCP_SYNMAXRTX           4
130
 
131
/* ---------- ARP options ---------- */
132
#define ARP_TABLE_SIZE 10
133
#define ARP_QUEUEING 1
134
 
135
/* ---------- IP options ---------- */
136
/* Define IP_FORWARD to 1 if you wish to have the ability to forward
137
   IP packets across network interfaces. If you are going to run lwIP
138
   on a device with only one network interface, define this to 0. */
139
#define IP_FORWARD              1
140
 
141
/* If defined to 1, IP options are allowed (but not parsed). If
142
   defined to 0, all packets with IP options are dropped. */
143
#define IP_OPTIONS              1
144
 
145
/** IP reassembly and segmentation. Even if they both deal with IP
146
 *  fragments, note that these are orthogonal, one dealing with incoming
147
 *  packets, the other with outgoing packets
148
 */
149
 
150
/** Reassemble incoming fragmented IP packets */
151
#define IP_REASSEMBLY                   0
152
 
153
/** Fragment outgoing IP packets if their size exceeds MTU */
154
#define IP_FRAG                         1
155
 
156
/* IP reassemly default age in seconds */
157
#define IP_REASS_MAXAGE                                                                 30
158
 
159
 
160
/* ---------- ICMP options ---------- */
161
#define ICMP_TTL                255
162
 
163
 
164
/* ---------- DHCP options ---------- */
165
/* Define LWIP_DHCP to 1 if you want DHCP configuration of
166
   interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
167
   turning this on does currently not work. */
168
#define LWIP_DHCP               0
169
 
170
/* 1 if you want to do an ARP check on the offered address
171
   (recommended). */
172
#define DHCP_DOES_ARP_CHECK     1
173
 
174
/* ---------- UDP options ---------- */
175
#define LWIP_UDP                1
176
#define UDP_TTL                 255
177
 
178
 
179
/* ---------- Statistics options ---------- */
180
#define STATS
181
 
182
#ifdef STATS
183
#define LINK_STATS 1
184
#define IP_STATS   1
185
#define ICMP_STATS 1
186
#define UDP_STATS  1
187
#define TCP_STATS  1
188
#define MEM_STATS  1
189
#define MEMP_STATS 1
190
#define PBUF_STATS 1
191
#define SYS_STATS  1
192
#endif /* STATS */
193
 
194
#endif /* __LWIPOPTS_H__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.