}
-/* Show an AM PDU. If configured, pass to PDCP dissector */
-static void show_AM_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, gint offset, gint length,
- rlc_lte_info *rlc_info, gboolean whole_pdu)
+/* Show an SDU. If configured, pass to PDCP dissector */
+static void show_PDU_in_tree(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, gint offset, gint length,
+ rlc_lte_info *rlc_info, gboolean whole_pdu)
{
- proto_item *data_ti = proto_tree_add_item(tree, hf_rlc_lte_am_data, tvb, offset, length, FALSE);
+ /* Add raw data (according to mode) */
+ proto_item *data_ti = proto_tree_add_item(tree,
+ (rlc_info->rlcMode == RLC_AM_MODE) ?
+ hf_rlc_lte_am_data :
+ hf_rlc_lte_um_data,
+ tvb, offset, length, FALSE);
/* Decode signalling PDUs as PDCP */
if (whole_pdu &&
/* Show each data segment separately */
int n;
for (n=0; n < s_number_of_extensions; n++) {
- proto_tree_add_item(tree, hf_rlc_lte_um_data, tvb, offset, s_lengths[n], FALSE);
+ show_PDU_in_tree(pinfo, tree, tvb, offset, s_lengths[n], p_rlc_lte_info,
+ (n==0) ? first_includes_start : TRUE);
show_PDU_in_info(pinfo, top_ti, s_lengths[n],
(n==0) ? first_includes_start : TRUE,
TRUE);
}
/* Final data element */
- proto_tree_add_item(tree, hf_rlc_lte_um_data, tvb, offset, -1, FALSE);
+ show_PDU_in_tree(pinfo, tree, tvb, offset, -1, p_rlc_lte_info,
+ ((s_number_of_extensions == 0) ? first_includes_start : TRUE) && last_includes_end);
+
+
show_PDU_in_info(pinfo, top_ti, (guint16)tvb_length_remaining(tvb, offset),
(s_number_of_extensions == 0) ? first_includes_start : TRUE,
last_includes_end);
/* Show each data segment separately */
int n;
for (n=0; n < s_number_of_extensions; n++) {
- show_AM_PDU_in_tree(pinfo, tree, tvb, offset, s_lengths[n], p_rlc_lte_info,
- (n==0) ? first_includes_start : TRUE);
+ show_PDU_in_tree(pinfo, tree, tvb, offset, s_lengths[n], p_rlc_lte_info,
+ (n==0) ? first_includes_start : TRUE);
show_PDU_in_info(pinfo, top_ti, s_lengths[n],
(n==0) ? first_includes_start : TRUE,
TRUE);
/* Final data element */
if (tvb_length_remaining(tvb, offset) > 0) {
- show_AM_PDU_in_tree(pinfo, tree, tvb, offset, -1, p_rlc_lte_info,
- ((s_number_of_extensions == 0) ? first_includes_start : TRUE) && last_includes_end);
+ show_PDU_in_tree(pinfo, tree, tvb, offset, -1, p_rlc_lte_info,
+ ((s_number_of_extensions == 0) ? first_includes_start : TRUE) && last_includes_end);
show_PDU_in_info(pinfo, top_ti, (guint16)tvb_length_remaining(tvb, offset),
(s_number_of_extensions == 0) ? first_includes_start : TRUE,
last_includes_end);