struct stconn *(*get_first_sc)(const struct connection *); /* retrieves any valid stconn from this connection */
void (*detach)(struct sedesc *); /* Detach an stconn from the stdesc from an outgoing connection, when the request is done */
int (*show_fd)(struct buffer *, struct connection *); /* append some data about connection into chunk for "show fd"; returns non-zero if suspicious */
+ int (*show_sd)(struct buffer *, struct sedesc *, const char *pfx); /* append some data about the mux stream into chunk for "show sess"; returns non-zero if suspicious */
int (*subscribe)(struct stconn *sc, int event_type, struct wait_event *es); /* Subscribe <es> to events, such as "being able to send" */
int (*unsubscribe)(struct stconn *sc, int event_type, struct wait_event *es); /* Unsubscribe <es> from events */
int (*avail_streams)(struct connection *conn); /* Returns the number of streams still available for a connection */
scf->sedesc->se, sc_ep_get(scf), scf->wait_event.events);
if ((conn = sc_conn(scf)) != NULL) {
+ if (conn->mux && conn->mux->show_sd) {
+ chunk_appendf(&trash, " ");
+ conn->mux->show_sd(&trash, scf->sedesc, " ");
+ chunk_appendf(&trash, "\n");
+ }
+
chunk_appendf(&trash,
" co0=%p ctrl=%s xprt=%s mux=%s data=%s target=%s:%p\n",
conn,
conn_fd(conn) >= 0 ? fdtab[conn->handle.fd].state : 0,
conn_fd(conn) >= 0 ? !!(fdtab[conn->handle.fd].update_mask & ti->ltid_bit) : 0,
conn_fd(conn) >= 0 ? fdtab[conn->handle.fd].thread_mask: 0);
-
}
else if ((tmpctx = sc_appctx(scf)) != NULL) {
chunk_appendf(&trash,
scb->sedesc->se, sc_ep_get(scb), scb->wait_event.events);
if ((conn = sc_conn(scb)) != NULL) {
+ if (conn->mux && conn->mux->show_sd) {
+ chunk_appendf(&trash, " ");
+ conn->mux->show_sd(&trash, scb->sedesc, " ");
+ chunk_appendf(&trash, "\n");
+ }
+
chunk_appendf(&trash,
" co1=%p ctrl=%s xprt=%s mux=%s data=%s target=%s:%p\n",
conn,
conn_fd(conn) >= 0 ? fdtab[conn->handle.fd].state : 0,
conn_fd(conn) >= 0 ? !!(fdtab[conn->handle.fd].update_mask & ti->ltid_bit) : 0,
conn_fd(conn) >= 0 ? fdtab[conn->handle.fd].thread_mask: 0);
-
}
else if ((tmpctx = sc_appctx(scb)) != NULL) {
chunk_appendf(&trash,