Commit Graph

65 Commits

Author SHA1 Message Date
Pau Espin a059280b5d CSN.1: Fix compiler warning showing wrong copy
Let's do what's done for u8, which looks far more sane.

Fixes following gcc 11.2.0 warning:
"""
epan/dissectors/packet-csn1.c:913:17: warning: ‘ui16’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  913 |                 memcpy(pui16, &ui16, 2);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
"""
2022-02-25 17:23:07 +00:00
Gerald Combs 1fd1853837 CSN.1: Fix some alignment issues.
Not all architectures allow unaligned access. Copy our 16- and 32-bit
values instead of using direct assignment. Ping #17882.
2022-01-30 11:08:07 +00:00
Pau Espin 1dfb3edac1 csn1: Avoid storing existence bit as true if content was actually NULL
If we decode Exist bit as "1" but we are at the end of the message, and
all the Next items we'd read are expected to be possibly NULL, then swap
the Exist bit in the decoded structure as "0" in order to tell the
decoder user that the related information structure is actually unset,
as if "0" was received.

This patch is a port from patch fixing same issue in the osmo-pcu.git copy of
csn1 decoder:
https://git.osmocom.org/osmo-pcu/commit/?id=1859ec38cc4f4e3788e495a100fdec3787d25020
And fixup patch for that one:
https://git.osmocom.org/osmo-pcu/commit/?id=9ecdc11eb6b983748ae2fd6a1d07849c8106826f
2021-10-20 18:50:49 +02:00
Pau Espin 6ba9c7b918 csn1: Avoid failing if optional DownlinkDualCarrierCapability_r7 is missing
All additional release fields in RadioAccesCapabilities are considered
optional, and the CSN_DESCR for Content_t already marks almost all as such,
except DownlinkDualCarrierCapability_r7.

It has been found that some MS transmits a MS RA Capability with a Length=61 bits
where the last bit in the buffer is setting the Exist bit for
DownlinkDualCarrierCapability_r7 as 1. Hence, the CSN1 decoder failed to
decode the whole message because it expected to keep reading there
despite there's no more bytes to read.

While this is could actually be considered an MS bug, let's relax our
expectancies and simply consider the case { 1 <end> } as it was { 0 },
and mark skip decoding DownlinkDualCarrierCapability_r7. That what
wireshark (packet-gsm_a_gsm.c) or pycrate do for instance.

This patch itself doesn't fix the problem where actually the Exist bit
is stored as 1 in the output decoded structure, but simply allows keep
ongoing with decoding until the end. This issue will be fixed in a
follow-up patch.

This patch is a port from patch fixing same issue in the osmo-pcu.git copy of
csn1 decoder:
https://git.osmocom.org/osmo-pcu/commit/?id=ebdc0d8c170ee2dbf23b19056d6c2d0ef316b3c2
2021-10-20 18:50:49 +02:00
Tomasz Moń 7b82110092 USB HID: Parse bit fields with correct bit order
Implement little endian support for tvb_get_bits family of functions.
The big/little endian refers to bit numbering within an octet. In big
endian, the most significant bit is considered bit 0, while in little
endian the least significant bit is considered bit 0.

Add encoding parameters to proto tree bits format family functions.
Specify ENC_BIG_ENDIAN in all dissectors using these functions except in
USB HID that requires ENC_LITTLE_ENDIAN to work correctly.

When formatting bits values, always display most significant bit on the
leftmost position regardless of the encoding. This results in no gaps
between octets and makes the displayed value comprehensible.

