aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2018-01-03 08:30:08 +0100
committerAnders Broman <a.broman58@gmail.com>2018-01-03 12:06:40 +0000
commita3857b2f6f47928f2d9f4bbdeb57ca26a3728981 (patch)
tree4124c8b18d0672dbdb926313edc1f2d926ee1069 /epan
parentf1c87809deceacb59f61055f674c7778376f2d6e (diff)
QUIC: Enhance *BLOCKED* frame
Add new offset field in BLOCKED and STREAM_BLOCKED frame Add new stream_id field in STREAM_ID_BLOCKED Bug: 13881 Change-Id: If030728c46607ea9ea3a500d925b30aaf9a841a8 Reviewed-on: https://code.wireshark.org/review/25121 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-quic.c50
1 files changed, 44 insertions, 6 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c
index 811b5a3e01..6862496920 100644
--- a/epan/dissectors/packet-quic.c
+++ b/epan/dissectors/packet-quic.c
@@ -110,7 +110,10 @@ static int hf_quic_frame_type_md_maximum_data = -1;
static int hf_quic_frame_type_msd_stream_id = -1;
static int hf_quic_frame_type_msd_maximum_stream_data = -1;
static int hf_quic_frame_type_msi_stream_id = -1;
+static int hf_quic_frame_type_blocked_offset = -1;
static int hf_quic_frame_type_sb_stream_id = -1;
+static int hf_quic_frame_type_sb_offset = -1;
+static int hf_quic_frame_type_sib_stream_id = -1;
static int hf_quic_frame_type_nci_sequence = -1;
static int hf_quic_frame_type_nci_connection_id = -1;
static int hf_quic_frame_type_nci_stateless_reset_token = -1;
@@ -777,37 +780,55 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_
}
break;
case FT_BLOCKED:{
+ guint32 len_offset;
- /* No Payload */
+ if (quic_info->version <= 0xff000007) {
+ /* No Payload */
+ len_offset = 0;
+ } else {
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_blocked_offset, tvb, offset, -1, ENC_VARINT_QUIC, NULL, &len_offset);
+ offset += len_offset;
+ }
- proto_item_set_len(ti_ft, 1);
+ proto_item_set_len(ti_ft, 1 + len_offset);
col_prepend_fstr(pinfo->cinfo, COL_INFO, "Blocked");
}
break;
case FT_STREAM_BLOCKED:{
- guint32 len_streamid;
+ guint32 len_streamid, len_offset;
if (quic_info->version <= 0xff000007) {
proto_tree_add_item(ft_tree, hf_quic_frame_type_sb_stream_id, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
len_streamid = 4;
+ len_offset = 0;
} else {
proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_sb_stream_id, tvb, offset, -1, ENC_VARINT_QUIC, NULL, &len_streamid);
offset += len_streamid;
+
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_sb_offset, tvb, offset, -1, ENC_VARINT_QUIC, NULL, &len_offset);
+ offset += len_offset;
}
- proto_item_set_len(ti_ft, 1 + len_streamid);
+ proto_item_set_len(ti_ft, 1 + len_streamid + len_offset);
col_prepend_fstr(pinfo->cinfo, COL_INFO, "Stream Blocked");
}
break;
case FT_STREAM_ID_BLOCKED:{
+ guint32 len_streamid;
- /* No Payload */
+ if (quic_info->version <= 0xff000007) {
+ /* No Payload */
+ len_streamid = 0;
+ } else {
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_frame_type_sib_stream_id, tvb, offset, -1, ENC_VARINT_QUIC, NULL, &len_streamid);
+ offset += len_streamid;
+ }
- proto_item_set_len(ti_ft, 1);
+ proto_item_set_len(ti_ft, 1 + len_streamid);
col_prepend_fstr(pinfo->cinfo, COL_INFO, "Stream ID Blocked");
}
@@ -1740,12 +1761,29 @@ proto_register_quic(void)
FT_UINT64, BASE_DEC, NULL, 0x0,
"ID of the maximum peer-initiated stream ID for the connection", HFILL }
},
+ /* BLOCKED */
+ { &hf_quic_frame_type_blocked_offset,
+ { "Offset", "quic.frame_type.sb.offset",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ "Indicating the connection-level offset at which the blocking occurred", HFILL }
+ },
/* STREAM_BLOCKED */
{ &hf_quic_frame_type_sb_stream_id,
{ "Stream ID", "quic.frame_type.sb.stream_id",
FT_UINT64, BASE_DEC, NULL, 0x0,
"Indicating the stream which is flow control blocked", HFILL }
},
+ { &hf_quic_frame_type_sb_offset,
+ { "Offset", "quic.frame_type.sb.offset",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ "Indicating the offset of the stream at which the blocking occurred", HFILL }
+ },
+ /* STREAM_ID_BLOCKED */
+ { &hf_quic_frame_type_sib_stream_id,
+ { "Stream ID", "quic.frame_type.sib.stream_id",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ "Indicating the highest stream ID that the sender was permitted to open", HFILL }
+ },
/* NEW_CONNECTION_ID */
{ &hf_quic_frame_type_nci_sequence,
{ "Sequence", "quic.frame_type.nci.sequence",