aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-05-26 20:13:25 +0200
committerHarald Welte <laforge@osmocom.org>2023-03-11 15:02:01 +0100
commit82af28921a14a47c17c4905c7225d506cbdf174f (patch)
tree6923b037548f5977fc779915b56b183e58559890
parentfb5d2e9f48d1bd63dd866582724fe28edabfed50 (diff)
WIP: qcdiag SIMlaforge/qcdiag
-rw-r--r--epan/dissectors/packet-qcdiag_log.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/epan/dissectors/packet-qcdiag_log.c b/epan/dissectors/packet-qcdiag_log.c
index f5825f3c48..ce7c981116 100644
--- a/epan/dissectors/packet-qcdiag_log.c
+++ b/epan/dissectors/packet-qcdiag_log.c
@@ -150,6 +150,23 @@ static const value_string rrc_chan_types[] = {
};
static int
+dissect_qcdiag_log_uim(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *log_tree, proto_tree *tree)
+{
+ tvbuff_t *payload_tvb;
+ guint uim_length;
+
+ proto_tree_add_item_ret_uint(log_tree, hf_rrc_length, tvb, offset++, 1, ENC_NA, &uim_length);
+
+ /* Data: Raw APDU Message */
+ payload_tvb = tvb_new_subset_length(tvb, offset, uim_length);
+
+ if (sub_handles[SUB_SIM])
+ call_dissector(sub_handles[SUB_SIM], payload_tvb, pinfo, tree);
+
+ return tvb_captured_length(tvb);
+}
+
+static int
dissect_qcdiag_log_rrc(tvbuff_t *tvb, guint offset, packet_info *pinfo, proto_tree *log_tree, proto_tree *tree)
{
tvbuff_t *payload_tvb;
@@ -334,6 +351,8 @@ dissect_qcdiag_log(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * d
offset += 8;
switch (code) {
+ case 0x1098: /* UIM/SIM/UICC data */
+ return dissect_qcdiag_log_uim(tvb, offset, pinfo, diag_log_tree, tree);
case 0x512f: /* GSM RR signaling message */
return dissect_qcdiag_log_rr(tvb, offset, pinfo, diag_log_tree, tree);
case 0x412f: /* 3G RRC */
@@ -424,6 +443,7 @@ proto_reg_handoff_qcdiag_log(void)
dissector_add_uint("qcdiag.cmd", DIAG_LOG_F, qcdiag_log_handle);
sub_handles[SUB_DATA] = find_dissector("data");
+ sub_handles[SUB_SIM] = find_dissector("gsm_sim");
sub_handles[SUB_UM_CCCH] = find_dissector_add_dependency("gsm_a_ccch", proto_qcdiag_log);
sub_handles[SUB_UM_DTAP] = find_dissector_add_dependency("gsm_a_dtap", proto_qcdiag_log);
sub_handles[SUB_UM_SACCH] = find_dissector_add_dependency("gsm_a_sacch", proto_qcdiag_log);