MINOR: protocols: add a new protocol type selector
authorWilly Tarreau <w@1wt.eu>
Wed, 27 Oct 2021 15:05:36 +0000 (17:05 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 27 Oct 2021 15:05:36 +0000 (17:05 +0200)
commit337edfdbc50412ac1d0d437de8a777cb009a054c
tree5c04ec05ead5726e30af3f69c62e39b829dd44cb
parentbdcee7fbc930bae0428cadc9b1078a5dfa6eff72
MINOR: protocols: add a new protocol type selector

The protocol selection is currently performed based on the family,
control type and socket type. But this is often not enough, as both
only provide DGRAM or STREAM, leaving few variants. Protocols like
SCTP for example might be indistinguishable from TCP here. Same goes
for TCP extensions like MPTCP.

This commit introduces a new enum proto_type that is placed in each
and every protocol definition, that will usually more or less match
the sock_type, but being an enum, will support additional values.
include/haproxy/protocol-t.h
src/proto_quic.c
src/proto_sockpair.c
src/proto_tcp.c
src/proto_udp.c
src/proto_uxdg.c
src/proto_uxst.c