int (*unsubscribe)(struct connection *conn, void *xprt_ctx, int event_type, struct wait_event *es); /* Unsubscribe <es> from events */
int (*remove_xprt)(struct connection *conn, void *xprt_ctx, void *toremove_ctx, const struct xprt_ops *newops, void *newctx); /* Remove an xprt from the connection, used by temporary xprt such as the handshake one */
int (*add_xprt)(struct connection *conn, void *xprt_ctx, void *toadd_ctx, const struct xprt_ops *toadd_ops, void **oldxprt_ctx, const struct xprt_ops **oldxprt_ops); /* Add a new XPRT as the new xprt, and return the old one */
+ void (*show_fd)(struct buffer *, const struct connection *, const void *ctx); /* append some data about xprt for "show fd" */
};
/* mux_ops describes the mux operations, which are to be performed at the
chunk_appendf(&trash, " nomux");
chunk_appendf(&trash, " xprt=%s", xprt ? xprt->name : "");
- if (xprt)
- chunk_appendf(&trash, " xprt_ctx=%p", xprt_ctx);
+ if (xprt) {
+ if (xprt_ctx || xprt->show_fd)
+ chunk_appendf(&trash, " xprt_ctx=%p", xprt_ctx);
+ if (xprt->show_fd)
+ xprt->show_fd(&trash, conn, xprt_ctx);
+ }
}
else if (fdt.iocb == sock_accept_iocb) {
chunk_appendf(&trash, ") l.st=%s fe=%s",