Commit Graph

30 Commits

Author SHA1 Message Date
Szabolcs Nagy ebeb1de288 add TCP_NLA_* from linux v4.17
new and missing netlink attributes types for SCM_TIMESTAMPING_OPT_STATS,
new ones were added in commits
7156d194a0772f733865267e7207e0b08f81b02b
be631892948060f44b1ceee3132be1266932071e
87ecc95d81d951b0984f2eb9c5c118cb68d0dce8
2018-06-19 13:26:36 -04:00
Szabolcs Nagy 5f4ff22aa3 netinet/tcp.h: add TCP_* socket options from linux v4.15
TCP_FASTOPEN_KEY is new in 1fba70e5b6bed53496ba1f1f16127f5be01b5fb6
TCP_FASTOPEN_NO_COOKIE is new in 71c02379c762cb616c00fd5c4ed253fbf6bbe11b
2018-02-22 18:49:03 -05:00
Szabolcs Nagy e69608700f netinet/tcp.h: add tcp_diag_md5sig struct from linux v4.14
for querying tcp md5 signing keys.
new in linux commit c03fa9bcacd9ac04595cc13f34f3445f0a5ecf13
2018-02-22 18:48:18 -05:00
Szabolcs Nagy 6651ef1f06 add new tcp.h socket options from linux v4.13
TCP_ULP is new in linux commit 734942cc4ea6478eed125af258da1bdbb4afe578
TCP_MD5SIG_EXT is new in 8917a777be3ba566377be05117f71b93a5fd909d
2017-11-05 18:41:26 -05:00
Szabolcs Nagy c519658cea add TCP_NLA_* enums from linux v4.11
two new stats for SCM_TIMESTAMPING_OPT_STATS, added in linux commit
7e98102f489775d8c000884fca8a0d995ea688a9
2017-11-05 18:41:09 -05:00
Szabolcs Nagy ee3ae7827b add TCP_FASTOPEN_CONNECT tcp socket option from linux v4.11
new in linux commit 19f6d3f3c8422d65b5e3d2162e30ef07c6e21ea2
2017-11-05 18:41:08 -05:00
Szabolcs Nagy 5c596ed867 add SCM_TIMESTAMPING_OPT_STATS and related TCP_ enums from linux v4.10
for tcp timestamp control messages, new in linux commit
1c885808e45601b2b6f68b30ac1d999e10b6f606
and export time measurements via tcp_info, added in linux commit
efd90174167530c67a54273fd5d8369c87f9bd32
2017-11-05 18:39:25 -05:00
Szabolcs Nagy 60c46db80b update tcp_info struct to linux v4.9
export tcp data delivery rate in tcp_info struct.
see linux commit eb8329e0a04db0061f714f033b4454326ba147f4
2016-12-29 22:11:01 -05:00
Szabolcs Nagy cc7c95e98e add TCP_REPAIR_WINDOW to netinet/tcp.h from linux v4.8
another kernel internal state exposure for checkpoint-restore.
see linux commit b1ed4c4fa9a5ccf325184fd90edc50978ef6e33a
2016-10-20 01:28:44 -04:00
Rich Felker befa5866ee make brace placement in public header struct definitions consistent
placing the opening brace on the same line as the struct keyword/tag
is the style I prefer and seems to be the prevailing practice in more
recent additions.

these changes were generated by the command:

