Wireshark-bugs: [Wireshark-bugs] [Bug 5700] New: IEEE 802.15.4 Superframe Specification - Final

Date: Thu, 17 Feb 2011 02:13:56 -0800 (PST)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5700

           Summary: IEEE 802.15.4 Superframe Specification - Final CAP
                    Slot always 0
           Product: Wireshark
           Version: 1.4.3
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Trivial
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: ivan.lawrow@xxxxxxx


Build Information:
Version 1.4.3 (SVN Rev 35482 from /trunk-1.4)

Copyright 1998-2011 Gerald Combs <gerald@xxxxxxxxxxxxx> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (32-bit) with GTK+ 2.16.6, with GLib 2.22.4, with WinPcap (version
unknown), with libz 1.2.3, without POSIX capabilities, without libpcre, with
SMI
0.4.8, with c-ares 1.7.1, with Lua 5.1, without Python, with GnuTLS 2.8.5, with
Gcrypt 1.4.5, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built
Jan
11 2011), with AirPcap.

Running on Windows XP Service Pack 3, build 2600, with WinPcap version 4.1.2
(packet.dll version 4.1.0.2001), based on libpcap version 1.0 branch 1_0_rel0b
(20091008), GnuTLS 2.8.5, Gcrypt 1.4.5, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 30729

Wireshark is Open Source Software released under the GNU General Public
License.

Check the man page and http://www.wireshark.org for more information.
--
The Final CAP Slot field "wpan.cap" in the Superframe Specification for a
beacon is always displayed as zero.

The offending line of code is in epan/dissectors/packet-ieee802154.c line 
1317:

proto_tree_add_uint(field_tree, hf_ieee802154_cap, tvb, *offset, 2, (superframe
& IEEE802154_SUPERFRAME_CAP_MASK) >> IEEE802154_SUPERFRAME_CAP_SHIFT);

Only the mask IEEE802154_SUPERFRAME_CAP_MASK is required for correct display of
the field - the right shift by IEEE802154_SUPERFRAME_CAP_SHIFT is the cause. 

The correct line of code should be:

proto_tree_add_uint(field_tree, hf_ieee802154_cap, tvb, *offset, 2, superframe
& IEEE802154_SUPERFRAME_CAP_MASK);

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.