From c64051404def59c85462bd7b4f10bb862b20dea1 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 21 Sep 2017 20:23:50 +0200 Subject: [PATCH] MINOR: h2: add a frame header descriptor for incoming frames 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 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mux_h2.c b/src/mux_h2.c index 9004758f6..5e7df4661 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -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 */