From: Ioan-Teodor Teugea Date: Fri, 21 Apr 2023 21:01:43 +0000 (+0300) Subject: patches: Align TCP_KEEP* macro values with those of Linux X-Git-Tag: RELEASE-0.13.0^0 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1939ad3c40100141076ac2a9508681f46b3d8c22;p=unikraft%2Flibs%2Flwip.git patches: Align TCP_KEEP* macro values with those of Linux Add patch to change TCP define values to the values currently used by the Linux kernel for compatibility with socket related syscalls. Signed-off-by: Ioan-Teodor Teugea Reviewed-by: Sergiu Moga Approved-by: Eduard Vintilă Tested-by: Unikraft CI GitHub-Closes: #34 --- diff --git a/patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h b/patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h new file mode 100644 index 0000000..36c2154 --- /dev/null +++ b/patches/0011-src-include-Make-lwip-sockets.h-compatible-with-Linux-kernel.h @@ -0,0 +1,19 @@ +Change TCP options macro definitions to those currently used by Linux +for compatibility with socket syscalls. + +diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h +--- a/src/include/lwip/sockets.h 2023-04-15 19:02:41.486964340 +0300 ++++ b/src/include/lwip/sockets.h 2023-04-15 19:06:11.337323112 +0300 +@@ -60,9 +60,9 @@ + */ + #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ + #define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */ +-#define TCP_KEEPIDLE 0x03 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */ +-#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */ +-#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */ ++#define TCP_KEEPIDLE 0x04 /* set pcb->keep_idle - Same as TCP_KEEPALIVE, but use seconds for get/setsockopt */ ++#define TCP_KEEPINTVL 0x05 /* set pcb->keep_intvl - Use seconds for get/setsockopt */ ++#define TCP_KEEPCNT 0x06 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */ + #endif /* LWIP_TCP */ + + /* FD_SET used for lwip_select */