aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-umts_fp.c
diff options
context:
space:
mode:
authorDarien Spencer <cusneud@mail.com>2018-09-16 23:08:18 +0300
committerAnders Broman <a.broman58@gmail.com>2018-09-17 03:58:49 +0000
commita62f359e044635f3740fb85c50e9abbe4d225f10 (patch)
tree0e175d524d766ccbd892dfb2ab0973e30cfa540f /epan/dissectors/packet-umts_fp.c
parent59ac823c3f0490ac689e847d3922ed38ae137ddb (diff)
FP: HS-DSCH - Use RLC mode from NBAP
If found in NBAP, use the RLC Mode indicated and spare guessing by the MAC-d Flow ID. Change-Id: Ie46922d53863667db630957a771092bc5ad00912 Reviewed-on: https://code.wireshark.org/review/29686 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-umts_fp.c')
-rw-r--r--epan/dissectors/packet-umts_fp.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c
index 7f729843c7..b51bc0234d 100644
--- a/epan/dissectors/packet-umts_fp.c
+++ b/epan/dissectors/packet-umts_fp.c
@@ -3256,9 +3256,6 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
macinf->lchid[i] = fake_lchid_macd_flow[p_fp_info->hsdsch_macflowd_id];/*Faked logical channel id 255 used as a mark if it doesn't exist...*/
macinf->fake_chid[i] = TRUE; /**/
macinf->macdflow_id[i] = p_fp_info->hsdsch_macflowd_id; /*Save the flow ID (+1 to make it human readable (it's zero indexed!))*/
- /*Figure out RLC_MODE based on MACd-flow-ID, basically MACd-flow-ID = 0 then it's SRB0 == UM else AM*/
- rlcinf->mode[i] = hsdsch_macdflow_id_rlc_map[p_fp_info->hsdsch_macflowd_id];
-
/*Check if this is multiplexed (signaled by RRC)*/
if (p_fp_info->hsdhsch_macfdlow_is_mux[p_fp_info->hsdsch_macflowd_id] ) {
@@ -3268,6 +3265,18 @@ dissect_hsdsch_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
} else {
macinf->ctmux[i] = FALSE; /*Either it's multiplexed and not signled or it's not MUX*/
}
+
+ /* Figure out RLC mode */
+ if(p_fp_info->hsdsch_rlc_mode != FP_RLC_MODE_UNKNOWN) {
+ /* We know the RLC mode, possibly reported from NBAP */
+ rlcinf->mode[i] = (enum rlc_mode)(p_fp_info->hsdsch_rlc_mode - 1);
+ }
+ else {
+ /* Guess the mode by the MACd-flow-ID, basically MACd-flow-ID = 0 then it's SRB0 == UM else AM */
+ /* This logic might be incorrect sometimes */
+ rlcinf->mode[i] = hsdsch_macdflow_id_rlc_map[p_fp_info->hsdsch_macflowd_id];
+ }
+
rlcinf->ueid[i] = user_identity;
rlcinf->li_size[i] = RLC_LI_7BITS;
rlcinf->deciphered[i] = FALSE;
@@ -5261,6 +5270,7 @@ fp_set_per_packet_inf_from_conv(conversation_t *p_conv,
break;
}
fpi->hsdsch_entity = fp_hsdsch_channel_info->hsdsch_entity;
+ fpi->hsdsch_rlc_mode = p_conv_data->rlc_mode;
macinf = wmem_new0(wmem_file_scope(), umts_mac_info);
fpi->hsdsch_macflowd_id = fp_hsdsch_channel_info->hsdsch_macdflow_id;
macinf->content[0] = hsdsch_macdflow_id_mac_content_map[fp_hsdsch_channel_info->hsdsch_macdflow_id]; /*MAC_CONTENT_PS_DTCH;*/