summaryrefslogtreecommitdiffstats
path: root/app/lwip/lwipopts.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/lwip/lwipopts.h')
-rw-r--r--app/lwip/lwipopts.h39
1 files changed, 24 insertions, 15 deletions
diff --git a/app/lwip/lwipopts.h b/app/lwip/lwipopts.h
index 7d208a3..ee49f7c 100644
--- a/app/lwip/lwipopts.h
+++ b/app/lwip/lwipopts.h
@@ -44,6 +44,7 @@
#define UDP_DEBUG LWIP_DBG_ON
#define IP_DEBUG LWIP_DBG_ON
#define ETHARP_DEBUG LWIP_DBG_ON
+#define HTTPD_DEBUG LWIP_DBG_ON
#define TIMERS_DEBUG LWIP_DBG_ON
#define LWIP_DBG_TYPES_ON (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT)
#define LWIP_DEBUG 1
@@ -97,7 +98,7 @@ a lot of data that needs to be copied, this should be set high. */
#define MEMP_NUM_TCP_SEG 12
/* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
timeouts. */
-#define MEMP_NUM_SYS_TIMEOUT 4
+#define MEMP_NUM_SYS_TIMEOUT 6
#define PBUF_POOL_FREE_OOSEQ 0
@@ -111,26 +112,29 @@ a lot of data that needs to be copied, this should be set high. */
/* ---------- TCP options ---------- */
-#define LWIP_TCP 0
+#define LWIP_TCP 1
#define TCP_TTL 255
-/* Controls if TCP should queue segments that arrive out of
- order. Define to 0 if your device is low on memory. */
-#define TCP_QUEUE_OOSEQ 0
+#define TCP_WND (4 * TCP_MSS)
+#define TCP_MAXRTX 12
+#define TCP_SYNMAXRTX 6
+#define TCP_QUEUE_OOSEQ LWIP_TCP
+#define LWIP_TCP_SACK_OUT 0
+#define LWIP_TCP_MAX_SACK_NUM 4
+#define TCP_MSS 536
+#define TCP_CALCULATE_EFF_SEND_MSS 1
+#define TCP_SND_BUF (2 * TCP_MSS)
+#define TCP_SND_QUEUELEN ((4 * (TCP_SND_BUF) + (TCP_MSS - 1))/(TCP_MSS))
+#define TCP_SNDLOWAT LWIP_MIN(LWIP_MAX(((TCP_SND_BUF)/2), (2 * TCP_MSS) + 1), (TCP_SND_BUF) - 1)
+#define TCP_SNDQUEUELOWAT LWIP_MAX(((TCP_SND_QUEUELEN)/2), 5)
+#define TCP_OOSEQ_BYTES_LIMIT(pcb) TCP_OOSEQ_MAX_BYTES
+#define TCP_OOSEQ_MAX_PBUFS 0
+#define TCP_OOSEQ_PBUFS_LIMIT(pcb) TCP_OOSEQ_MAX_PBUFS
+#define TCP_LISTEN_BACKLOG 0
-/* TCP Maximum segment size. */
-#define TCP_MSS (MTU - 40) /* TCP_MSS = (Ethernet MTU - IP header size - TCP header size) */
-/* TCP sender buffer space (bytes). */
-#define TCP_SND_BUF (2*TCP_MSS)
-/* TCP_SND_QUEUELEN: TCP sender buffer space (pbufs). This must be at least
- as much as (2 * TCP_SND_BUF/TCP_MSS) for things to work. */
-#define TCP_SND_QUEUELEN (2* TCP_SND_BUF/TCP_MSS)
-
-/* TCP receive window. */
-#define TCP_WND (2*TCP_MSS)
/* ---------- ICMP options ---------- */
@@ -207,6 +211,11 @@ The STM32F4x7 allows computing and verifying the IP, UDP, TCP and ICMP checksums
#define LWIP_SOCKET 0
+#define LWIP_HTTPD_CUSTOM_FILES 1
+#define LWIP_HTTPD_FILE_STATE 0
+
+
+
/*
----------------------------------------
---------- Lwip Debug options ----------