Close #4478
Fix #17014
2021-09-26 18:16:28 +02:00
Martin Mathieson 0cf834f909 Make some more variables and functions static. 2021-02-14 19:42:01 +00:00
Vadim Yanitskiy 2046666b97 csn1: fix M_UINT_OFFSET: show value after applying the offset
Some integer fields in CSN.1 structures can be encoded with an offset.
A good example is GPRS Mobile Allocation IE defined in 3GPP TS 44.060,
section 12.10a, table 12.10a.1:

  < GPRS Mobile Allocation IE > ::=
    < HSN : bit (6) >
    { 0 | 1  < RFL number list : < RFL number list struct > > }
    {     0  < MA_LENGTH : bit (6) >
             < MA_BITMAP : bit (val(MA_LENGTH) + 1) >
        | 1  { 0 | 1  < ARFCN index list : < ARFCN index list struct > > }
    } ;

so in this case the variable-length MA_BITMAP is defined as follows:

  < MA_BITMAP : bit (val(MA_LENGTH) + 1) >

what basically means that its bit length shall be encoded with
a negative offset 1, therefore the following statements apply:

  MA_LENGTH=0 defines MA_BITMAP of bit length 1
  MA_LENGTH=1 defines MA_BITMAP of bit length 2
  ...
  MA_LENGTH=63 defines MA_BITMAP of bit length 64

== What's wrong? ==

For some reason, Wireshark shows the raw values without applying
the offset.  Here is an example of GPRS Mobile Allocation IE:

  GPRS_Mobile_Allocation
      .... .101  010. .... = HSN: 42
      ...0 .... = RFL_NUMBER Exist: 0
      .... 0... = Mobile Allocation:  (Union)
      u.MA
          .... .001  111. .... = Bit length: 15
          ...0 .... = Bitmap: 0 // 1st
          .... 1... = Bitmap: 1
          .... .0.. = Bitmap: 0
          .... ..1. = Bitmap: 1
          .... ...0 = Bitmap: 0
          1... .... = Bitmap: 1
          .0.. .... = Bitmap: 0
          ..1. .... = Bitmap: 1  // 8th
          ...0 .... = Bitmap: 0
          .... 1... = Bitmap: 1
          .... .0.. = Bitmap: 0
          .... ..1. = Bitmap: 1
          .... ...0 = Bitmap: 0
          1... .... = Bitmap: 1
          .0.. .... = Bitmap: 0
          ..1. .... = Bitmap: 1 // 16th

== Solution ==

Let's use proto_tree_add_uint_bits_format_value(), so we can print
the final value with the offset applied, as well as the original
one and the offset itself:

  GPRS_Mobile_Allocation
      .... .101  010. .... = HSN: 42
      ...0 .... = RFL_NUMBER Exist: 0
      .... 0... = Mobile Allocation:  (Union)
      u.MA
          .... .001  111. .... = Bit length: 16 (Raw 15 + Offset 1)

Change-Id: Ic4eaf2d8a3c2fedca855726e4175ddf47d16c5af
Reviewed-on: https://code.wireshark.org/review/37931
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-24 06:00:34 +00:00
Pau Espin f9fdf327ce CSN.1: Optimize update of remaining_bits_len dissecting CSN_UINT_ARRAY
No need to decrement it every loop. Furthermore, when more types are
supported, same line can be reused.

Change-Id: Ic61c2e839d8dcb0e035172d706978a18b16520df
Reviewed-on: https://code.wireshark.org/review/36592
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-27 16:38:34 +00:00
Pau Espin 543c55b2c0 CSN.1: verify enough bits present to decode whole CSN_UINT_ARRAY
Change-Id: I01620f6ec698ec681ec1b413a160c14ff517fc3f
Reviewed-on: https://code.wireshark.org/review/36591
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-27 16:04:16 +00:00
Pau Espin 64ffd4512b CSN.1: Properly verify CSN_BITMAP length
Change-Id: Ia1ee5dbd46d4ac88d62670d5a534b4cce8c09b4b
Reviewed-on: https://code.wireshark.org/review/36593
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-27 16:02:10 +00:00
Pau Espin 9d14dfb82f GSM RLC/MAC: Drop extra empty line
Change-Id: Ifcb2efb550e44cd7603a6cec28609c9179c3419e
Reviewed-on: https://code.wireshark.org/review/36590
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-03-26 21:46:40 +00:00
Vadim Yanitskiy 9f1b91a4a0 csn1: fix: do not return 0 if no more bits left in the buffer
The csnStreamDissector() shall not return 0 prematurely if no more
bits left in the input buffer. Otherwise some malformed packets
may not be displayed by Wireshark as such, confusing the user(s).

