mirror of git://git.musl-libc.org/musl
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.
This commit is contained in:
parent
3cdbfb99c3
commit
53f41fb568
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue