From: Kylie McClain <somasissounds@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH] netinet/tcp: Add TCPOPT, TCPOLEN constants
Date: Sun, 3 Jan 2016 21:48:54 -0500 [thread overview]
Message-ID: <CAOji9TB3HqxUjktOpEs2sg63-E=vmmjcG0zXZ1Z-R=gBhk18+A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
On Sun, Jan 3, 2016 at 1:18 AM, Kylie McClain <somasissounds@gmail.com> wrote:
> On Jan 2, 2016 11:25 PM, "Rich Felker" <dalias@libc.org> wrote:
>> Also, it seems there's already a section later in the file that's
>> conditional on BSD||GNU, so unless there's a good conceptual reason
>> not to I'd probably rather add the new constants there. Does this
>> sound okay?
>>
>> Rich
>
> Sounds just fine to me.
Oh, and here's the updated patch by the way :)
[-- Attachment #2: 0001-netinet-tcp-Add-TCPOPT-TCPOLEN-constants.patch --]
[-- Type: application/octet-stream, Size: 1313 bytes --]
From 98628a1de1fe2c4d19bdeb3a7343dd04e6aef4bf Mon Sep 17 00:00:00 2001
From: Kylie McClain <somasis@exherbo.org>
Date: Wed, 30 Dec 2015 17:24:02 -0500
Subject: [PATCH] netinet/tcp: Add TCPOPT, TCPOLEN constants
Programs such as iptables depend on these constants, which can also
be found defined in other libcs.
Since only TCP_* is reserved as part of tcp.h's namespace, we hide
them behind _BSD_SOURCE (and therefore _DEFAULT_SOURCE) to expose
them by default, but keep it standard conforming.
---
include/netinet/tcp.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
index 52358c7..f9b8464 100644
--- a/include/netinet/tcp.h
+++ b/include/netinet/tcp.h
@@ -41,7 +41,20 @@
#define TCP_CLOSING 11
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define TCPOPT_EOL 0
+#define TCPOPT_NOP 1
+#define TCPOPT_MAXSEG 2
+#define TCPOPT_WINDOW 3
+#define TCPOPT_SACK_PERMITTED 4
+#define TCPOPT_SACK 5
+#define TCPOPT_TIMESTAMP 8
+#define TCPOLEN_SACK_PERMITTED 2
+#define TCPOLEN_WINDOW 3
+#define TCPOLEN_MAXSEG 4
+#define TCPOLEN_TIMESTAMP 10
+
#define SOL_TCP 6
+
#include <sys/types.h>
#include <sys/socket.h>
#include <stdint.h>
--
2.6.4
next reply other threads:[~2016-01-04 2:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-04 2:48 Kylie McClain [this message]
2016-01-17 22:37 ` Rich Felker
-- strict thread matches above, loose matches on Subject: below --
2016-01-02 2:18 Kylie McClain
2016-01-02 19:15 ` Shiz
2016-01-03 4:24 ` Rich Felker
2016-01-03 6:18 ` Kylie McClain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOji9TB3HqxUjktOpEs2sg63-E=vmmjcG0zXZ1Z-R=gBhk18+A@mail.gmail.com' \
--to=somasissounds@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).