There are two possible cases:

  a) The number of remaining bits is negative - this is an error
     in any case. Return CSN_ERROR_NEED_MORE_BITS_TO_UNPACK.

  b) The number of remaining bits is zero - this might be an error
     or not depending on particular CSN.1 definition. We don't
     know in advance without entering the parsing loop.

In case a) everything is simple, while in case b) we should not
make precipitate decicions. Some CSN.1 definitions have names
like 'M_*_OR_NULL', what basically means that they're optional
and can be ignored or omitted.

Most of the case statements do check whether the number of remaining
bits is enough to unpack a value, so let's leave the final decicion
up to the current handler (pointed by pDescr) if no more bits left.

This is a port of the original patch [1] for OsmoPCU [2].

[1] https://gerrit.osmocom.org/c/osmo-pcu/+/17394
[2] https://osmocom.org/projects/osmopcu/

Change-Id: If35d62b1cb81e8b2909401684c3b801cb79f1294
Reviewed-on: https://code.wireshark.org/review/36588
Reviewed-by: Pau Espin Pedrol <pespin@sysmocom.de>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2020-03-26 21:43:48 +00:00
Pau Espin f6ef53e3ed csn1: Validate recursive array max size during decoding
This way if CSN1 encoded bitstream contains more elements than what the
defintion expects it will fail instead of overflowing the decoded
buffer.

Example: RA Capabilities struct (recursive array) sent by a real android phone
when attaching to the network. Then SGSN sends it back and osmo-pcu would crash
similar to this:
*** stack smashing detected ***: terminated
 Process terminating with default action of signal 6 (SIGABRT): dumping core
at 0x4C62CE5: raise (in /usr/lib/libc-2.31.so)
by 0x4C4C856: abort (in /usr/lib/libc-2.31.so)
by 0x4CA62AF: __libc_message (in /usr/lib/libc-2.31.so)
by 0x4D36069: __fortify_fail (in /usr/lib/libc-2.31.so)
by 0x4D36033: __stack_chk_fail (in /usr/lib/libc-2.31.so)
by 0x124706: testRAcap2(void*) (RLCMACTest.cpp:468)

Port from osmo-pcu.git efad80bfbffb2a35d2516e56dc40979f19c6c370
Related: https://osmocom.org/issues/4463

Change-Id: I6bdd6960141829491aebbfdaab548c41d4a3bc9f
Reviewed-on: https://code.wireshark.org/review/36572
Reviewed-by: Harald Welte <laforge@gnumonks.org>
Petri-Dish: Pascal Quantin <pascal@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2020-03-25 16:51:35 +00:00
Vadim Yanitskiy 2abba7ad62 csn1: fix csnStreamDissector(): catch unknown CSN_CHOICE values
Some CSN.1 definitions may contain so-called unions that usually
combine two or more choices. The exact element to be chosen is
determined by the value encoded in one or more bits preceeding
it. Here is an example of an identity union:

  {   0   < Global TFI : < Global TFI IE > >
    | 10  < TLLI / G-RNTI : bit (32) >
    | 110 < TQI : bit (16) > }

So if a given bitstream starts with '0'B, the Global TFI IE follows.
Otherwise either TLLI / G-RNTI or TQI is to be chosen. But what if
neither of the choice items matches? For example, what if a given
bitstream starts with '111'B?

Most likely we should treat the bitstream as malformed, stop further
decoding and report an error. And that's how Pycrate's [1] CSN.1
decoder [2] behaves. Hovewer, as it turns out, Wireshark would
simply skip the whole choice element and start decoding the next
one from the same bit position.

