From 26ba81175b23d254a9d59385e03d8252d550d0fe Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Tue, 27 Aug 2013 15:18:43 +0200 Subject: [PATCH] lwip: add checksum options to 'lwipopts.h' This patch adds some of lwip's checksum calculation options to the Genode-specific 'lwiptops.h' configuration file. The checksum calculations are enabled by default. Fixes #868. --- libports/include/lwip/lwipopts.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/libports/include/lwip/lwipopts.h b/libports/include/lwip/lwipopts.h index 8a743c3345..98e4ff154d 100644 --- a/libports/include/lwip/lwipopts.h +++ b/libports/include/lwip/lwipopts.h @@ -41,12 +41,22 @@ #define LWIP_WND_SCALE 1 /* enable window scaling */ #define TCP_RCV_SCALE 2 /* receive scale factor IETF RFC 1323 */ -#define LWIP_CHECKSUM_ON_COPY 1 /* calculate checksum during memcpy */ - #if LWIP_DHCP #define LWIP_NETIF_STATUS_CALLBACK 1 /* callback function used by DHCP init */ #endif +/*********************************** + ** Checksum calculation settings ** + ***********************************/ + +/* checksum calculation for outgoing packets can be disabled if the hardware supports it */ +#define CHECKSUM_GEN_IP 1 /* calculate checksum for outgoing IP packets */ +#define CHECKSUM_GEN_TCP 1 /* calculate checksum for outgoing TCP packets */ + +#define CHECKSUM_CHECK_IP 1 /* check checksum of incoming IP packets */ +#define CHECKSUM_CHECK_TCP 1 /* check checksum of incoming TCP packets */ + +#define LWIP_CHECKSUM_ON_COPY 1 /* calculate checksum during memcpy */ /********************* ** Memory settings **