diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-08-30 16:50:00 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-08-30 16:50:00 -0400 |
commit | 09b2995bcb663e0a19210311721bf46d49f87212 (patch) | |
tree | 6e67f5ff49ca29d5e22c35d03fc6181c7595fe11 /include | |
parent | f7bc29ed2253009c9e56c597ef3d9a2bb278a876 (diff) | |
download | musl-09b2995bcb663e0a19210311721bf46d49f87212.tar.gz musl-09b2995bcb663e0a19210311721bf46d49f87212.tar.bz2 musl-09b2995bcb663e0a19210311721bf46d49f87212.tar.xz musl-09b2995bcb663e0a19210311721bf46d49f87212.zip |
add struct tcphdr in netinet/tcp.h
Diffstat (limited to 'include')
-rw-r--r-- | include/netinet/tcp.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index b7828a50..b8c79349 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -31,6 +31,39 @@ #define SOL_TCP 6 #include <sys/types.h> #include <sys/socket.h> +#include <endian.h> + +struct tcphdr +{ + u_int16_t source; + u_int16_t dest; + u_int32_t seq; + u_int32_t ack_seq; +#if __BYTE_ORDER == __LITTLE_ENDIAN + u_int16_t res1:4; + u_int16_t doff:4; + u_int16_t fin:1; + u_int16_t syn:1; + u_int16_t rst:1; + u_int16_t psh:1; + u_int16_t ack:1; + u_int16_t urg:1; + u_int16_t res2:2; +#else + u_int16_t doff:4; + u_int16_t res1:4; + u_int16_t res2:2; + u_int16_t urg:1; + u_int16_t ack:1; + u_int16_t psh:1; + u_int16_t rst:1; + u_int16_t syn:1; + u_int16_t fin:1; +#endif + u_int16_t window; + u_int16_t check; + u_int16_t urg_ptr; +}; #endif #endif |