Here is an example of a malformed packet:

  GSM RLC/MAC: PACKET_POLLING_REQUEST (4) (Downlink)
    01.. .... = Payload Type (DL): RLC/MAC block contains an RLC/MAC control block
                                   that does not include the optional octets of
				   the RLC/MAC control header (1)
    ..00 .... = RRBP: Reserved Block: (N+13) mod 2715648 (0)
    .... 1... = S/P: RRBP field is valid
    .... .001 = USF: 1
    PACKET_POLLING_REQUEST (4) (downlink)
      0001 00.. = MESSAGE_TYPE (DL): PACKET_POLLING_REQUEST (4)
      .... ..11 = PAGE_MODE: Same as before (3)
 ---! ID  <--- This is wrong! '111'B is unknown
      1... .... = CONTROL_ACK_TYPE: PACKET CONTROL ACKNOWLEDGEMENT
                                    message format shall be an RLC/MAC control block
      Padding Bits
        .110 0000  0000 1000  0101 0000  1000 1000 = Padding: 1611157640
        0100 0000  0001 0011  1010 1000  0000 0100 = Padding: 1075030020
        1000 1011  0010 1011  0010 1011  0010 1011 = Padding: 2334862123
        0010 1011  0010 1011  0010 1011  0010 1011 = Padding: 724249387
        0010 1011  0010 1011  0010 1011  0010 1011 = Padding: 724249387
        0010 1011 = Padding: 43

Let's fix this, so after this patch we get:

  GSM RLC/MAC: PACKET_POLLING_REQUEST (4) (Downlink)
    01.. .... = Payload Type (DL): RLC/MAC block contains an RLC/MAC control block
                                   that does not include the optional octets of
                                   the RLC/MAC control header (1)
    ..00 .... = RRBP: Reserved Block: (N+13) mod 2715648 (0)
    .... 1... = S/P: RRBP field is valid
    .... .001 = USF: 1
    PACKET_POLLING_REQUEST (4) (downlink)
      0001 00.. = MESSAGE_TYPE (DL): PACKET_POLLING_REQUEST (4)
      .... ..11 = PAGE_MODE: Same as before (3)
      ID
        STREAM NOT SUPPORTED (PacketPollingID)
          [Expert Info (Warning/Protocol): STREAM NOT SUPPORTED (PacketPollingID)]
            [STREAM NOT SUPPORTED (PacketPollingID)]
            [Severity level: Warning]
            [Group: Protocol]

[1] https://github.com/P1sec/pycrate
[2] https://github.com/P1sec/pycrate/wiki/Using-the-pycrate-csn1-translator-and-runtime

Change-Id: I7096c294e0d04d6afb3414874d3404cbb637fdae
Reviewed-on: https://code.wireshark.org/review/36077
Reviewed-by: Pau Espin Pedrol <pespin@sysmocom.de>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-02-18 06:27:56 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Dario Lombardo 389a680cf7 csn1: set pointer before using it (found by clang).
Change-Id: I4ff2fb3861725a492736facd2d084baeef8fd09f
Reviewed-on: https://code.wireshark.org/review/25993
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-28 12:11:32 +00:00
Dario Lombardo 4c8c59ca7d csn1: fix indentation.
Change-Id: I7832cea4d1073df854852aa598c04bcab68bf94c
Reviewed-on: https://code.wireshark.org/review/25992
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-22 20:37:06 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Alexis La Goutte fd68c7dfc7 csn1: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7
Change-Id: I11b943736a4f0835e8432db95b7d471244b08a16
Reviewed-on: https://code.wireshark.org/review/20401
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-05 21:49:33 +00:00
Pascal Quantin 428ee66ae1 GSM RLC/MAC: add dissection of 2G->3G/4G PS handover
Change-Id: Ia24055d7d871b9fbf69a9225a2a273fced950a3c
Reviewed-on: https://code.wireshark.org/review/15700
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-02 21:06:37 +00:00
Vincent Helfre b079151c6f CSN1: fix dissection of variable bitmaps
Change-Id: I3dbb2a4f8f7ea125e4f96e302ea33ff03706eb1b
Reviewed-on: https://code.wireshark.org/review/15674
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-06-01 11:46:42 +00:00
Pascal Quantin afce5c1afb GSM RLC/MAC: fix dissection of variable length bitmaps
Bug: 11534
Change-Id: I857134f21ab6a8a135eba6e784807f3f3734bf6c
Reviewed-on: https://code.wireshark.org/review/10607
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-09-23 04:40:21 +00:00
Michael Mann 8626bb4cbb Make CSN.1 dissectors more filterable.
The intent here is to remove proto_tree_add_text from packet-csn1.c, but the macros setup means A LOT more hf fields needs to be created.

