remove net_gethostip() from network.h, its in SVN now
[libogc.git] / gc / lwip / lwipopts.h
blobb671f47c92a00ee182810bb0ac9e4651b353baa1
1 /*
2 * Copyright (c) 2001-2003 Swedish Institute of Computer Science.
3 * All rights reserved.
5 * Redistribution and use in source and binary forms, with or without modification,
6 * are permitted provided that the following conditions are met:
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.
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.
27 * This file is part of the lwIP TCP/IP stack.
29 * Author: Adam Dunkels <adam@sics.se>
32 #ifndef __LWIPOPTS_H__
33 #define __LWIPOPTS_H__
35 #include <string.h>
37 #define BYTE_ORDER BIG_ENDIAN
38 #define NO_SYS 1
39 #define LWIP_CALLBACK_API 1
40 #undef LWIP_EVENT_API
41 #define TCPIP_THREAD_PRIO 125
42 #define SYS_LIGHTWEIGHT_PROT 1
44 /* ---------- Memory options ---------- */
45 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
46 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
47 byte alignment -> define MEM_ALIGNMENT to 2. */
48 #define MEM_ALIGNMENT 4
50 /* MEM_SIZE: the size of the heap memory. If the application will send
51 a lot of data that needs to be copied, this should be set high. */
52 #define MEM_SIZE (192*1024)
54 /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
55 sends a lot of data out of ROM (or other static memory), this
56 should be set high. */
57 #define MEMP_NUM_PBUF 128
58 /* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
59 per active UDP "connection". */
60 #define MEMP_NUM_UDP_PCB 16
61 /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
62 connections. */
63 #define MEMP_NUM_TCP_PCB 16
64 /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
65 connections. */
66 #define MEMP_NUM_TCP_PCB_LISTEN 8
67 /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
68 segments. */
69 #define MEMP_NUM_TCP_SEG 128
71 /* The following four are used only with the sequential API and can be
72 set to 0 if the application only will use the raw API. */
73 /* MEMP_NUM_NETBUF: the number of struct netbufs. */
74 #define MEMP_NUM_NETBUF 16
75 /* MEMP_NUM_NETCONN: the number of struct netconns. */
76 #define MEMP_NUM_NETCONN 16
77 /* MEMP_NUM_APIMSG: the number of struct api_msg, used for
78 communication between the TCP/IP stack and the sequential
79 programs. */
80 #define MEMP_NUM_API_MSG 128
81 /* MEMP_NUM_TCPIPMSG: the number of struct tcpip_msg, which is used
82 for sequential API communication and incoming packets. Used in
83 src/api/tcpip.c. */
84 #define MEMP_NUM_TCPIP_MSG 128
85 /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
86 timeouts. */
87 #define MEMP_NUM_SYS_TIMEOUT 0
89 /* ---------- Pbuf options ---------- */
90 /* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
91 #define PBUF_POOL_SIZE 128 //128
93 /* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
94 #define PBUF_POOL_BUFSIZE 1600
96 /* PBUF_LINK_HLEN: the number of bytes that should be allocated for a
97 link level header. */
98 #define PBUF_LINK_HLEN 16
100 /* ---------- TCP options ---------- */
101 #define LWIP_TCP 1
102 #define TCP_TTL 255
104 /* Controls if TCP should queue segments that arrive out of
105 order. Define to 0 if your device is low on memory. */
106 #define TCP_QUEUE_OOSEQ 1
108 /* TCP Maximum segment size. */
109 #define TCP_MSS 1460
111 /* TCP sender buffer space (bytes). */
112 #define TCP_SND_BUF (36*TCP_MSS)
114 /* TCP sender buffer space (pbufs). This must be at least = 2 *
115 TCP_SND_BUF/TCP_MSS for things to work. */
116 #define TCP_SND_QUEUELEN (36*TCP_SND_BUF/TCP_MSS)
118 /* TCP receive window. */
119 #define TCP_WND (36*TCP_MSS)
121 /* Maximum number of retransmissions of data segments. */
122 #define TCP_MAXRTX 12
124 /* Maximum number of retransmissions of SYN segments. */
125 #define TCP_SYNMAXRTX 4
127 /* ---------- ARP options ---------- */
129 * - If enabled, cache entries are generated for every kind of ARP traffic or
130 * broadcast IP traffic. This enhances behaviour for sending to a dynamic set
131 * of hosts, for example if acting as a gateway.
132 * - If disabled, cache entries are generated only for IP destination addresses
133 * in use by lwIP or applications. This enhances performance if sending to a small,
134 * reasonably static number of hosts. Typically for embedded devices.
137 /* ---------- IP options ---------- */
138 /* Define IP_FORWARD to 1 if you wish to have the ability to forward
139 IP packets across network interfaces. If you are going to run lwIP
140 on a device with only one network interface, define this to 0. */
141 #define IP_FORWARD 0
143 /* If defined to 1, IP options are allowed (but not parsed). If
144 defined to 0, all packets with IP options are dropped. */
145 #define IP_OPTIONS 1
147 /* ---------- ICMP options ---------- */
148 #define ICMP_TTL 255
151 /* ---------- DHCP options ---------- */
152 /* Define LWIP_DHCP to 1 if you want DHCP configuration of
153 interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
154 turning this on does currently not work. */
155 #define LWIP_DHCP 1
157 /* 1 if you want to do an ARP check on the offered address
158 (recommended). */
159 #define DHCP_DOES_ARP_CHECK 1
161 /* ---------- UDP options ---------- */
162 #define LWIP_UDP 1
163 #define UDP_TTL 255
165 #define LWIP_STATS 0
166 /* ---------- Statistics options ---------- */
167 /*#define STATS*/
168 #if LWIP_STATS
169 #define LINK_STATS 0
170 #define IP_STATS 0
171 #define ICMP_STATS 0
172 #define UDP_STATS 0
173 #define TCP_STATS 0
174 #define MEM_STATS 0
175 #define MEMP_STATS 0
176 #define PBUF_STATS 0
177 #define SYS_STATS 0
178 #define RAW_STATS 0
179 #endif
181 #ifdef LWIP_DEBUG
182 #define DBG_TYPES_ON -1
183 #define DEMO_DEBUG DBG_OFF
184 #define ETHARP_DEBUG DBG_OFF
185 #define NETIF_DEBUG DBG_OFF
186 #define PBUF_DEBUG DBG_OFF
187 #define API_LIB_DEBUG DBG_OFF
188 #define API_MSG_DEBUG DBG_ON
189 #define SOCKETS_DEBUG DBG_OFF
190 #define ICMP_DEBUG DBG_OFF
191 #define INET_DEBUG DBG_OFF
192 #define IP_DEBUG DBG_OFF
193 #define IP_REASS_DEBUG DBG_OFF
194 #define MEM_DEBUG DBG_OFF
195 #define MEMP_DEBUG DBG_OFF
196 #define SYS_DEBUG DBG_OFF
197 #define RAW_DEBUG DBG_OFF
198 #define TCP_DEBUG DBG_OFF
199 #define TCP_INPUT_DEBUG DBG_OFF
200 #define TCP_FR_DEBUG DBG_OFF
201 #define TCP_RTO_DEBUG DBG_OFF
202 #define TCP_REXMIT_DEBUG DBG_OFF
203 #define TCP_CWND_DEBUG DBG_OFF
204 #define TCP_WND_DEBUG DBG_OFF
205 #define TCP_OUTPUT_DEBUG DBG_OFF
206 #define TCP_RST_DEBUG DBG_OFF
207 #define TCP_QLEN_DEBUG DBG_OFF
208 #define UDP_DEBUG DBG_OFF
209 #define TCPIP_DEBUG DBG_OFF
210 #define PPP_DEBUG DBG_OFF
211 #define SLIP_DEBUG DBG_OFF
212 #define DHCP_DEBUG DBG_OFF
214 #define DBG_MIN_LEVEL DBG_LEVEL_OFF
215 #endif
218 #endif /* __LWIPOPTS_H__ */