RRC: add preference to put NAS in the root tree

This commit is contained in:
Pascal Quantin 2021-02-10 13:51:00 +01:00 committed by Wireshark GitLab Utility
parent ebfbf958f6
commit 12ab24019f
3 changed files with 224 additions and 206 deletions

View File

@ -26,6 +26,7 @@
#include <epan/conversation.h>
#include <epan/expert.h>
#include <epan/proto_data.h>
#include <epan/prefs.h>
#include "packet-ber.h"
#include "packet-per.h"
@ -55,6 +56,7 @@ GTree * hsdsch_muxed_flows = NULL;
GTree * rrc_ciph_info_tree = NULL;
wmem_tree_t* rrc_global_urnti_crnti_map = NULL;
static int msg_type _U_;
static gboolean rrc_nas_in_root_tree;
enum rrc_sib_segment_type {
RRC_SIB_SEG_NO_SEGMENT = 0,
@ -608,6 +610,7 @@ void proto_register_rrc(void) {
};
expert_module_t* expert_rrc;
module_t *rrc_module;
/* Register protocol */
proto_rrc = proto_register_protocol(PNAME, PSNAME, PFNAME);
@ -621,11 +624,15 @@ void proto_register_rrc(void) {
#include "packet-rrc-dis-reg.c"
register_init_routine(rrc_init);
register_cleanup_routine(rrc_cleanup);
register_init_routine(rrc_init);
register_cleanup_routine(rrc_cleanup);
/* Register configuration preferences */
rrc_module = prefs_register_protocol(proto_rrc, NULL);
prefs_register_bool_preference(rrc_module, "nas_in_root_tree",
"Show NAS PDU in root packet details",
"Whether the NAS PDU should be shown in the root packet details tree",
&rrc_nas_in_root_tree);
}

View File

@ -184,8 +184,10 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(DEFAULT_BODY)s
if (nas_message_tvb)
call_dissector(gsm_a_dtap_handle,nas_message_tvb,%(ACTX)s->pinfo, tree);
if (nas_message_tvb && gsm_a_dtap_handle) {
proto_tree *nas_tree = rrc_nas_in_root_tree ? proto_tree_get_root(tree) : tree;
call_dissector(gsm_a_dtap_handle,nas_message_tvb,%(ACTX)s->pinfo, nas_tree);
}
#.FN_BODY InterRATHandoverInfo/ue-CapabilityContainer/present VAL_PTR = &ue_radio_access_cap_info_tvb
tvbuff_t *ue_radio_access_cap_info_tvb=NULL;
@ -693,7 +695,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
%(DEFAULT_BODY)s
if (gsm_messagelist_tvb)
if (gsm_messagelist_tvb && gsm_a_dtap_handle)
call_dissector(gsm_a_dtap_handle,gsm_messagelist_tvb,actx->pinfo, tree);
#.FN_BODY HandoverFromUTRANCommand-GSM-r3-IEs/gsm-message/single-GSM-Message single-GSM-Message-r3
@ -722,7 +724,7 @@ HandoverFromUTRANCommand-GSM-r6-IEs/gsm-message/single-GSM-Message single-GSM-Me
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
if (gsm_message_tvb) {
if (gsm_message_tvb && gsm_a_dtap_handle) {
add_new_data_source(actx->pinfo,gsm_message_tvb,"GSM Message(aligned)");
call_dissector(gsm_a_dtap_handle,gsm_message_tvb,actx->pinfo, tree);
}

File diff suppressed because it is too large Load Diff