diff options
author | Alexis La Goutte <alexis.lagoutte@gmail.com> | 2018-01-04 22:29:26 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-01-05 05:20:07 +0000 |
commit | c29da51613747278bd1a3744cdc191de68d7933b (patch) | |
tree | 1be44fbefd4cd9e38b310173867fa527b9510d75 /epan | |
parent | 3a622f976405402cc5f0db4d8dcfa182f08f646d (diff) |
QUIC: Add Payload (length and data) of PING frame (draft-08)
Bug: 13881
Change-Id: I44a924da6e8da52bdee0f397545d504aee5290bc
Reviewed-on: https://code.wireshark.org/review/25145
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.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c index 9dd3527565..3c1649372b 100644 --- a/epan/dissectors/packet-quic.c +++ b/epan/dissectors/packet-quic.c @@ -113,6 +113,8 @@ 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_ping_length = -1; +static int hf_quic_frame_type_ping_data = -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; @@ -776,10 +778,19 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_ } break; case FT_PING:{ + guint len_ping; - /* No Payload */ + if (quic_info->version <= 0xff000007) { + /* No Payload */ + len_ping = 0; + } else { + proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_ping_length, tvb, offset, 1, ENC_BIG_ENDIAN, &len_ping); + offset += 1; + proto_tree_add_item(ft_tree, hf_quic_frame_type_ping_data, tvb, offset, len_ping, ENC_NA); + offset += len_ping; + } - proto_item_set_len(ti_ft, 1); + proto_item_set_len(ti_ft, 1 + 1 + len_ping); col_prepend_fstr(pinfo->cinfo, COL_INFO, "PING"); } @@ -1822,6 +1833,17 @@ proto_register_quic(void) FT_UINT64, BASE_DEC, NULL, 0x0, "ID of the maximum peer-initiated stream ID for the connection", HFILL } }, + /* PING */ + { &hf_quic_frame_type_ping_length, + { "Length", "quic.frame_type.ping.length", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Describes the length of the Data field", HFILL } + }, + { &hf_quic_frame_type_ping_data, + { "Data", "quic.frame_type.ping.data", + FT_BYTES, BASE_NONE, NULL, 0x0, + "Contains arbitrary data", HFILL } + }, /* BLOCKED */ { &hf_quic_frame_type_blocked_offset, { "Offset", "quic.frame_type.sb.offset", |