encoding and not on the version present in the request header.
fc_lost : integer
- Returns the lost counter measured by the kernel for the client
- connection. If the server connection is not established, if the connection is
- not TCP or if the operating system does not support TCP_INFO, for example
- Linux kernels before 2.4, the sample fetch fails.
+ If the connection is not TCP, nor QUIC, the sample fetch fails.
+ For QUIC, returns the number of lost QUIC packets by the client connection.
+ For TCP, returns the lost counter measured by the kernel for the client
+ connection. If the server connection is not established, or if the operating
+ system does not support TCP_INFO, for example Linux kernels before 2.4, the
+ sample fetch fails.
fc_nb_streams : integer
Returns the number of streams opened on the frontend connection.
header.
fc_reordering : integer
- Returns the reordering counter measured by the kernel for the client
- connection. If the server connection is not established, if the connection is
- not TCP or if the operating system does not support TCP_INFO, for example
- Linux kernels before 2.4, the sample fetch fails.
+ If the connection is not TCP, nor QUIC, the sample fetch fails.
+ For QUIC, return the number of QUIC reordered packets for the client connection.
+ For TCP, returns the reordering counter measured by the kernel for the client
+ connection. If the server connection is not established, or if the operating
+ system does not support TCP_INFO, for example Linux kernels before 2.4, the
+ sample fetch fails.
fc_retrans : integer
Returns the retransmits counter measured by the kernel for the client
Linux kernels before 2.4, the sample fetch fails.
fc_rtt(<unit>) : integer
- Returns the Round Trip Time (RTT) measured by the kernel for the client
+ If the connection is not TCP, nor QUIC, the sample fetch fails.
+ For QUIC, returns Smoothed Round Trip Time for the client connection.
+ For TCP, returns the Round Trip Time (RTT) measured by the kernel for the client
connection. <unit> is facultative, by default the unit is milliseconds. <unit>
can be set to "ms" for milliseconds or "us" for microseconds. If the server
- connection is not established, if the connection is not TCP or if the
- operating system does not support TCP_INFO, for example Linux kernels before
- 2.4, the sample fetch fails.
+ connection is not established, or if the operating system does not support
+ TCP_INFO, for example Linux kernels before 2.4, the sample fetch fails.
fc_rttvar(<unit>) : integer
- Returns the Round Trip Time (RTT) variance measured by the kernel for the
- client connection. <unit> is facultative, by default the unit is milliseconds.
+ If the connection is not TCP, nor QUIC, the sample fetch fails.
+ For QUIC, returns Smoothed Round Trip Time variance for the client connection.
+ For TCP, returns the Round Trip Time (RTT) variance measured by the kernel for
+ the client connection. <unit> is facultative, by default the unit is milliseconds.
<unit> can be set to "ms" for milliseconds or "us" for microseconds. If the
- server connection is not established, if the connection is not TCP or if the
- operating system does not support TCP_INFO, for example Linux kernels before
- 2.4, the sample fetch fails.
+ server connection is not established, or if the operating system does not
+ support TCP_INFO, for example Linux kernels before 2.4, the sample fetch fails.
fc_sacked : integer
Returns the sacked counter measured by the kernel for the client connection.
static int quic_bind_tid_prep(struct connection *conn, int new_tid);
static void quic_bind_tid_commit(struct connection *conn);
static void quic_bind_tid_reset(struct connection *conn);
+static int quic_get_info(struct connection *conn, long long int *info, int info_num);
/* Note: must not be declared <const> as its list will be overwritten */
struct protocol proto_quic4 = {
.get_src = quic_sock_get_src,
.get_dst = quic_sock_get_dst,
.connect = quic_connect_server,
+ .get_info = quic_get_info,
.bind_tid_prep = quic_bind_tid_prep,
.bind_tid_commit = quic_bind_tid_commit,
.bind_tid_reset = quic_bind_tid_reset,
.get_src = quic_sock_get_src,
.get_dst = quic_sock_get_dst,
.connect = quic_connect_server,
+ .get_info = quic_get_info,
.bind_tid_prep = quic_bind_tid_prep,
.bind_tid_commit = quic_bind_tid_commit,
.bind_tid_reset = quic_bind_tid_reset,
fd_stop_recv(l->rx.fd);
}
+static int quic_get_info(struct connection *conn, long long int *info, int info_num)
+{
+ struct quic_conn *qc = conn->handle.qc;
+
+ switch (info_num) {
+ case 0: *info = qc->path->loss.srtt; break;
+ case 1: *info = qc->path->loss.rtt_var; break;
+ case 3: *info = qc->path->loss.nb_lost_pkt; break;
+ case 7: *info = qc->path->loss.nb_reordered_pkt; break;
+ default: return 0;
+ }
+
+ return 1;
+}
+
/* change the connection's thread to <new_tid>. For frontend connections, the
* target is a listener, and the caller is responsible for guaranteeing that
* the listener assigned to the connection is bound to the requested thread.