WIP: qcdiag SIM

Change-Id: I7c4025405516edd42aea2e4c1800d341882b0876
This commit is contained in:
Harald Welte 2017-05-26 20:13:25 +02:00 committed by Harald Welte
parent fb5d2e9f48
commit 82af28921a
1 changed files with 20 additions and 0 deletions

View File

@ -149,6 +149,23 @@ static const value_string rrc_chan_types[] = {
{ 0, NULL }
};
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)
{
@ -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);