]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: conn_stream: Add a way to get mux's info on a CS from the upper layer
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 29 Nov 2018 10:29:26 +0000 (11:29 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 1 Dec 2018 16:37:27 +0000 (17:37 +0100)
commit3bc1b11dae176ca651b1d76bc7bb4d0a93e490e9
tree2f511e1049ca6c0eb5bb273e97ea4c9344a2ec66
parentc01ed9ff20a31e5d917cfd5957baba7946ca9c6c
MEDIUM: conn_stream: Add a way to get mux's info on a CS from the upper layer

Time to time, the need arises to get some info owned by the multiplexer about a
connection stream from the upper layer. Today we really need to get some dates
and durations specific to the conn_stream. It is only true for the mux H1 and
H2. Otherwise it will be impossible to have correct times reported in the logs.

To do so, the structure cs_info has been defined to provide all info we ever
need on a conn_stream from the upper layer. Of course, it is the first step. So
this structure will certainly envloved. But for now, only the bare minimum is
referenced. On the mux side, the callback get_cs_info() has been added in the
structure mux_ops. Multiplexers can now implement it, if necessary, to return a
pointer on a structure cs_info. And finally, the function si_get_cs_info()
should be used from the upper layer. If the stream interface is not attached to
a connection stream, this function returns NULL, likewise if the callback
get_cs_info() is not defined for the corresponding mux.
include/proto/stream_interface.h
include/types/connection.h