From 51a6dfffc7d9ba65c07d5affd559457dd9a48130 Mon Sep 17 00:00:00 2001 From: Martin Mathieson Date: Fri, 23 Dec 2022 10:59:35 +0000 Subject: [PATCH] PDCP-LTE: add a filter for decypted data --- epan/dissectors/packet-pdcp-lte.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 1ab0296db5..06913f44d0 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -133,7 +133,7 @@ static int hf_pdcp_lte_security_count = -1; static int hf_pdcp_lte_security_cipher_key = -1; static int hf_pdcp_lte_security_integrity_key = -1; - +static int hf_pdcp_lte_security_deciphered_data = -1; /* Protocol subtree. */ static int ett_pdcp = -1; @@ -2476,6 +2476,12 @@ static int dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, payload_tvb = decipher_payload(tvb, pinfo, &offset, &pdu_security_settings, p_pdcp_info, pdu_security ? pdu_security->seen_next_ul_pdu: FALSE, &payload_deciphered); + /* Add deciphered data as a filterable field */ + if (payload_deciphered) { + proto_tree_add_item(pdcp_tree, hf_pdcp_lte_security_deciphered_data, + payload_tvb, 0, tvb_reported_length(payload_tvb), ENC_NA); + } + if (p_pdcp_info->plane == SIGNALING_PLANE) { guint32 data_length; guint32 mac; @@ -3038,6 +3044,12 @@ void proto_register_pdcp_lte(void) "pdcp-lte.security-config.integrity-key", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL } + }, + { &hf_pdcp_lte_security_deciphered_data, + { "Deciphered Data", + "pdcp-lte.deciphered-data", FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL + } } };