aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-quic.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2020-03-02 15:41:59 +0100
committerPeter Wu <peter@lekensteyn.nl>2020-03-04 01:51:51 +0000
commita1ba7aa35f3d2544bc5a8261f261997df49bf242 (patch)
tree113073a222181572cabf8a7c19bfe2022d938411 /epan/dissectors/packet-quic.c
parent53246cee24206b75337481a85b59dc48d270195a (diff)
QUIC: Add Time Stamp Extension
From https://tools.ietf.org/html/draft-huitema-quic-ts-02 and https://github.com/quicwg/base-drafts/wiki/Temporary-IANA-Registry#quic-frame-types Ping-Bug: 13881 Change-Id: I38493281a46aa2d556ad39c70dc3479d35c657c2 Reviewed-on: https://code.wireshark.org/review/36256 Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-quic.c')
-rw-r--r--epan/dissectors/packet-quic.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c
index 22fde27a51..88350715e1 100644
--- a/epan/dissectors/packet-quic.c
+++ b/epan/dissectors/packet-quic.c
@@ -16,6 +16,7 @@
* https://tools.ietf.org/html/draft-ietf-quic-tls-27
* https://tools.ietf.org/html/draft-ietf-quic-invariants-07
* https://tools.ietf.org/html/draft-pauly-quic-datagram-05
+ * https://tools.ietf.org/html/draft-huitema-quic-ts-02
*
* Currently supported QUIC version(s): draft -21, draft -22, draft -23,
* draft-24, draft-25, draft-26, draft-27.
@@ -148,6 +149,7 @@ static int hf_quic_dg = -1;
static int hf_quic_af_sequence_number = -1;
static int hf_quic_af_packet_tolerance = -1;
static int hf_quic_af_update_max_ack_delay = -1;
+static int hf_quic_ts = -1;
static expert_field ei_quic_connection_unknown = EI_INIT;
static expert_field ei_quic_ft_unknown = EI_INIT;
@@ -390,6 +392,7 @@ static const value_string quic_long_packet_type_vals[] = {
{ 0, NULL }
};
+/* https://github.com/quicwg/base-drafts/wiki/Temporary-IANA-Registry#quic-frame-types */
#define FT_PADDING 0x00
#define FT_PING 0x01
#define FT_ACK 0x02
@@ -424,6 +427,7 @@ static const value_string quic_long_packet_type_vals[] = {
#define FT_DATAGRAM 0x30
#define FT_DATAGRAM_LENGTH 0x31
#define FT_ACK_FREQUENCY 0xAF
+#define FT_TIME_STAMP 0x02F5
static const range_string quic_frame_type_vals[] = {
{ 0x00, 0x00, "PADDING" },
@@ -451,6 +455,7 @@ static const range_string quic_frame_type_vals[] = {
{ 0x1e, 0x1e, "HANDSHAKE_DONE" },
{ 0x30, 0x31, "DATAGRAM" },
{ 0xAF, 0xAF, "ACK_FREQUENCY" },
+ { 0x02F5, 0x02F5, "TIME_STAMP" },
{ 0, 0, NULL },
};
@@ -1355,6 +1360,14 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *quic_tree
offset += (guint32)length;
}
break;
+ case FT_TIME_STAMP:{
+ guint32 length;
+
+ proto_tree_add_item_ret_varint(ft_tree, hf_quic_ts, tvb, offset, -1, ENC_VARINT_QUIC, NULL, &length);
+ offset += (guint32)length;
+
+ }
+ break;
default:
expert_add_info_format(pinfo, ti_ft, &ei_quic_ft_unknown, "Unknown Frame Type %#" G_GINT64_MODIFIER "x", frame_type);
break;
@@ -3127,6 +3140,11 @@ proto_register_quic(void)
FT_UINT64, BASE_DEC, NULL, 0x0,
"Representing an update to the peer's 'max_ack_delay' transport parameter", HFILL }
},
+ { &hf_quic_ts,
+ { "Time Stamp", "quic.ts",
+ FT_UINT64, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
};
static gint *ett[] = {