]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: tcp_sample: Move TCP low level sample fetch function to control layer
authorFrederic Lecaille <flecaille@haproxy.com>
Tue, 30 Jul 2024 13:21:43 +0000 (15:21 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Wed, 31 Jul 2024 08:29:42 +0000 (10:29 +0200)
commit1733dff42af5d7e818eb9953570d5628f566cf84
treefce685ace98400b3b6952c59f1e2953ff9154056
parentbba6baff306820a01ea66fddde5acbad11c601b6
MINOR: tcp_sample: Move TCP low level sample fetch function to control layer

Add ->get_info() new control layer callback definition to protocol struct to
retreive statiscal counters information at transport layer (TCPv4/TCPv6) identified by
an integer into a long long int.
Move the TCP specific code from get_tcp_info() to the tcp_get_info() control layer
function (src/proto_tcp.c) and define it as  the ->get_info() callback for
TCPv4 and TCPv6.
Note that get_tcp_info() is called for several TCP sample fetches.
This patch is useful to support some of these sample fetches for QUIC and to
keep the code simple and easy to maintain.
include/haproxy/protocol-t.h
src/proto_tcp.c
src/tcp_sample.c