aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-10-26 22:38:20 +0200
committerHarald Welte <laforge@osmocom.org>2020-09-11 23:32:26 +0200
commita2eb4d6bdcdfa57f8f87cb9f1d54f9763b444f7f (patch)
tree68f1c5b2875a8c50b671f55f6d39e25ce8ae9326
parent42bd018b2020ae0b930f6a2beb5313034abe6f87 (diff)
HACK: Hand GPRS RLC payload to GPRS LLC dissector
this is an ugly hack, as there is no code for packet re-assembly in betwween, i.e. we only get proper dissection if the LLC message was fitting entirely into one RLC block. Nevertheless, sufficient to see things like RAU, ATTACH, IDENTITY procedures. Change-Id: I1fc488aa58353e5f4264b940f9f4c18987148a7d
-rw-r--r--epan/dissectors/packet-gsm_rlcmac.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gsm_rlcmac.c b/epan/dissectors/packet-gsm_rlcmac.c
index 14fa86c4bf..cc6ddfb520 100644
--- a/epan/dissectors/packet-gsm_rlcmac.c
+++ b/epan/dissectors/packet-gsm_rlcmac.c
@@ -49,6 +49,7 @@ void proto_reg_handoff_gsm_rlcmac(void);
static dissector_handle_t lte_rrc_dl_dcch_handle = NULL;
static dissector_handle_t rrc_irat_ho_to_utran_cmd_handle = NULL;
+static dissector_handle_t llc_handle = NULL;
/* private typedefs */
typedef struct
@@ -8598,7 +8599,7 @@ static guint8 dissect_gprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, prot
"data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
i, li, li);
data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
- call_data_dissector(data_tvb, pinfo, subtree);
+ call_dissector(llc_handle, data_tvb, pinfo, subtree);
octet_offset += li;
break;
}
@@ -8606,19 +8607,20 @@ static guint8 dissect_gprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, prot
}
if (octet_offset < octet_length)
{
+ data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
/* if there is space left in the RLC Block, then it is a segment of LLC Frame without LI*/
if (more)
{
col_append_str_uint(pinfo->cinfo, COL_INFO, "Len", octet_length - octet_offset, " ");
subtree = proto_tree_add_subtree_format(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL,
"data segment: LI not present: \n The Upper Layer PDU in the current RLC data block either fills the current RLC data block precisely \nor continues in the following in-sequence RLC data block");
+ call_dissector(llc_handle, data_tvb, pinfo, subtree);
}
else
{
subtree = proto_tree_add_subtree(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL, "Padding Octets");
+ call_data_dissector(data_tvb, pinfo, subtree);
}
- data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_data_dissector(data_tvb, pinfo, subtree);
octet_offset = octet_length;
}
return (octet_offset - initial_offset);
@@ -8714,7 +8716,7 @@ static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, pr
"data segment: LI[%d]=%d indicates: (Last segment of) LLC frame (%d octets)",
i, li, li);
data_tvb = tvb_new_subset_length(tvb, octet_offset, li);
- call_data_dissector(data_tvb, pinfo, subtree);
+ call_dissector(llc_handle, data_tvb, pinfo, subtree);
octet_offset += li;
break;
}
@@ -8727,7 +8729,7 @@ static guint16 dissect_egprs_data_segments(tvbuff_t *tvb, packet_info *pinfo, pr
subtree = proto_tree_add_subtree(tree, tvb, octet_offset, octet_length - octet_offset, ett_data_segments, NULL,
"data segment: LI not present: \n The Upper Layer PDU in the current RLC data block either fills the current RLC data block precisely \nor continues in the following in-sequence RLC data block");
data_tvb = tvb_new_subset_length(tvb, octet_offset, octet_length - octet_offset);
- call_data_dissector(data_tvb, pinfo, subtree);
+ call_dissector(llc_handle, data_tvb, pinfo, subtree);
octet_offset = octet_length;
}
return (octet_offset - initial_offset);
@@ -18609,6 +18611,7 @@ void proto_reg_handoff_gsm_rlcmac(void)
{
lte_rrc_dl_dcch_handle = find_dissector("lte_rrc.dl_dcch");
rrc_irat_ho_to_utran_cmd_handle = find_dissector("rrc.irat.ho_to_utran_cmd");
+ llc_handle = find_dissector("llcgprs");
}
/*