From: Frédéric Lécaille Date: Thu, 18 Feb 2021 09:04:27 +0000 (+0100) Subject: MINOR: connection: Add callbacks definitions for QUIC. X-Git-Tag: v2.5-dev8~153 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2abe74f39c0d7666f2b7e13efb4138ffa03b9e8b;p=thirdparty%2Fhaproxy.git MINOR: connection: Add callbacks definitions for QUIC. The flow control at stream level is organized by types (client bidi, server bidi, client uni, server uni). Adds at least callback to retrieve the number of available streams by direction. --- diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 1afae9624d..28dbbf4b78 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -50,6 +50,7 @@ struct session; struct pipe; struct quic_conn; struct bind_conf; +struct qcs; /* Note: subscribing to these events is only valid after the caller has really * attempted to perform the operation, and failed to proceed or complete. @@ -421,7 +422,13 @@ struct mux_ops { int (*show_fd)(struct buffer *, struct connection *); /* append some data about connection into chunk for "show fd"; returns non-zero if suspicious */ int (*subscribe)(struct conn_stream *cs, int event_type, struct wait_event *es); /* Subscribe to events, such as "being able to send" */ int (*unsubscribe)(struct conn_stream *cs, int event_type, struct wait_event *es); /* Unsubscribe from events */ + int (*ruqs_subscribe)(struct qcs *qcs, int event_type, struct wait_event *es); /* Subscribe to events, "being able to receive" only */ + int (*ruqs_unsubscribe)(struct qcs *qcs, int event_type, struct wait_event *es); /* Unsubscribe from events */ + int (*luqs_subscribe)(struct qcs *qcs, int event_type, struct wait_event *es); /* Subscribe to events, "being able to send" only */ + int (*luqs_unsubscribe)(struct qcs *qcs, int event_type, struct wait_event *es); /* Unsubscribe from events */ 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 */ int (*used_streams)(struct connection *conn); /* Returns the number of streams in use on a connection. */ void (*destroy)(void *ctx); /* Let the mux know one of its users left, so it may have to disappear */ int (*ctl)(struct connection *conn, enum mux_ctl_type mux_ctl, void *arg); /* Provides information about the mux */