find include/ arch/*/bits -name '*.h' \
-exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} +

and subsequently checked by hand to ensure that the regex did not pick
up any false positives.
2016-07-03 15:02:25 -04:00
Szabolcs Nagy 349877755d add new tcp_info fields from linux v4.6
new fields and associated linux commit:
tcpi_notsent_bytes, tcpi_min_rtt cd9b266095f422267bddbec88f9098b48ea548fc
tcpi_data_segs_in, tcpi_data_segs_out a44d6eacdaf56f74fad699af7f4925a5f5ac0e7f
2016-06-09 13:40:20 -04:00
Szabolcs Nagy 4da2d96591 update netinet/tcp.h for linux v4.2
TCP_CC_INFO is a new socket option to get congestion control info without
netlink (union tcp_cc_info is in linux/inet_diag.h kernel header).
linux commit 6e9250f59ef9efb932c84850cd221f22c2a03c4a

TCP_SAVE_SYN, TCP_SAVED_SYN socket options are for saving and getting the
SYN headers of passive connections in a server application.
linux commit cd8ae85299d54155702a56811b2e035e63064d3d

Add new tcpi_* fields to struct tcp_info implementing RFC4898 counters.
linux commit 2efd055c53c06b7e89c167c98069bab9afce7e59
2016-01-24 19:18:51 -05:00
Kylie McClain 53f41fb568 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.
2016-01-17 17:37:36 -05:00
Szabolcs Nagy 6119fa3269 add pacing rate information to the tcp_info struct in tcp.h
used by monitoring applications such as ss from iproute2
introduced in linux 3.15 commit 977cb0ecf82eb6d15562573c31edebf90db35163
2014-07-20 18:45:43 +02:00
Rich Felker 685b1cd4a0 fix use of legacy u_intN_t types in netinet/tcp.h
policy is to avoid using these types except where they are needed for
namespace conformance. C99-style stdint.h types should be used
instead.
2014-02-05 17:22:26 -05:00
Rich Felker fdaaa68d82 add support for BSD struct tcphdr in netinet/tcp.h
there are two versions of this structure: the BSD version and the GNU
version. previously only the GNU version was supported. the only way
to support both simultaneously is with an anonymous union, which was a
nonstandard extension prior to C11, so some effort is made to avoid
breakage with compilers which do not support anonymous unions.

this commit is based on a patch by Timo Teräs, but with some changes.
in particular, the GNU version of the structure is not exposed unless
_GNU_SOURCE is defined; this both avoids namespace pollution and
dependency on anonymous unions in the default feature profile.
2014-02-05 16:55:30 -05:00
Timo Teräs e2b4525e3b add TCP_INFO and TCP_MD5SIG socket option related structures 2013-12-20 11:36:26 -05:00
Szabolcs Nagy b0e9d57711 add TCP_NOTSENT_LOWAT tcp socket option, new in linux v3.12 2013-11-23 23:04:55 +00:00
Timo Teräs 4b2c8fee35 add linux tcp state enums 2013-11-23 16:57:53 -05:00
Rich Felker da19f88659 only expose struct tcphdr under _GNU_SOURCE
the BSD and GNU versions of this structure differ, so exposing it in
the default _BSD_SOURCE profile is possibly problematic. both versions
could be simultaneously supported with anonymous unions if needed in
the future, but for now, just omitting it except under _GNU_SOURCE
should be safe.
2013-08-30 17:06:17 -04:00
Rich Felker 09b2995bcb add struct tcphdr in netinet/tcp.h 2013-08-30 16:50:00 -04:00
Szabolcs Nagy b5e409df70 remove TCP_COOKIE_TRANSACTIONS from tcp.h
removed in linux-v3.10 in commit 1a2c6181c4a1922021b4d7df373bba612c3e5f04
2013-07-24 22:17:24 +00:00
Szabolcs Nagy 2e762105b7 add new linux tcp socket option flags to netinet/tcp.h 2013-04-01 16:24:11 +00:00
Rich Felker 725c55528d SOL_TCP is nonstandard and not in the reserved namespace
alternatively, we could define it in sys/socket.h since SO* is
reserved there, and tcp.h includes sys/socket.h in extensions mode.

note that SOL_TCP is simply wrong and it's only here for compatibility
with broken applications. the correct argument to pass for setting TCP
socket options is IPPROTO_TCP, which of course has the same value as
SOL_TCP but works everywhere.
2013-01-31 00:49:53 -05:00
rofl0r 3d3903fa5b tcp.h: add SOL_TCP, analoguous to udp.h 2012-12-06 17:02:19 +01:00
Rich Felker 3cd084bb03 TCP_* is in the reserved namespace for tcp.h; make use of that 2012-09-07 23:56:32 -04:00
Rich Felker c1a9658bd1 default features: make musl usable without feature test macros
the old behavior of exposing nothing except plain ISO C can be
obtained by defining __STRICT_ANSI__ or using a compiler option (such
as -std=c99) that predefines it. the new default featureset is POSIX
with XSI plus _BSD_SOURCE. any explicit feature test macros will
inhibit the default.

installation docs have also been updated to reflect this change.
2012-09-07 23:13:55 -04:00
Rich Felker 419ae6d5c9 support _BSD_SOURCE feature test macro
patch by Isaac Dunham. matched closely (maybe not exact) to glibc's
idea of what _BSD_SOURCE should make visible.
2012-05-22 21:52:08 -04:00
Rich Felker ca8373dfcf more bits junk (tcp.h) 2011-09-18 15:39:52 -04:00
Rich Felker 0b44a0315b initial check-in, version 0.5.0 2011-02-12 00:22:29 -05:00