]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: add a frame header descriptor for incoming frames
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Sep 2017 18:23:50 +0000 (20:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:03:24 +0000 (18:03 +0100)
This descriptor will be used by the frame parser, it's designed to ease
manipulation of frame length, type, flags and sid.

src/mux_h2.c

index 9004758f68b5cab9555999db1c10abe0450f7f86..5e7df46619439777f6774df775ce5a0b5e5f137c 100644 (file)
@@ -117,6 +117,14 @@ struct h2s {
        enum h2_ss st;
 };
 
+/* descriptor for an h2 frame header */
+struct h2_fh {
+       uint32_t len;       /* length, host order, 24 bits */
+       uint32_t sid;       /* stream id, host order, 31 bits */
+       uint8_t ft;         /* frame type */
+       uint8_t ff;         /* frame flags */
+};
+
 /* a few settings from the global section */
 static int h2_settings_header_table_size      =  4096; /* initial value */
 static int h2_settings_initial_window_size    = 65535; /* initial value */