aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-csn1.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2011-07-07 07:44:25 +0000
committerAnders Broman <anders.broman@ericsson.com>2011-07-07 07:44:25 +0000
commit2a6c45c5a270b7b0914df7b771b7d818b8c18bfc (patch)
treec71654bac7172858595a20e878be6093c3c50206 /epan/dissectors/packet-csn1.c
parent6542687a7822e0baf3a51b1dce8323801e6ab739 (diff)
From Ludovic Haessler:
CSN Ack/Nack Description wrongly handled in gsm_rlcmac_dl dissector (3GPP TS 44.060) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6101 svn path=/trunk/; revision=37926
Diffstat (limited to 'epan/dissectors/packet-csn1.c')
-rw-r--r--epan/dissectors/packet-csn1.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/epan/dissectors/packet-csn1.c b/epan/dissectors/packet-csn1.c
index 4c830901c7..2a210151f4 100644
--- a/epan/dissectors/packet-csn1.c
+++ b/epan/dissectors/packet-csn1.c
@@ -450,9 +450,24 @@ csnStreamDissector(proto_tree *tree, csnStream_t* ar, const CSN_DESCR* pDescr, t
if (no_of_bits > 0)
{
- proto_tree_add_text(tree, tvb, bit_offset>>3, (no_of_bits>>3)+1, "%s %s",
+
+ if (no_of_bits <= 32)
+ {
+ proto_tree_add_text(tree, tvb, bit_offset>>3, (no_of_bits>>3)+1, "%s %s",
decode_bits_in_field(bit_offset, no_of_bits, tvb_get_bits32(tvb, bit_offset, no_of_bits, FALSE)),
pDescr->sz);
+ }
+ else if (no_of_bits <= 64)
+ {
+ proto_tree_add_text(tree, tvb, bit_offset>>3, (no_of_bits>>3)+1, "%s %s",
+ decode_bits_in_field(bit_offset, no_of_bits, tvb_get_bits64(tvb, bit_offset, no_of_bits, FALSE)),
+ pDescr->sz);
+ }
+ else
+ {
+ return ProcessError(tree, tvb, bit_offset,"csnStreamDissector NOT IMPLEMENTED", 999, pDescr);
+ }
+
remaining_bits_len -= no_of_bits;
DISSECTOR_ASSERT(remaining_bits_len >= 0);
bit_offset += no_of_bits;