diff options
author | Darien Spencer <cusneud@mail.com> | 2017-08-18 10:03:06 +0300 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-09-20 23:07:05 +0000 |
commit | e2a2618d9bbad3be872b0f7b98647fc901bcf93d (patch) | |
tree | e54fba72558c5737fd913960d7c6172f0cb9acc3 | |
parent | a8a2a8776be41563b5c063a23e39d1e9aca052a0 (diff) |
UMTS RLC: Removing unused 'is ciphered' function
All calls to this function were commented out in a previous commit.
Also dealing with the state of the payload (ciphred or not) should be done within the RLC dissector
Change-Id: Ice3a3ca8392d73c7b67308537d7568ab71a98b5e
Reviewed-on: https://code.wireshark.org/review/23644
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_rlc.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_rlc.h | 3 |
3 files changed, 6 insertions, 25 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index c61fc6934f..97861f045c 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -793,7 +793,7 @@ dissect_tb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, chan+1, n+1, p_fp_info->chan_tf_size[chan]); } - if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/ && data_handle && + if (preferences_call_mac_dissectors && data_handle && (p_fp_info->chan_tf_size[chan] > 0)) { tvbuff_t *next_tvb; proto_item *item; @@ -900,7 +900,7 @@ dissect_macd_pdu_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pinfo->fd->subnum = pdu; /* set subframe number to current TB */ p_fp_info->cur_tb = pdu; /*Set TB (PDU) index correctly*/ - if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/) { + if (preferences_call_mac_dissectors) { tvbuff_t *next_tvb; next_tvb = tvb_new_subset_length_caplen(tvb, offset + bit_offset/8, ((bit_offset % 8) + length + 7)/8, -1); @@ -965,7 +965,7 @@ dissect_macd_pdu_data_type_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree } - if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/) { + if (preferences_call_mac_dissectors) { tvbuff_t *next_tvb = tvb_new_subset_length(tvb, offset, length); @@ -2910,7 +2910,7 @@ dissect_e_dch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } for (macd_idx = 0; macd_idx < subframes[n].number_of_mac_d_pdus[i]; macd_idx++) { - if (preferences_call_mac_dissectors /*&& !rlc_is_ciphered(pinfo)*/) { + if (preferences_call_mac_dissectors) { tvbuff_t *next_tvb; pinfo->fd->subnum = macd_idx; /* set subframe number to current TB */ /* create new TVB and pass further on */ @@ -3305,7 +3305,7 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /*Check if this is multiplexed (signaled by RRC)*/ - if ( /*!rlc_is_ciphered(pinfo) &&*/ p_fp_info->hsdhsch_macfdlow_is_mux[p_fp_info->hsdsch_macflowd_id] ) { + if (p_fp_info->hsdhsch_macfdlow_is_mux[p_fp_info->hsdsch_macflowd_id] ) { macinf->ctmux[i] = TRUE; } else if (p_fp_info->hsdsch_macflowd_id == 0) { /*MACd-flow = 0 is often SRB */ expert_add_info(pinfo, NULL, &ei_fp_maybe_srb); @@ -5152,7 +5152,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv, /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then it's SRB0 == UM else AM*/ rlcinf->mode[0] = hsdsch_macdflow_id_rlc_map[fp_hsdsch_channel_info->hsdsch_macdflow_id]; - if (fpi->hsdsch_entity == hs /*&& !rlc_is_ciphered(pinfo)*/) { + if (fpi->hsdsch_entity == hs) { for (i=0; i<MAX_NUM_HSDHSCH_MACDFLOW; i++) { /*Figure out if this channel is multiplexed (signaled from RRC)*/ if ((cur_val=(gint *)g_tree_lookup(hsdsch_muxed_flows, GINT_TO_POINTER((gint)fp_hsdsch_channel_info->hrnti))) != NULL) { diff --git a/epan/dissectors/packet-umts_rlc.c b/epan/dissectors/packet-umts_rlc.c index 50289bc640..00f553fe90 100644 --- a/epan/dissectors/packet-umts_rlc.c +++ b/epan/dissectors/packet-umts_rlc.c @@ -2813,22 +2813,6 @@ dissect_rlc_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data return TRUE; } -gboolean -rlc_is_ciphered(packet_info * pinfo){ - fp_info *fpinf; - rlc_info *rlcinf; - - if (!pinfo) { - return global_rlc_ciphered; - } - - fpinf = (fp_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_fp, 0); - rlcinf = (rlc_info *)p_get_proto_data(wmem_file_scope(), pinfo, proto_umts_rlc, 0); - - return ((rlcinf && fpinf && (rlcinf->ciphered[fpinf->cur_tb] == TRUE) && (rlcinf->deciphered[fpinf->cur_tb] == FALSE)) - || global_rlc_ciphered); -} - void proto_register_rlc(void) { diff --git a/epan/dissectors/packet-umts_rlc.h b/epan/dissectors/packet-umts_rlc.h index 6f37cc4460..ab4cb7e671 100644 --- a/epan/dissectors/packet-umts_rlc.h +++ b/epan/dissectors/packet-umts_rlc.h @@ -60,9 +60,6 @@ typedef struct rlc_info * resets on transport channel swap. */ void rlc_reset_channel(enum rlc_mode mode, guint8 rbid, guint8 dir, guint32 ueid, struct atm_phdr *atm); -/* Tells other functions if this packet is ciphered or not */ -gboolean rlc_is_ciphered(packet_info * pinfo); - /*****************************************************************/ /* UDP framing format */ /* ----------------------- */ |