diff options
author | Elliott Hughes <enh@google.com> | 2014-01-03 15:58:40 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-01-03 15:58:40 -0800 |
commit | 338e6102a60a33661812753f03f1d426ab1a7fe1 (patch) | |
tree | 4abbe89d2567f41188275f2ae2079b98f7166139 /libc/include/netinet | |
parent | c1c3f7d4468f02adbf8ced689d738386e42af773 (diff) | |
download | bionic-338e6102a60a33661812753f03f1d426ab1a7fe1.zip bionic-338e6102a60a33661812753f03f1d426ab1a7fe1.tar.gz bionic-338e6102a60a33661812753f03f1d426ab1a7fe1.tar.bz2 |
Add TCPOPT_* constants.
Adds the TCPOPT_* constants from NetBSD. Note that the BSDs also have
TCPOPT_SIGNATURE, but Linux calls that TCPOPT_MD5SIG and glibc doesn't
have any corresponding constant yet, so let's wait until we see which name
wins out.
Change-Id: If53cdada5595285d9a7e7248ef74cd7502d804c0
Diffstat (limited to 'libc/include/netinet')
-rw-r--r-- | libc/include/netinet/tcp.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/libc/include/netinet/tcp.h b/libc/include/netinet/tcp.h index bc52249..5601645 100644 --- a/libc/include/netinet/tcp.h +++ b/libc/include/netinet/tcp.h @@ -25,10 +25,10 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #ifndef _NETINET_TCP_H #define _NETINET_TCP_H -#include <endian.h> /* Include *before* linux/tcp.h */ #include <linux/tcp.h> __BEGIN_DECLS @@ -47,6 +47,21 @@ enum { TCP_CLOSING }; +#define TCPOPT_EOL 0 +#define TCPOPT_NOP 1 +#define TCPOPT_MAXSEG 2 +#define TCPOLEN_MAXSEG 4 +#define TCPOPT_WINDOW 3 +#define TCPOLEN_WINDOW 3 +#define TCPOPT_SACK_PERMITTED 4 +#define TCPOLEN_SACK_PERMITTED 2 +#define TCPOPT_SACK 5 +#define TCPOPT_TIMESTAMP 8 +#define TCPOLEN_TIMESTAMP 10 +#define TCPOLEN_TSTAMP_APPA (TCPOLEN_TIMESTAMP+2) + +#define TCPOPT_TSTAMP_HDR (TCPOPT_NOP<<24|TCPOPT_NOP<<16|TCPOPT_TIMESTAMP<<8|TCPOLEN_TIMESTAMP) + __END_DECLS #endif /* _NETINET_TCP_H */ |