aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-samsung-ipc.c39
1 files changed, 29 insertions, 10 deletions
diff --git a/epan/dissectors/packet-samsung-ipc.c b/epan/dissectors/packet-samsung-ipc.c
index 686dc1ea13..af2101937b 100644
--- a/epan/dissectors/packet-samsung-ipc.c
+++ b/epan/dissectors/packet-samsung-ipc.c
@@ -14,7 +14,10 @@
#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/packet.h>
+
+#include "packet-gsm_sms.h"
#include "packet-usb.h"
+
#include "packet-samsung-ipc.h"
static const value_string hf_samsung_ipc_fmt_requests_types[] = {
@@ -430,13 +433,16 @@ static gboolean samsung_ipc_info(tvbuff_t *tvb, packet_info *pinfo,
}
static int dissect_samsung_ipc_chan_fmt_sms_incoming_msg(tvbuff_t *tvb,
- packet_info *pinfo _U_,
+ packet_info *pinfo,
proto_tree *tree _U_,
void *data _U_)
{
proto_tree *sms_incoming_msg_tree;
+ guint8 sc_address_size;
+ guint8 sms_pdu_offset = 0;
guint16 sms_pdu_length;
tvbuff_t *next_tvb;
+ guint32 offset = 0;
if (tvb_reported_length(tvb) < 16)
return FALSE;
@@ -462,15 +468,29 @@ static int dissect_samsung_ipc_chan_fmt_sms_incoming_msg(tvbuff_t *tvb,
proto_tree_add_item(sms_incoming_msg_tree,
hf_samsung_ipc_sms_length, tvb, 15, 1, ENC_NA);
-
- /* TODO:
- * (1) Why do we have this offset of 8?
- * (2) What is before the 03.40 SMS seem to be valid
- * information similar to the one before the SMS on SMS
- * captured with gsmtap (wireshark displays
- * "GSM A-I/F RP-RP-DATA (Network to MS)" in the info column).
+ /*
+ * From TS 27.005 in the "3.1 Paramaters Definitions" section we have:
+ * [...]
+ * Message Data Parameters
+ * [...]
+ * <pdu> In the case of SMS: 3GPP TS 24.011 [6] SC address
+ * followed by 3GPP TS 23.040 [3] TPDU in hexadecimal
+ * format [...]
+ * [...]
+ * [3] 3GPP TS 23.040: "Technical realization of the Short Message Service (SMS)".
+ * [...]
+ * [6] 3GPP TS 24.011: "Short Message Service (SMS) support on mobile radio interface".
+ *
+ * So before the TS 23.040 we have an SC address.
*/
- next_tvb = tvb_new_subset_length(tvb, 16 + 8, sms_pdu_length - 8);
+ offset = 16;
+ sc_address_size = tvb_get_guint8(tvb, offset);
+ if (sc_address_size) {
+ dis_field_addr(tvb, pinfo, tree, &offset, "SC-Address");
+ sms_pdu_offset = sc_address_size + 1;
+ }
+
+ next_tvb = tvb_new_subset_length(tvb, 16 + sms_pdu_offset, sms_pdu_length - sms_pdu_offset);
call_dissector(gsm_sms_handle, next_tvb, pinfo, tree);
@@ -872,7 +892,6 @@ void proto_reg_handoff_samsung_ipc(void)
gsm_sms_handle = find_dissector_add_dependency(
"gsm_sms",
proto_samsung_ipc);
-
}
}