diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 0c1fd92e0..2619fd66d 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -339,6 +339,11 @@ enum mux_ctl_type { MUX_CTL_SUBS_RECV, /* Notify the mux it must wait for read events again */ }; +/* sctl command used by mux->sctl() */ +enum mux_sctl_type { + MUX_SCTL_SID, /* Return the mux stream ID as ouput, as a signed 64bits integer */ +}; + /* response for ctl MUX_STATUS */ #define MUX_STATUS_READY (1 << 0) @@ -440,6 +445,7 @@ struct mux_ops { 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 to events, such as "being able to send" */ int (*unsubscribe)(struct stconn *sc, int event_type, struct wait_event *es); /* Unsubscribe from events */ + int (*sctl)(struct stconn *sc, enum mux_sctl_type mux_sctl, void *arg); /* Provides information about the mux stream */ int (*avail_streams)(struct connection *conn); /* Returns the number of streams still available for a connection */ int (*avail_streams_bidi)(struct connection *conn); /* Returns the number of bidirectional streams still available for a connection */ int (*avail_streams_uni)(struct connection *conn); /* Returns the number of unidirectional streams still available for a connection */