Many of those new hf fields were created with a perl script

Bug: 11504
Change-Id: If12c7677185f18a7f684fd3746397be92b56b36d
Reviewed-on: https://code.wireshark.org/review/10391
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-20 18:08:01 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Bill Meier ff5a77256c Add editor modelines and adjust indentation as needed.
Change-Id: Id57d264299f2026d703c5b08bace4b24b32f184c
Reviewed-on: https://code.wireshark.org/review/4371
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-29 18:21:50 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +00:00
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Jakub Zawadzki 1899903f69 Include <epan/to_str.h> only when needed.
svn path=/trunk/; revision=53189
2013-11-09 13:41:10 +00:00
Anders Broman 2e52e2ac99 [-Wmissing-prototypes]
Use explicit casts.

svn path=/trunk/; revision=48347
2013-03-17 09:11:21 +00:00
Pascal Quantin 8b5aa91371 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8037 :
Fix an infinite loop in CSN.1 dissector when having more than 255 padding bits

svn path=/trunk/; revision=46335
2012-12-02 21:37:34 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Anders Broman 6aca10831f From Mike Morrin:
Fix pedantic compiler warnings in csn.1 dissectors.

There is some tricky casting going on in csn.1 structures.  To eliminate all
the warnings, the function pointers needed to be moved out of the object
pointer unions.  Fortunately macros (mostly) hide these changes from the
protocol dissector tables.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7686

svn path=/trunk/; revision=44899
2012-09-14 14:05:50 +00:00
Anders Broman cc6d4341e6 From Mike Morrin:
Interface based on header type rather than MCS.

passes in the header type for EGPRS packets. 
This makes sense because in a real protocol stack, the header type is encoded
in the burst stealing bits, allowing the header can be decoded, giving the CPS
IE, which then allows the data blocks to be decoded, so wireshark now follows
the same practice.

I found that there was a (previously overlooked) alignment error in decoding
the last octet of some headers due to the last "octet" having less than 8 bits,
and both the protocol stacks I have here assume that the left-hand bits are
missing (as per the figures in 44.060).  I corrected this by making a small
extension to the NULL encoding in packet-csn.[ch] to allow a NULL field to
consume more than 0 bits.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7615

svn path=/trunk/; revision=44805
2012-09-07 07:43:13 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 17da162356 Try to fix a couple of warnings.
svn path=/trunk/; revision=43259
2012-06-14 15:50:24 +00:00
Anders Broman 131334481d Get rid of a couple of warnings.
svn path=/trunk/; revision=43063
2012-06-04 11:44:52 +00:00
Bill Meier 1ec161eab8 Minor cleanup: whitespace, indentation, long-lines, style, typos, etc;
Also: remove unneeded #include <stdlib.h> in 2 cases.

svn path=/trunk/; revision=42226
2012-04-24 18:27:06 +00:00
Anders Broman b28516dc00 From Mike Morrin: A small patch to correct the name of the function proto_tree_add_split_bits_item_ret_val()
svn path=/trunk/; revision=41255
2012-03-01 07:01:15 +00:00
Anders Broman 872c2094c4 From Mike Morrin:
The attached patches add the uses
proto_tree_add_split_bits_ret_val()
proto_tree_add_split_bits_crumb()

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6885

