From patchwork Mon Oct 3 20:57:55 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 16222 Received: (qmail 42200 invoked by alias); 3 Oct 2016 20:58:16 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 42182 invoked by uid 89); 3 Oct 2016 20:58:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=msg00019.html, UD:msg00019.html, msg00019html X-HELO: relay1.mentorg.com Date: Mon, 3 Oct 2016 20:57:55 +0000 From: Joseph Myers To: Florian Weimer CC: Subject: Re: Add TCP_REPAIR_WINDOW from Linux 4.8 In-Reply-To: <87y425wcec.fsf@mid.deneb.enyo.de> Message-ID: References: <87y425wcec.fsf@mid.deneb.enyo.de> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) On Mon, 3 Oct 2016, Florian Weimer wrote: > * Joseph Myers: > > > Linux 4.8 adds TCP_REPAIR_WINDOW to include/uapi/linux/tcp.h. This > > patch adds it to sysdeps/gnu/netinet/tcp.h accordingly. > > > > Tested for x86_64 and x86 (testsuite, and that installed shared > > libraries are unchanged by the patch). > > Please also add struct tcp_repair_window, otherwise the #define > doesn't make much sense. Thanks. Here is a version that adds that structure as well. 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 . Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). 2016-10-03 Joseph Myers * sysdeps/gnu/netinet/tcp.h (TCP_REPAIR_WINDOW): New macro. (struct tcp_repair_window): New type. diff --git a/sysdeps/gnu/netinet/tcp.h b/sysdeps/gnu/netinet/tcp.h index 3fbea54..241bdc7 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 @@ -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 */