]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: tcp: implement the get_opt() function
authorWilly Tarreau <w@1wt.eu>
Wed, 24 Dec 2025 16:04:22 +0000 (17:04 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 24 Dec 2025 17:38:51 +0000 (18:38 +0100)
It relies on the generic sock_conn_get_opt() function and will permit
sample fetch functions to retrieve generic TCP-level info.

src/proto_tcp.c

index b90445868e6a4598f1ce64920433ec17701ea675..1182922ce2fbfe71bfd36920ab7e4065f39125e7 100644 (file)
@@ -76,6 +76,7 @@ struct protocol proto_tcpv4 = {
        .check_events   = sock_check_events,
        .ignore_events  = sock_ignore_events,
        .get_info       = tcp_get_info,
+       .get_opt        = sock_conn_get_opt,
 
        /* binding layer */
        .rx_suspend     = tcp_suspend_receiver,
@@ -121,6 +122,7 @@ struct protocol proto_tcpv6 = {
        .check_events   = sock_check_events,
        .ignore_events  = sock_ignore_events,
        .get_info       = tcp_get_info,
+       .get_opt        = sock_conn_get_opt,
 
        /* binding layer */
        .rx_suspend     = tcp_suspend_receiver,
@@ -167,6 +169,7 @@ struct protocol proto_mptcpv4 = {
        .check_events   = sock_check_events,
        .ignore_events  = sock_ignore_events,
        .get_info       = tcp_get_info,
+       .get_opt        = sock_conn_get_opt,
 
        /* binding layer */
        .rx_suspend     = tcp_suspend_receiver,
@@ -212,6 +215,7 @@ struct protocol proto_mptcpv6 = {
        .check_events   = sock_check_events,
        .ignore_events  = sock_ignore_events,
        .get_info       = tcp_get_info,
+       .get_opt        = sock_conn_get_opt,
 
        /* binding layer */
        .rx_suspend     = tcp_suspend_receiver,