QUIC: Add PONG frame type from draft-08

Bug: 13881

Change-Id: I2f67e6f0fa8c517e143b3e352b0bc0297994d439
Reviewed-on: https://code.wireshark.org/review/25238
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Alexis La Goutte 2018-01-10 08:16:59 +01:00 committed by Anders Broman
parent 85c9780f43
commit 83e8adccde
1 changed files with 28 additions and 0 deletions

View File

@ -125,6 +125,8 @@ static int hf_quic_frame_type_nci_stateless_reset_token = -1;
static int hf_quic_frame_type_ss_stream_id = -1;
static int hf_quic_frame_type_ss_error_code = -1;
static int hf_quic_frame_type_ss_application_error_code = -1;
static int hf_quic_frame_type_pong_length = -1;
static int hf_quic_frame_type_pong_data = -1;
static int hf_quic_hash = -1;
@ -206,6 +208,7 @@ static const value_string quic_long_packet_type_vals[] = {
#define FT_STREAM_ID_BLOCKED 0x0a
#define FT_NEW_CONNECTION_ID 0x0b
#define FT_STOP_SENDING 0x0c
#define FT_PONG 0x0d
#define FT_ACK 0x0e
#define FT_STREAM_10 0x10
#define FT_STREAM_11 0x11
@ -234,6 +237,7 @@ static const range_string quic_frame_type_vals[] = {
{ 0x0a, 0x0a, "STREAM_ID_BLOCKED" },
{ 0x0b, 0x0b, "NEW_CONNECTION_ID" },
{ 0x0c, 0x0c, "STOP_SENDING" },
{ 0x0d, 0x0d, "PONG" },
{ 0x0e, 0x0e, "ACK" },
{ 0x10, 0x17, "STREAM" },
{ 0xa0, 0xbf, "ACK" }, /* <= draft-07 */
@ -899,6 +903,19 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_
}
break;
case FT_PONG:{
guint len_pong;
proto_tree_add_item_ret_uint(ft_tree, hf_quic_frame_type_pong_length, tvb, offset, 1, ENC_BIG_ENDIAN, &len_pong);
offset += 1;
proto_tree_add_item(ft_tree, hf_quic_frame_type_pong_data, tvb, offset, len_pong, ENC_NA);
offset += len_pong;
proto_item_set_len(ti_ft, 1 + 1 + len_pong);
col_prepend_fstr(pinfo->cinfo, COL_INFO, "PONG");
}
break;
case FT_ACK: {
guint64 ack_block_count;
guint32 lenvar;
@ -1899,6 +1916,17 @@ proto_register_quic(void)
FT_UINT16, BASE_DEC|BASE_EXT_STRING, &quic_error_code_vals_ext, 0x0,
"Indicates why the sender is ignoring the stream", HFILL }
},
/* PONG */
{ &hf_quic_frame_type_pong_length,
{ "Length", "quic.frame_type.pong.length",
FT_UINT8, BASE_DEC, NULL, 0x0,
"Describes the length of the Data field", HFILL }
},
{ &hf_quic_frame_type_pong_data,
{ "Data", "quic.frame_type.pong.data",
FT_BYTES, BASE_NONE, NULL, 0x0,
"Contains arbitrary data", HFILL }
},
{ &hf_quic_hash,
{ "Hash", "quic.hash",