ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-bugs: [Wireshark-bugs] [Bug 4948] New: Lua Script code does not function as expected

Date: Mon, 28 Jun 2010 10:09:34 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4948

           Summary: Lua Script code does not function as expected
           Product: Wireshark
           Version: 1.2.9
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Low
         Component: Wireshark
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: dlynes@xxxxxxxxxxxxxxxxxxxxxxxxxxxx


Build Information:
Version 1.2.9

Copyright 1998-2010 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 with GTK+ 2.16.1, (32-bit) with GLib 2.20.1, with libpcap 1.0.0, with
libz 1.2.3.3, without POSIX capabilities, with libpcre 7.8, with SMI 0.4.7,
with
c-ares 1.5.2, with Lua 5.1, with GnuTLS 2.4.2, with Gcrypt 1.4.1, with MIT
Kerberos, with GeoIP, without PortAudio, without AirPcap.

Running on Linux 2.6.28-18-generic, with libpcap version 1.0.0, GnuTLS 2.4.2,
Gcrypt 1.4.1.

Built using gcc 4.3.3.

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

Check the man page and http://www.wireshark.org for more information.
--
Given the following line to define the field:
fields.meta_flags = ProtoField.uint64("LUX.meta_flags", "Flags", base.HEX)

And given the following line to print it out to the protocol decode section:
subtree:add(fields.meta_flags, buffer(64,8))

If I want to assign the same value to a local variable, I have to do this:
local flags=tonumber(tostring(buffer(64,8):uint64()))

Instead of simply this:
local flags=buffer(64,8):uint64()

The above line actually results (unexpectedly) in a userdata object, but should
result (I would think) in a 64-bit unsigned integer.

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