about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-10-03 21:01:42 +0000
committerJoseph Myers <joseph@codesourcery.com>2016-10-03 21:01:42 +0000
commitdad9a11a93c7be79ca8e0fae0c15bb28d7fb3b3e (patch)
tree403d052a7a0ad4d5201c837559aacf9618929288
parentedbdf872aef70668badadb99df18a91c065b66d7 (diff)
downloadglibc-dad9a11a93c7be79ca8e0fae0c15bb28d7fb3b3e.tar.gz
glibc-dad9a11a93c7be79ca8e0fae0c15bb28d7fb3b3e.tar.xz
glibc-dad9a11a93c7be79ca8e0fae0c15bb28d7fb3b3e.zip
Add TCP_REPAIR_WINDOW from Linux 4.8.
Linux 4.8 adds TCP_REPAIR_WINDOW to include/uapi/linux/tcp.h.  This
patch adds it to sysdeps/gnu/netinet/tcp.h accordingly, along with
struct tcp_repair_window as requested in
<https://sourceware.org/ml/libc-alpha/2016-10/msg00019.html>.

Tested for x86_64 and x86 (testsuite, and that installed shared
libraries are unchanged by the patch).

	* sysdeps/gnu/netinet/tcp.h (TCP_REPAIR_WINDOW): New macro.
	(struct tcp_repair_window): New type.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/gnu/netinet/tcp.h11
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ac585578e8..9c9aa8f952 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-03  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/gnu/netinet/tcp.h (TCP_REPAIR_WINDOW): New macro.
+	(struct tcp_repair_window): New type.
+
 2016-10-02  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
 	* libio/tst-memstream3.c: Include string.h.
diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h
index 3fbea54daf..241bdc70db 100644
--- a/sysdeps/gnu/netinet/tcp.h
+++ b/sysdeps/gnu/netinet/tcp.h
@@ -69,6 +69,7 @@
 				       connections.  */
 #define TCP_SAVED_SYN		 28 /* Get SYN headers recorded for
 				       connection.  */
+#define TCP_REPAIR_WINDOW	 29 /* Get/set window parameters.  */
 
 #ifdef __USE_MISC
 # include <sys/types.h>
@@ -307,6 +308,16 @@ struct tcp_cookie_transactions
   uint8_t	tcpct_value[TCP_MSS_DEFAULT];
 };
 
+/* For use with TCP_REPAIR_WINDOW.  */
+struct tcp_repair_window
+{
+  uint32_t snd_wl1;
+  uint32_t snd_wnd;
+  uint32_t max_window;
+  uint32_t rcv_wnd;
+  uint32_t rcv_wup;
+};
+
 #endif /* Misc.  */
 
 #endif /* netinet/tcp.h */