PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
lwipopts.h
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 0x600
22
28#define DEFAULT_THREAD_PRIO 0x18
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 0 //FJTRUJY disable it for IOP
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 4
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*/
107//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.
108#ifndef LWIP_TCPIP_CORE_LOCKING_INPUT
109#define MEMP_NUM_TCPIP_MSG_INPKT 24
110#endif
111
117//SP193: this should be around the size of MEM_SIZE (in PBUFs), to prevent transmissions from being potentially being dropped.
118#define MEMP_NUM_TCPIP_MSG_API 8
119
124#define MEMP_NUM_NETCONN (MEMP_NUM_TCP_PCB+MEMP_NUM_UDP_PCB)
125
129#define PBUF_POOL_SIZE 32 //SP193: should be at least ((TCP_WND/PBUF_POOL_BUFSIZE)+1). But that is too small to handle simultaneous connections.
130
139#define LWIP_TCPIP_CORE_LOCKING_INPUT 1
140
146#define SYS_LIGHTWEIGHT_PROT 1
147
148/*
149 ---------------------------------
150 ---------- TCP options ----------
151 ---------------------------------
152*/
153/* TCP Maximum segment size. */
154#define TCP_MSS 1460
155
156/* TCP sender buffer space (bytes). */
157#define TCP_SND_BUF (TCP_MSS*4)
158
159/* TCP receive window. */
160#define TCP_WND 32768
161
162/* ---------- DHCP options ---------- */
163#ifdef PS2IP_DHCP
167#define LWIP_DHCP 1
168#endif
169
173#define DHCP_DOES_ARP_CHECK 0 //Don't do the ARP check because an IP address would be first required.
174
181#define LWIP_DHCP_CHECK_LINK_UP 1
182
183/*
184 ----------------------------------
185 ---------- DNS options -----------
186 ----------------------------------
187*/
192#ifdef PS2IP_DNS
193#define LWIP_DNS 1
194#endif
195
196/* ---------- Statistics options ---------- */
200#define LWIP_STATS 0
201
202/*
203 --------------------------------------
204 ---------- Checksum options ----------
205 --------------------------------------
206*/
207//Rely on the Ethernet checksums to reduce the number of checksum compuations. If you require any of these, re-enable them.
211#define CHECKSUM_CHECK_IP 0
212
216#define CHECKSUM_CHECK_UDP 0
217
221#define CHECKSUM_CHECK_TCP 0
222
226#define CHECKSUM_CHECK_ICMP 0
227
231#define CHECKSUM_CHECK_ICMP6 0
232
237#define LWIP_CHECKSUM_ON_COPY 1
238
239/*
240 ------------------------------------
241 ---------- Socket options ----------
242 ------------------------------------
243*/
244/* LWIP_SOCKET_SET_ERRNO==1: Set errno when socket functions cannot complete
245 * successfully, as required by POSIX. Default is POSIX-compliant.
246 */
247#define LWIP_SOCKET_SET_ERRNO 0
253#define LWIP_POSIX_SOCKETS_IO_NAMES 0
254
255/*
256 ----------------------------------
257 ---------- DNS options -----------
258 ----------------------------------
259*/
264#define LWIP_DNS_SECURE 0
265
266/*
267 ------------------------------------------------
268 ---------- Network Interfaces options ----------
269 ------------------------------------------------
270*/
280#define LWIP_NETIF_TX_SINGLE_PBUF 1
281
282#endif /* __LWIPOPTS_H__ */