ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
lwipopts.h
Go to the documentation of this file.
1 /* If changes are made to this file, please update the defined
2  values at the bottom of common/include/tcpip.h too. */
3 
4 #ifndef __LWIPOPTS_H__
5 #define __LWIPOPTS_H__
6 
11 #define NO_SYS 0
12 
13 #define LWIP_TIMEVAL_PRIVATE 0
14 
15 /* ---------- Thread options ---------- */
21 #define DEFAULT_THREAD_STACKSIZE 0x1000
22 
28 #define DEFAULT_THREAD_PRIO 0x58
29 
35 #define TCPIP_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
36 
42 #define TCPIP_THREAD_PRIO DEFAULT_THREAD_PRIO
43 
49 #define SLIPIF_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
50 
56 #define SLIPIF_THREAD_PRIO DEFAULT_THREAD_PRIO
57 
63 #define PPP_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
64 
70 #define PPP_THREAD_PRIO DEFAULT_THREAD_PRIO
71 
72 /*
73  ------------------------------------
74  ---------- Memory options ----------
75  ------------------------------------
76 */
82 #define MEM_LIBC_MALLOC 1
83 
84 /* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
85  lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
86  byte alignment -> define MEM_ALIGNMENT to 2. */
87 #define MEM_ALIGNMENT 64 //SP193: must be 64, to deal with the EE cache design.
88 
93 /* SP193: setting this too low may cause tcp_write() to fail when it tries to allocate from PBUF_RAM!
94  Up to TCP_SND_BUF * 2 segments may be transmitted at once, thanks to Nagle and Delayed Ack. */
95 #define MEM_SIZE (TCP_SND_BUF * 2)
96 
97 /*
98  ------------------------------------------------
99  ---------- Internal Memory Pool Sizes ----------
100  ------------------------------------------------
101 */
106 #define MEMP_NUM_NETCONN (MEMP_NUM_TCP_PCB+MEMP_NUM_UDP_PCB)
107 
111 //SP193: should be at least ((TCP_WND/PBUF_POOL_BUFSIZE)+1). But that is too small to accommodate data not accepted by the application layer and multiple connections.
112 //NETMAN will also always have PBUFs reserved for incoming frames (currently 64).
113 #define PBUF_POOL_SIZE 128
114 
120 //SP193: this should be around the size of the TCP window because the TCPIP thread may take a while to execute (non-preemptive multitasking), otherwise incoming frames may get dropped.
121 #ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
122 #define MEMP_NUM_TCPIP_MSG_INPKT 50
123 #endif
124 
130 //SP193: this should be around the size of MEM_SIZE (in PBUFs), to prevent transmissions from being potentially being dropped.
131 #define MEMP_NUM_TCPIP_MSG_API 50
132 
137 #define MEMP_NUM_TCP_SEG TCP_SND_QUEUELEN
138 
147 #define LWIP_TCPIP_CORE_LOCKING_INPUT 1
148 
154 #define SYS_LIGHTWEIGHT_PROT 1
155 
156 /*
157  ---------------------------------
158  ---------- TCP options ----------
159  ---------------------------------
160 */
161 /* TCP Maximum segment size. */
162 #define TCP_MSS 1460
163 
164 /* TCP sender buffer space (bytes). */
165 #define TCP_SND_BUF (TCP_MSS*32)
166 
167 /* TCP receive window. */
168 #define TCP_WND 65535
169 
170 /* ---------- DHCP options ---------- */
171 #ifdef PS2IP_DHCP
175 #define LWIP_DHCP 1
176 #endif
177 
181 #define DHCP_DOES_ARP_CHECK 0 //Don't do the ARP check because an IP address would be first required.
182 
189 #define LWIP_DHCP_CHECK_LINK_UP 1
190 
191 /*
192  ----------------------------------
193  ---------- DNS options -----------
194  ----------------------------------
195 */
200 #ifdef PS2IP_DNS
201 #define LWIP_DNS 1
202 #endif
203 
204 /* ---------- Statistics options ---------- */
208 #define LWIP_STATS 0
209 
210 /*
211  --------------------------------------
212  ---------- Checksum options ----------
213  --------------------------------------
214 */
215 //Rely on the Ethernet checksums to reduce the number of checksum compuations. If you require any of these, re-enable them.
219 #define CHECKSUM_CHECK_IP 0
220 
224 #define CHECKSUM_CHECK_UDP 0
225 
229 #define CHECKSUM_CHECK_TCP 0
230 
234 #define CHECKSUM_CHECK_ICMP 0
235 
239 #define CHECKSUM_CHECK_ICMP6 0
240 
245 #define LWIP_CHECKSUM_ON_COPY 1
246 
247 /*
248  ------------------------------------
249  ---------- Socket options ----------
250  ------------------------------------
251 */
252 /* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete
253  * successfully, as required by POSIX. Default is POSIX-compliant.
254  */
255 #define LWIP_SOCKET_SET_ERRNO 0
261 #define LWIP_POSIX_SOCKETS_IO_NAMES 0
262 
263 /*
264  ----------------------------------
265  ---------- DNS options -----------
266  ----------------------------------
267 */
272 #define LWIP_DNS_SECURE 0
273 
274 /*
275  ------------------------------------------------
276  ---------- Network Interfaces options ----------
277  ------------------------------------------------
278 */
288 #define LWIP_NETIF_TX_SINGLE_PBUF 1
289 
290 #endif /* __LWIPOPTS_H__ */