mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
MINOR: tevt/muxes: Add CTL and SCTL command to get the termination event logs
MUX_CTL_TEVTS command is added to get the termination event logs of a mux connection and MUX_SCTL_TEVTS command to get the termination event logs of a mux stream.
This commit is contained in:
parent
95029305d3
commit
a4c281a190
@ -339,12 +339,14 @@ enum mux_ctl_type {
|
|||||||
MUX_CTL_GET_GLITCHES, /* returns number of glitches on the connection */
|
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_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_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() */
|
/* sctl command used by mux->sctl() */
|
||||||
enum mux_sctl_type {
|
enum mux_sctl_type {
|
||||||
MUX_SCTL_SID, /* Return the mux stream ID as output, as a signed 64bits integer */
|
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_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
|
#define MUX_SCTL_DBG_STR_L_MUXS 0x00000001 // info from mux stream
|
||||||
|
@ -5262,6 +5262,8 @@ static int h1_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *outp
|
|||||||
return h1_used_streams(conn);
|
return h1_used_streams(conn);
|
||||||
case MUX_CTL_GET_MAXSTRM:
|
case MUX_CTL_GET_MAXSTRM:
|
||||||
return 1;
|
return 1;
|
||||||
|
case MUX_CTL_TEVTS:
|
||||||
|
return h1c->term_evts_log;
|
||||||
default:
|
default:
|
||||||
return -1;
|
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 */
|
/* other layers not implemented */
|
||||||
dbg_ctx->ret.buf = *buf;
|
dbg_ctx->ret.buf = *buf;
|
||||||
return ret;
|
return ret;
|
||||||
|
case MUX_SCTL_TEVTS:
|
||||||
|
return h1s->sd->term_evts_log;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -5244,6 +5244,9 @@ static int h2_ctl(struct connection *conn, enum mux_ctl_type mux_ctl, void *outp
|
|||||||
case MUX_CTL_GET_MAXSTRM:
|
case MUX_CTL_GET_MAXSTRM:
|
||||||
return h2c->streams_limit;
|
return h2c->streams_limit;
|
||||||
|
|
||||||
|
case MUX_CTL_TEVTS:
|
||||||
|
return h2c->term_evts_log;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
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 */
|
/* other layers not implemented */
|
||||||
dbg_ctx->ret.buf = *buf;
|
dbg_ctx->ret.buf = *buf;
|
||||||
return ret;
|
return ret;
|
||||||
|
case MUX_SCTL_TEVTS:
|
||||||
|
return h2s->sd->term_evts_log;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user