aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-11-20 17:21:06 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2016-11-20 18:02:19 +0000
commit22f6ab034d75b0bb03cb8f388533b77e024878f1 (patch)
tree778aa58730eb89d9e44ea07ee83e5a4db485c6ea
parent390674f309eb84215281b1b97254fc4936554a18 (diff)
PDCP LTE: cache LTE RRC dissectors handles
Change-Id: I35ac69aaf5ce6c3fe14c5af2182e4e53f2aded9b Reviewed-on: https://code.wireshark.org/review/18899 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-pdcp-lte.c34
1 files changed, 24 insertions, 10 deletions
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index f824a88ad7..fa05f0b86e 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -444,6 +444,13 @@ static const value_string ciphering_algorithm_vals[] = {
static dissector_handle_t ip_handle;
static dissector_handle_t ipv6_handle;
static dissector_handle_t rohc_handle;
+static dissector_handle_t lte_rrc_ul_ccch;
+static dissector_handle_t lte_rrc_dl_ccch;
+static dissector_handle_t lte_rrc_pcch;
+static dissector_handle_t lte_rrc_bcch_bch;
+static dissector_handle_t lte_rrc_bcch_dl_sch;
+static dissector_handle_t lte_rrc_ul_dcch;
+static dissector_handle_t lte_rrc_dl_dcch;
#define SEQUENCE_ANALYSIS_RLC_ONLY 1
@@ -1211,31 +1218,31 @@ static dissector_handle_t lookup_rrc_dissector_handle(struct pdcp_lte_info *p_p
{
case Channel_CCCH:
if (p_pdcp_info->direction == DIRECTION_UPLINK) {
- rrc_handle = find_dissector("lte_rrc.ul_ccch");
+ rrc_handle = lte_rrc_ul_ccch;
}
else {
- rrc_handle = find_dissector("lte_rrc.dl_ccch");
+ rrc_handle = lte_rrc_dl_ccch;
}
break;
case Channel_PCCH:
- rrc_handle = find_dissector("lte_rrc.pcch");
+ rrc_handle = lte_rrc_pcch;
break;
case Channel_BCCH:
switch (p_pdcp_info->BCCHTransport) {
case BCH_TRANSPORT:
- rrc_handle = find_dissector("lte_rrc.bcch_bch");
+ rrc_handle = lte_rrc_bcch_bch;
break;
case DLSCH_TRANSPORT:
- rrc_handle = find_dissector("lte_rrc.bcch_dl_sch");
+ rrc_handle = lte_rrc_bcch_dl_sch;
break;
}
break;
case Channel_DCCH:
if (p_pdcp_info->direction == DIRECTION_UPLINK) {
- rrc_handle = find_dissector("lte_rrc.ul_dcch");
+ rrc_handle = lte_rrc_ul_dcch;
}
else {
- rrc_handle = find_dissector("lte_rrc.dl_dcch");
+ rrc_handle = lte_rrc_dl_dcch;
}
break;
@@ -2941,9 +2948,16 @@ void proto_reg_handoff_pdcp_lte(void)
/* Add as a heuristic UDP dissector */
heur_dissector_add("udp", dissect_pdcp_lte_heur, "PDCP-LTE over UDP", "pdcp_lte_udp", proto_pdcp_lte, HEURISTIC_DISABLE);
- ip_handle = find_dissector_add_dependency("ip", proto_pdcp_lte);
- ipv6_handle = find_dissector_add_dependency("ipv6", proto_pdcp_lte);
- rohc_handle = find_dissector_add_dependency("rohc", proto_pdcp_lte);
+ ip_handle = find_dissector_add_dependency("ip", proto_pdcp_lte);
+ ipv6_handle = find_dissector_add_dependency("ipv6", proto_pdcp_lte);
+ rohc_handle = find_dissector_add_dependency("rohc", proto_pdcp_lte);
+ lte_rrc_ul_ccch = find_dissector_add_dependency("lte_rrc.ul_ccch", proto_pdcp_lte);
+ lte_rrc_dl_ccch = find_dissector_add_dependency("lte_rrc.dl_ccch", proto_pdcp_lte);
+ lte_rrc_pcch = find_dissector_add_dependency("lte_rrc.pcch", proto_pdcp_lte);
+ lte_rrc_bcch_bch = find_dissector_add_dependency("lte_rrc.bcch_bch", proto_pdcp_lte);
+ lte_rrc_bcch_dl_sch = find_dissector_add_dependency("lte_rrc.bcch_dl_sch", proto_pdcp_lte);
+ lte_rrc_ul_dcch = find_dissector_add_dependency("lte_rrc.ul_dcch", proto_pdcp_lte);
+ lte_rrc_dl_dcch = find_dissector_add_dependency("lte_rrc.dl_dcch", proto_pdcp_lte);
}
/*