STM32Ethernet
Arduino Ethernet library for STM32 boards
Loading...
Searching...
No Matches
lwipopts_default.h
Go to the documentation of this file.
1
22#ifndef __LWIPOPTS_H__
23#define __LWIPOPTS_H__
24
29#define NO_SYS 1
30
31/* LWIP Debug options */
32#if !defined(NDEBUG)
33 #define LWIP_DBG_DEFAULT LWIP_DBG_ON
34#else
35 #define LWIP_DBG_DEFAULT LWIP_DBG_OFF
36#endif /* NDEBUG */
37
38#if !defined(LWIP_DEBUG)
39 #define LWIP_DEBUG LWIP_DBG_DEFAULT
40#endif /* LWIP_DEBUG */
41#if !defined(NETIF_DEBUG)
42 #define NETIF_DEBUG LWIP_DBG_DEFAULT
43#endif /* NETIF_DEBUG */
44#if !defined(DHCP_DEBUG)
45 #define DHCP_DEBUG LWIP_DBG_DEFAULT
46#endif /* DHCP_DEBUG */
47#if !defined(UDP_DEBUG)
48 #define UDP_DEBUG LWIP_DBG_DEFAULT
49#endif /* UDP_DEBUG */
50#if !defined(MEMP_DEBUG)
51 #define MEMP_DEBUG LWIP_DBG_DEFAULT
52#endif /* MEMP_DEBUG */
53#if !defined(MEM_DEBUG)
54 #define MEM_DEBUG LWIP_DBG_DEFAULT
55#endif /* MEM_DEBUG */
56#if !defined(ICMP_DEBUG)
57 #define ICMP_DEBUG LWIP_DBG_DEFAULT
58#endif /* ICMP_DEBUG */
59
65#define SYS_LIGHTWEIGHT_PROT 0
66
67#define LWIP_NOASSERT
68
69/* ---------- Memory options ---------- */
70/* MEM_ALIGNMENT: should be set to the alignment of the CPU for which
71 lwIP is compiled. 4 byte alignment -> define MEM_ALIGNMENT to 4, 2
72 byte alignment -> define MEM_ALIGNMENT to 2. */
73#define MEM_ALIGNMENT 4
74
75/* MEM_SIZE: the size of the heap memory. If the application will send
76a lot of data that needs to be copied, this should be set high. */
77#define MEM_SIZE (10*1024)
78
79/* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
80 sends a lot of data out of ROM (or other static memory), this
81 should be set high. */
82#define MEMP_NUM_PBUF 10
83/* MEMP_NUM_UDP_PCB: the number of UDP protocol control blocks. One
84 per active UDP "connection". */
85#define MEMP_NUM_UDP_PCB 6
86/* MEMP_NUM_TCP_PCB: the number of simultaneously active TCP
87 connections. */
88#define MEMP_NUM_TCP_PCB 10
89/* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
90 connections. */
91#define MEMP_NUM_TCP_PCB_LISTEN 6
92/* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
93 segments. */
94#define MEMP_NUM_TCP_SEG 8
95/* MEMP_NUM_SYS_TIMEOUT: the number of simultaneously active
96 timeouts. */
97#define MEMP_NUM_SYS_TIMEOUT 10
98
99
100/* ---------- Pbuf options ---------- */
101/* PBUF_POOL_SIZE: the number of buffers in the pbuf pool. */
102#define PBUF_POOL_SIZE 8
103
104/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
105#define PBUF_POOL_BUFSIZE 1524
106
107
108/* ---------- TCP options ---------- */
109#define LWIP_TCP 1
110#define TCP_TTL 255
111#define LWIP_SO_RCVTIMEO 1
112#define LWIP_SO_RCVRCVTIMEO_NONSTANDARD 1 /* Pass an integer number of ms instead of a timeval struct. */
113#define LWIP_SO_SNDTIMEO 1
114#define LWIP_SO_SNDRCVTIMEO_NONSTANDARD 1 /* Pass an integer number of ms instead of a timeval struct. */
115
116/* Controls if TCP should queue segments that arrive out of
117 order. Define to 0 if your device is low on memory and you are not scared by TCP congestion and latencies. */
118#define TCP_QUEUE_OOSEQ 0
119
120/* TCP Maximum segment size. */
121#define TCP_MSS (1500 - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */
122
123/* TCP sender buffer space (bytes). */
124#define TCP_SND_BUF (4*TCP_MSS)
125
126/* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
127 as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */
128
129#define TCP_SND_QUEUELEN (2* TCP_SND_BUF/TCP_MSS)
130
131/* TCP receive window. */
132#define TCP_WND (4*TCP_MSS)
133
134#define LWIP_TCP_KEEPALIVE 1 /* Keep the TCP link active. Important for MQTT/TLS */
135#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 1 /* Prevent the same port to be used after reset.
136 Otherwise, the remote host may be confused if the port was not explicitly closed before the reset. */
137
138
139/* ---------- ICMP options ---------- */
140#define LWIP_ICMP 1
141#define LWIP_RAW 1 /* PING changed to 1 */
142#define DEFAULT_RAW_RECVMBOX_SIZE 3 /* for ICMP PING */
143
144
145/* ---------- DHCP options ---------- */
146/* Define LWIP_DHCP to 1 if you want DHCP configuration of
147 interfaces. DHCP is not implemented in lwIP 0.5.1, however, so
148 turning this on does currently not work. */
149#define LWIP_DHCP 1
150
151
152/* ---------- UDP options ---------- */
153#define LWIP_UDP 1
154#define UDP_TTL 255
155
156
157/* ---------- Statistics options ---------- */
158#define LWIP_STATS 0
159#define LWIP_PROVIDE_ERRNO
160
161/* ---------- link callback options ---------- */
162/* LWIP_NETIF_LINK_CALLBACK==1: Support a callback function from an interface
163 * whenever the link changes (i.e., link down)
164 */
165// need for building net_ip.c
166#define LWIP_NETIF_HOSTNAME 1
167#define LWIP_NETIF_STATUS_CALLBACK 1
168#define LWIP_NETIF_LINK_CALLBACK 1
169#define LWIP_DHCP_CHECK_LINK_UP 1
170
171/*
172 --------------------------------------
173 ---------- Checksum options ----------
174 --------------------------------------
175*/
176
177/*
178The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums by hardware:
179 - To use this feature let the following define uncommented.
180 - To disable it and process by CPU comment the the checksum.
182#define CHECKSUM_BY_HARDWARE
183
184
185#ifdef CHECKSUM_BY_HARDWARE
186 /* CHECKSUM_GEN_IP==0: Generate checksums by hardware for outgoing IP packets.*/
187 #define CHECKSUM_GEN_IP 0
188 /* CHECKSUM_GEN_UDP==0: Generate checksums by hardware for outgoing UDP packets.*/
189 #define CHECKSUM_GEN_UDP 0
190 /* CHECKSUM_GEN_TCP==0: Generate checksums by hardware for outgoing TCP packets.*/
191 #define CHECKSUM_GEN_TCP 0
192 /* CHECKSUM_CHECK_IP==0: Check checksums by hardware for incoming IP packets.*/
193 #define CHECKSUM_CHECK_IP 0
194 /* CHECKSUM_CHECK_UDP==0: Check checksums by hardware for incoming UDP packets.*/
195 #define CHECKSUM_CHECK_UDP 0
196 /* CHECKSUM_CHECK_TCP==0: Check checksums by hardware for incoming TCP packets.*/
197 #define CHECKSUM_CHECK_TCP 0
198 /* CHECKSUM_CHECK_ICMP==0: Check checksums by hardware for incoming ICMP packets.*/
199 #define CHECKSUM_GEN_ICMP 0
200#else
201 /* CHECKSUM_GEN_IP==1: Generate checksums in software for outgoing IP packets.*/
202 #define CHECKSUM_GEN_IP 1
203 /* CHECKSUM_GEN_UDP==1: Generate checksums in software for outgoing UDP packets.*/
204 #define CHECKSUM_GEN_UDP 1
205 /* CHECKSUM_GEN_TCP==1: Generate checksums in software for outgoing TCP packets.*/
206 #define CHECKSUM_GEN_TCP 1
207 /* CHECKSUM_CHECK_IP==1: Check checksums in software for incoming IP packets.*/
208 #define CHECKSUM_CHECK_IP 1
209 /* CHECKSUM_CHECK_UDP==1: Check checksums in software for incoming UDP packets.*/
210 #define CHECKSUM_CHECK_UDP 1
211 /* CHECKSUM_CHECK_TCP==1: Check checksums in software for incoming TCP packets.*/
212 #define CHECKSUM_CHECK_TCP 1
213 /* CHECKSUM_CHECK_ICMP==1: Check checksums by hardware for incoming ICMP packets.*/
214 #define CHECKSUM_GEN_ICMP 1
215#endif
216
217
218/*
219 ----------------------------------------------
220 ---------- Sequential layer options ----------
221 ----------------------------------------------
222*/
226#define LWIP_NETCONN 0
227
228/*
229 ------------------------------------
230 ---------- Socket options ----------
231 ------------------------------------
232*/
236#define LWIP_SOCKET 0
237#define LWIP_DNS 1
238
239/*
240 ------------------------------------
241 ---------- httpd options ----------
242 ------------------------------------
243*/
244
246#define LWIP_HTTPD_CGI 1
247
249#define LWIP_HTTPD_SSI 1
250
253#define HTTPD_USE_CUSTOM_FSDATA 0
254
255/*
256 ------------------------------------
257 ---------- Custom options ----------
258 ------------------------------------
259*/
260
264#define ETHERNET_RMII_MODE_CONFIGURATION 1
265
269//#define ETH_INPUT_USE_IT 1
270
271#endif /* __LWIPOPTS_H__ */
272
273/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/