Make use of stats(3) in the TCP stack. This makes it possible to retrieve
per-connection statistical information such as receive window, RTT, or goodput,
using a newly added TCP_STATS getsockopt(3) option, and extract it using
stats_voistat_fetch(3) API. See the net/tcprtt port for an example consumer
of this API.
Compared to the existing TCP_INFO, the main differences are that this
mechanism is easy to extend without breaking ABI, and it provides statistical
information instead of raw "snapshots" of values at a given point of time.
This depends on https://reviews.freebsd.org/D20477, https://reviews.freebsd.org/D20116, and https://reviews.freebsd.org/D20324. Example tool using it is here: https://reviews.freebsd.org/D20656.
Sponsored By: Klara Inc, Netflix
Obtained from: Netflix