diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-12-14 08:20:32 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-12-14 08:20:32 +0000 |
commit | 4fef2920990687fd6464b6c7fd3abcd88274f812 (patch) | |
tree | 1f5ce30b7b5ee01f25e4187d6a5089475477dd10 | |
parent | 21a206c37f17f9cf81aaf0079d226ab3a25d6698 (diff) |
From Victor Stratan: correct offset calculation and add TP-PID decoding
in SMS-SUBMIT-REPORT decoding based on 3GPP TS 23.040 V6.5.0 9.2.3.11.
svn path=/trunk/; revision=12750
-rw-r--r-- | epan/dissectors/packet-gsm_sms.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c index 9a3cc73d80..cc6a380e59 100644 --- a/epan/dissectors/packet-gsm_sms.c +++ b/epan/dissectors/packet-gsm_sms.c @@ -2239,10 +2239,24 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset) pi = tvb_get_guint8(tvb, offset); dis_field_pi(tvb, tree, offset, pi); - offset++; + dis_field_scts(tvb, tree, &offset); + if (pi & 0x01) { + if (length <= (offset - saved_offset)) { + proto_tree_add_text(tree, + tvb, offset, -1, + "Short Data (?)"); + return; + } + + oct = tvb_get_guint8(tvb, offset); + + dis_field_pid(tvb, tree, offset, oct); + offset++; + } + if (pi & 0x02) { if (length <= (offset - saved_offset)) @@ -2253,10 +2267,10 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset) return; } - offset++; oct = tvb_get_guint8(tvb, offset); dis_field_dcs(tvb, tree, offset, oct, &seven_bit, &eight_bit, &ucs2, &compressed); + offset++; } if (pi & 0x04) @@ -2269,17 +2283,15 @@ dis_msg_submit_report(tvbuff_t *tvb, proto_tree *tree, guint32 offset) return; } - offset++; oct = tvb_get_guint8(tvb, offset); udl = oct; DIS_FIELD_UDL(tree, offset); + offset++; } if (udl > 0) { - offset++; - dis_field_ud(tvb, tree, offset, length - (offset - saved_offset), udhi, udl, seven_bit, eight_bit, ucs2, compressed); } |