diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index f113f0d13..b1c8d94bd 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -339,12 +339,14 @@ enum mux_ctl_type { MUX_CTL_GET_GLITCHES, /* returns number of glitches on the connection */ MUX_CTL_GET_NBSTRM, /* Return the current number of streams on the connection */ MUX_CTL_GET_MAXSTRM, /* Return the max number of streams supported by the connection */ + MUX_CTL_TEVTS, /* Return the termination events log of the mux connection */ }; /* sctl command used by mux->sctl() */ enum mux_sctl_type { MUX_SCTL_SID, /* Return the mux stream ID as output, as a signed 64bits integer */ MUX_SCTL_DBG_STR, /* takes a mux_sctl_dbg_str_ctx argument, reads flags and returns debug info */ + MUX_SCTL_TEVTS, /* Return the termination events log of the mux stream */ }; #define MUX_SCTL_DBG_STR_L_MUXS 0x00000001 // info from mux stream diff --git a/src/mux_h1.c b/src/mux_h1.c index 3c86a8547..1ef9c3093 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -5262,6 +5262,8 @@ static int h1_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *outp return h1_used_streams(conn); case MUX_CTL_GET_MAXSTRM: return 1; + case MUX_CTL_TEVTS: + return h1c->term_evts_log; default: return -1; } @@ -5297,6 +5299,8 @@ static int h1_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *output) /* other layers not implemented */ dbg_ctx->ret.buf = *buf; return ret; + case MUX_SCTL_TEVTS: + return h1s->sd->term_evts_log; default: return -1; } diff --git a/src/mux_h2.c b/src/mux_h2.c index 8c3805d64..4dad17c37 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -5244,6 +5244,9 @@ static int h2_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *outp case MUX_CTL_GET_MAXSTRM: return h2c->streams_limit; + case MUX_CTL_TEVTS: + return h2c->term_evts_log; + default: return -1; } @@ -5279,6 +5282,8 @@ static int h2_sctl(struct stconn *sc, enum mux_sctl_type mux_sctl, void *output) /* other layers not implemented */ dbg_ctx->ret.buf = *buf; return ret; + case MUX_SCTL_TEVTS: + return h2s->sd->term_evts_log; default: return -1;