]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: protocol: replace ctrl_type with xprt_type and clarify it
authorWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 14:36:46 +0000 (16:36 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 20 May 2022 16:39:43 +0000 (18:39 +0200)
commit91b47263f7d534d818cabfa013ca090cc9302b4c
treef4defe66636f8f6e0b85ec0d87f61b5802f8e4af
parent3d7b4684fe00050a7d70c1bc742bfb8949a70163
MINOR: protocol: replace ctrl_type with xprt_type and clarify it

There's been some great confusion between proto_type, ctrl_type and
sock_type. It turns out that ctrl_type was improperly chosen because
it's not the control layer that is of this or that type, but the
transport layer, and it turns out that the transport layer doesn't
(normally) denaturate the underlying control layer, except for QUIC
which turns dgrams to streams. The fact that the SOCK_{DGRAM|STREAM}
set of values was used added to the confusion.

Let's replace it with xprt_type which reuses the later introduced
PROTO_TYPE_* values, and update the comments to explain which one
works at what level.
include/haproxy/protocol-t.h
src/cfgparse.c
src/log.c
src/proto_quic.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_udp.c
src/proto_uxdg.c
src/proto_uxst.c
src/protocol.c
src/resolvers.c