aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dtls.c
diff options
context:
space:
mode:
authorStig Bjørlykke <stig@bjorlykke.org>2020-10-18 23:15:26 +0200
committerAndersBroman <a.broman58@gmail.com>2020-10-21 08:18:22 +0000
commit93ea780e7ce2f490ff442db5abc9253e4b7d8e03 (patch)
treee4ee93350de5a5c87c90d322a1c2a1a7e162b048 /epan/dissectors/packet-dtls.c
parent3f0649bbe5821131b14dc504c092fa000c7c117a (diff)
tls/dtls: Add a generated field for Application Data Protocol
Diffstat (limited to 'epan/dissectors/packet-dtls.c')
-rw-r--r--epan/dissectors/packet-dtls.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index 4fa5191316..f36bc2247d 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -97,6 +97,7 @@ static gint hf_dtls_record_sequence_number = -1;
static gint hf_dtls_record_connection_id = -1;
static gint hf_dtls_record_length = -1;
static gint hf_dtls_record_appdata = -1;
+static gint hf_dtls_record_appdata_proto = -1;
static gint hf_dtls_record_encrypted_content = -1;
static gint hf_dtls_alert_message = -1;
static gint hf_dtls_alert_message_level = -1;
@@ -969,6 +970,11 @@ dissect_dtls_record(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(dtls_record_tree, hf_dtls_record_appdata, tvb,
offset, record_length, ENC_NA);
+ if (session->app_handle) {
+ ti = proto_tree_add_string(dtls_record_tree, hf_dtls_record_appdata_proto, tvb, 0, 0, dissector_handle_get_dissector_name(session->app_handle));
+ proto_item_set_generated(ti);
+ }
+
/* show decrypted data info, if available */
if (decrypted)
{
@@ -1901,6 +1907,11 @@ proto_register_dtls(void)
FT_BYTES, BASE_NONE, NULL, 0x0,
"Payload is encrypted application data", HFILL }
},
+ { &hf_dtls_record_appdata_proto,
+ { "Application Data Protocol", "dtls.app_data_proto",
+ FT_STRING, BASE_NONE, NULL, 0x0,
+ NULL, HFILL }
+ },
{ &hf_dtls_record_encrypted_content,
{ "Encrypted Record Content", "dtls.enc_content",
FT_BYTES, BASE_NONE, NULL, 0x0,