tls/dtls: Add a generated field for Application Data Protocol

This commit is contained in:
Stig Bjørlykke 2020-10-18 23:15:26 +02:00 committed by AndersBroman
parent 3f0649bbe5
commit 93ea780e7c
2 changed files with 22 additions and 1 deletions

View File

@ -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,

View File

@ -100,6 +100,7 @@ static gint hf_tls_record_opaque_type = -1;
static gint hf_tls_record_version = -1;
static gint hf_tls_record_length = -1;
static gint hf_tls_record_appdata = -1;
static gint hf_tls_record_appdata_proto = -1;
static gint hf_ssl2_record = -1;
static gint hf_ssl2_record_is_escape = -1;
static gint hf_ssl2_record_padding_length = -1;
@ -2034,6 +2035,11 @@ dissect_ssl3_record(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item(ssl_record_tree, hf_tls_record_appdata, tvb,
offset, record_length, ENC_NA);
if (app_handle) {
ti = proto_tree_add_string(ssl_record_tree, hf_tls_record_appdata_proto, tvb, 0, 0, dissector_handle_get_dissector_name(app_handle));
proto_item_set_generated(ti);
}
if (decrypted) {
dissect_ssl_payload(decrypted, pinfo, tree, session, record, app_handle);
}
@ -4168,7 +4174,11 @@ proto_register_tls(void)
FT_BYTES, BASE_NONE, NULL, 0x0,
"Payload is encrypted application data", HFILL }
},
{ &hf_tls_record_appdata_proto,
{ "Application Data Protocol", "tls.app_data_proto",
FT_STRING, BASE_NONE, NULL, 0x0,
NULL, HFILL }
},
{ &hf_ssl2_record,
{ "SSLv2 Record Header", "tls.record",
FT_NONE, BASE_NONE, NULL, 0x0,