svn path=/trunk/; revision=41249
2012-02-29 20:38:39 +00:00
Anders Broman dea5452b95 From Lei Chen:
a patch to support decode FDD_CELL_INFORMATION of "UTRAN FDD Description" in packet-gsm_rlcmac.c

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6856

svn path=/trunk/; revision=41149
2012-02-23 08:57:40 +00:00
Anders Broman 2f024256bf From Sylvain Munaut:
0001-packet-csn1-Fix-indenting-of-the-CSN_UINT-subsection.patch
0002-packet-csn1-Add-new-maro-M_TYPE_LABEL-to-customize-n.patch
0003-packet-csn1-New-macro-M_FIXED_LABEL-to-customize-str.patch
0004-packet-csn1-Allow-CHOICE-elements-to-re-process-the-.patch
0005-packet-csn1-Make-new-M_CHOICE_IL-option-that-doesn-t.patch
0006-packet-csn-Extend-CSN_SERIALIZE-to-allow-0-bit-of-le.patch

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6789

svn path=/trunk/; revision=40847
2012-02-05 08:14:09 +00:00
Jeff Morriss 1c81971d42 From Mike Morrin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6754 :
Due to the variable remaining_bits_len getting out of sync with bit_offset (in
one case due to a mistake in the patch for bug 6375, and in another case
pre-existing).

I have shuffled the decrements of remaining_bits_len so that they always occur
next to an increment of bit_offset, so that this type of problem is easier to
spot.

From me: convert tabs to spaces to match the rest of the file.

svn path=/trunk/; revision=40662
2012-01-23 18:54:02 +00:00
Anders Broman fd9f182f4b Try to fix
packet-csn1.c:179: warning: 'pui8' may be used uninitialized in this function

svn path=/trunk/; revision=40635
2012-01-21 21:45:33 +00:00
Anders Broman e8407dd6c1 Add the missing file from
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=40627

Patch was whining about csn1.h fixing that i must have missed that csn1.c did not get patched.

svn path=/trunk/; revision=40634
2012-01-21 20:26:46 +00:00
Anders Broman 7237eb3c49 From Mike Morrin:
Wrong tvb_get_bits function call in packet-csn1.c.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6708

svn path=/trunk/; revision=40384
2012-01-05 07:17:38 +00:00
Bill Meier 54b72021bb Fix encoding arg for various fcn calls:
- proto_tree_add_bits_item
 - proto_tree_add_bits_ret_val
 - proto_tree_add_bitmask
 - tvb_get_bits
 - tvb_get_bits16
 - tvb_get_bits24
 - tvb_get_bits32
 - tvb_get_bits64


svn path=/trunk/; revision=39539
2011-10-24 19:57:53 +00:00
Bill Meier 0a1ab095ac From Sylvain Munaut: Fix Bug #6351 (Buildbot fuzztest crash);
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6351


svn path=/trunk/; revision=39140
2011-09-25 22:01:50 +00:00
Stig Bjørlykke 2e49699bb6 From Sylvain Munaut via bug 6328:
Fix bug in CSN_CHOICE implentation preventing subtree processing

svn path=/trunk/; revision=38951
2011-09-09 17:29:20 +00:00
Anders Broman a0b2954bc7 From Lei Chen:
fix the wrong display of CSN_BIT under CSN_UNION.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6287

svn path=/trunk/; revision=38807
2011-08-30 18:34:19 +00:00
Anders Broman e0645e724c CSN_LEFT_ALIGNED_VAR_BMP didn't handle more than 8 bits.
(CSN Ack/Nack Description wrongly handled in gsm_rlcmac_dl dissector )
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6101

svn path=/trunk/; revision=38745
2011-08-26 15:25:14 +00:00