PS2SDK
PS2 Homebrew Libraries
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
7
#define LWIP_TIMEVAL_PRIVATE 0
8
9
/* ---------- Thread options ---------- */
27
#define DEFAULT_THREAD_STACKSIZE 0x600
28
34
#define DEFAULT_THREAD_PRIO 0x18
35
41
#define TCPIP_THREAD_STACKSIZE DEFAULT_THREAD_STACKSIZE
42
48
#define TCPIP_THREAD_PRIO DEFAULT_THREAD_PRIO
49
50
/*
51
------------------------------------
52
---------- Memory options ----------
53
------------------------------------
54
*/
55
/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
56
lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
57
byte alignment -> define MEM_ALIGNMENT to 2. */
58
#define MEM_ALIGNMENT 4
59
68
#define LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT 1
69
74
/* SP193: setting this too low may cause tcp_write() to fail when it tries to allocate from PBUF_RAM!
75
Up to TCP_SND_BUF * 2 segments may be transmitted at once, thanks to Nagle and Delayed Ack. */
76
#define MEM_SIZE (TCP_SND_BUF * 2)
77
78
/*
79
-----------------------------------------------
80
---------- IP options -------------------------
81
-----------------------------------------------
82
*/
89
#define IP_REASSEMBLY 0
90
95
#define IP_FRAG 0
96
97
/*
98
------------------------------------------------
99
---------- Internal Memory Pool Sizes ----------
100
------------------------------------------------
101
*/
109
#define MEMP_NUM_TCPIP_MSG_INPKT 24
110
115
#define MEMP_NUM_NETCONN (MEMP_NUM_TCP_PCB+MEMP_NUM_UDP_PCB)
116
120
#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.
121
130
#define LWIP_TCPIP_CORE_LOCKING 1
131
138
#define LWIP_TCPIP_CORE_LOCKING_INPUT 1
139
140
/*
141
---------------------------------
142
---------- TCP options ----------
143
---------------------------------
144
*/
145
/* TCP Maximum segment size. */
146
#define TCP_MSS 1460
147
148
/* TCP sender buffer space (bytes). */
149
#define TCP_SND_BUF (TCP_MSS*4)
150
151
/* TCP receive window. */
152
#define TCP_WND 32768
153
154
/* ---------- DHCP options ---------- */
155
#ifdef PS2IP_DHCP
156
159
#define LWIP_DHCP 1
160
#endif
161
169
#define LWIP_DHCP_DOES_ACD_CHECK 0
170
#define LWIP_ACD 0
171
172
/*
173
----------------------------------
174
---------- DNS options -----------
175
----------------------------------
176
*/
181
#ifdef PS2IP_DNS
182
#define LWIP_DNS 1
183
#endif
184
185
/* ---------- Statistics options ---------- */
189
#define LWIP_STATS 0
190
191
/*
192
--------------------------------------
193
---------- Checksum options ----------
194
--------------------------------------
195
*/
196
//Rely on the Ethernet checksums to reduce the number of checksum compuations. If you require any of these, re-enable them.
200
#define CHECKSUM_CHECK_IP 0
201
205
#define CHECKSUM_CHECK_UDP 0
206
210
#define CHECKSUM_CHECK_TCP 0
211
215
#define CHECKSUM_CHECK_ICMP 0
216
220
#define CHECKSUM_CHECK_ICMP6 0
221
226
#define LWIP_CHECKSUM_ON_COPY 1
227
228
/*
229
------------------------------------
230
---------- Socket options ----------
231
------------------------------------
232
*/
238
#define LWIP_POSIX_SOCKETS_IO_NAMES 0
239
240
/*
241
----------------------------------
242
---------- DNS options -----------
243
----------------------------------
244
*/
249
#define LWIP_DNS_SECURE 0
250
251
/*
252
------------------------------------------------
253
---------- Network Interfaces options ----------
254
------------------------------------------------
255
*/
265
#define LWIP_NETIF_TX_SINGLE_PBUF 1
266
267
#endif
/* __LWIPOPTS_H__ */
iop
tcpip
tcpip-base
include
lwipopts.h
Generated on Thu Sep 17 2026 15:43:24 for PS2SDK by
1.8.17