static int hf_quic_frame = -1;
static int hf_quic_frame_type = -1;
+static int hf_quic_frame_type_draft14 = -1;
static int hf_quic_frame_type_stream_fin = -1;
static int hf_quic_frame_type_stream_len = -1;
static int hf_quic_frame_type_stream_off = -1;
#define FT_STREAM_ID_BLOCKED 0x0a
#define FT_NEW_CONNECTION_ID 0x0b
#define FT_STOP_SENDING 0x0c
-#define FT_ACK 0x0d
+#define FT_ACK_OLD 0x0d /* Remove in draft 15, replaced by 0x1a */
+#define FT_RETIRE_CONNECTION_ID 0x0d
#define FT_PATH_CHALLENGE 0x0e
#define FT_PATH_RESPONSE 0x0f
#define FT_STREAM_10 0x10
#define FT_STREAM_17 0x17
#define FT_CRYPTO 0x18
#define FT_NEW_TOKEN 0x19 /* Add in draft 13 */
-#define FT_ACK_ECN 0x1a /* Add in draft 14 */
-#define FT_ACK_ECN_OLD 0x20 /* Remove in draft 14 */
+#define FT_ACK 0x1a
+#define FT_ACK_ECN 0x1b
+#define FT_ACK_ECN_OLD 0x1a /* Add in draft 14 */
+#define FT_ACK_ECN_OLD_OLD 0x20 /* Remove in draft 14 */
-static const range_string quic_frame_type_vals[] = {
+static const range_string quic_frame_type_draft14_vals[] = {
{ 0x00, 0x00, "PADDING" },
{ 0x01, 0x01, "RST_STREAM" },
{ 0x02, 0x02, "CONNECTION_CLOSE" },
{ 0, 0, NULL },
};
+static const range_string quic_frame_type_vals[] = {
+ { 0x00, 0x00, "PADDING" },
+ { 0x01, 0x01, "RST_STREAM" },
+ { 0x02, 0x02, "CONNECTION_CLOSE" },
+ { 0x03, 0x03, "APPLICATION_CLOSE" },
+ { 0x04, 0x04, "MAX_DATA" },
+ { 0x05, 0x05, "MAX_STREAM_DATA" },
+ { 0x06, 0x06, "MAX_STREAM_ID" },
+ { 0x07, 0x07, "PING" },
+ { 0x08, 0x08, "BLOCKED" },
+ { 0x09, 0x09, "STREAM_BLOCKED" },
+ { 0x0a, 0x0a, "STREAM_ID_BLOCKED" },
+ { 0x0b, 0x0b, "NEW_CONNECTION_ID" },
+ { 0x0c, 0x0c, "STOP_SENDING" },
+ { 0x0d, 0x0d, "RETIRE_CONNECTION_ID" },
+ { 0x0e, 0x0e, "PATH_CHALLENGE" },
+ { 0x0f, 0x0f, "PATH_RESPONSE" },
+ { 0x10, 0x17, "STREAM" },
+ { 0x18, 0x18, "CRYPTO" },
+ { 0x19, 0x19, "NEW_TOKEN" },
+ { 0x1a, 0x1a, "ACK" },
+ { 0x1b, 0x1b, "ACK_ECN" },
+ { 0, 0, NULL },
+};
+
/* >= draft-08 */
#define FTFLAGS_STREAM_FIN 0x01
ti_ft = proto_tree_add_item(quic_tree, hf_quic_frame, tvb, offset, 1, ENC_NA);
ft_tree = proto_item_add_subtree(ti_ft, ett_quic_ft);
- ti_ftflags = proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type, tvb, offset, 1, ENC_NA, &frame_type);
- proto_item_set_text(ti_ft, "%s", rval_to_str(frame_type, quic_frame_type_vals, "Unknown"));
+ if (is_quic_draft_max(quic_info->version, 14)) {
+ ti_ftflags = proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_draft14, tvb, offset, 1, ENC_NA, &frame_type);
+ proto_item_set_text(ti_ft, "%s", rval_to_str(frame_type, quic_frame_type_draft14_vals, "Unknown"));
+ } else {
+ ti_ftflags = proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type, tvb, offset, 1, ENC_NA, &frame_type);
+ proto_item_set_text(ti_ft, "%s", rval_to_str(frame_type, quic_frame_type_vals, "Unknown"));
+ }
offset += 1;
switch(frame_type){
FT_NONE, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_quic_frame_type_draft14,
+ { "Frame Type", "quic.frame_type.draft14",
+ FT_UINT8, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_frame_type_draft14_vals), 0x0,
+ NULL, HFILL }
+ },
{ &hf_quic_frame_type,
{ "Frame Type", "quic.frame_type",
FT_UINT8, BASE_RANGE_STRING | BASE_HEX, RVALS(quic_frame_type_vals), 0x0,