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.
diff --git a/src/proto_quic.c b/src/proto_quic.c
index 5c20045..55aa4b5 100644
--- a/src/proto_quic.c
+++ b/src/proto_quic.c
@@ -65,7 +65,7 @@
.name = "quic4",
/* connection layer */
- .ctrl_type = SOCK_STREAM,
+ .xprt_type = PROTO_TYPE_STREAM,
.listen = quic_bind_listener,
.enable = quic_enable_listener,
.disable = quic_disable_listener,
@@ -105,7 +105,7 @@
.name = "quic6",
/* connection layer */
- .ctrl_type = SOCK_STREAM,
+ .xprt_type = PROTO_TYPE_STREAM,
.listen = quic_bind_listener,
.enable = quic_enable_listener,
.disable = quic_disable_listener,