diff --git a/include/types/connection.h b/include/types/connection.h index cea61f559..3dab54e90 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -306,6 +306,7 @@ struct mux_ops { struct conn_stream *(*attach)(struct connection *); /* Create and attach a conn_stream to an outgoing connection */ void (*detach)(struct conn_stream *); /* Detach a conn_stream from an outgoing connection, when the request is done */ + void (*show_fd)(struct chunk *, struct connection *); /* append some data about connection into chunk for "show fd" */ unsigned int flags; /* some flags characterizing the mux's capabilities (MX_FL_*) */ char name[8]; /* mux layer name, zero-terminated */ }; diff --git a/src/cli.c b/src/cli.c index b7d428d8a..035f4e5a8 100644 --- a/src/cli.c +++ b/src/cli.c @@ -834,8 +834,11 @@ static int cli_io_handler_show_fd(struct appctx *appctx) else if (li) chunk_appendf(&trash, " fe=%s", li->bind_conf->frontend->id); - if (mux) + if (mux) { chunk_appendf(&trash, " mux=%s mux_ctx=%p", mux->name, ctx); + if (mux->show_fd) + mux->show_fd(&trash, fdt.owner); + } else chunk_appendf(&trash, " nomux"); }