MEDIUM: muxes: Add an optional input buffer during mux initialization

The mux's callback init() now take a pointer to a buffer as extra argument. It
must be used by the multiplexer as its input buffer. This buffer is always NULL
when a multiplexer is initialized with a fresh connection. But if a mux upgrade
is performed, it may be filled with existing data. Note that, for now, mux
upgrades are not supported. But this commit is mandatory to do so.
diff --git a/include/proto/connection.h b/include/proto/connection.h
index dba8dea..3a98b34 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -836,7 +836,7 @@
 
 	conn->mux = mux;
 	conn->ctx = ctx;
-	ret = mux->init ? mux->init(conn, prx, sess) : 0;
+	ret = mux->init ? mux->init(conn, prx, sess, &BUF_NULL) : 0;
 	if (ret < 0) {
 		conn->mux = NULL;
 		conn->ctx = NULL;
diff --git a/include/types/connection.h b/include/types/connection.h
index 1a1409b..af27d0c 100644
--- a/include/types/connection.h
+++ b/include/types/connection.h
@@ -329,7 +329,7 @@
  * layer is not ready yet.
  */
 struct mux_ops {
-	int  (*init)(struct connection *conn, struct proxy *prx, struct session *sess);  /* early initialization */
+	int  (*init)(struct connection *conn, struct proxy *prx, struct session *sess, struct buffer *input);  /* early initialization */
 	int  (*wake)(struct connection *conn);        /* mux-layer callback to report activity, mandatory */
 	size_t (*rcv_buf)(struct conn_stream *cs, struct buffer *buf, size_t count, int flags); /* Called from the upper layer to get data */
 	size_t (*snd_buf)(struct conn_stream *cs, struct buffer *buf, size_t count, int flags); /* Called from the upper layer to send data */