Wireshark-bugs: [Wireshark-bugs] [Bug 4999] New: Lua userdata
Date: Mon, 12 Jul 2010 16:34:51 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4999

           Summary: Lua userdata
           Product: Wireshark
           Version: 1.2.5
          Platform: x86
        OS/Version: Windows 7
            Status: NEW
          Severity: Blocker
          Priority: Low
         Component: Documentation
        AssignedTo: wireshark-bugs@xxxxxxxxxxxxx
        ReportedBy: robin_de_schepper@xxxxxxxxxxx


Build Information:
Compiled with GTK+ 2.16.2, with GLib 2.20.3, with WinPcap (version unknown),
with libz 1.2.3, without POSIX capabilities, with libpcre 7.0, with SMI 0.4.8,
with c-ares 1.6.0, with Lua 5.1, with GnuTLS 2.8.1, with Gcrypt 1.4.4, with MIT
Kerberos, with GeoIP, with PortAudio V19-devel (built Dec 17 2009), with
AirPcap.

Running on 32-bit Windows 7, build 7600, with WinPcap version 4.1.1 (packet.dll
version 4.1.0.1753), based on libpcap version 1.0 branch 1_0_rel0b (20091008),
GnuTLS 2.8.1, Gcrypt 1.4.4, without AirPcap.

Built using Microsoft Visual C++ 9.0 build 30729
--
In LUA I am making a dissector, I have a TvbRange 'buf', when I call buf:int()
I can't concatenate it ("string"..buf:int().."string") it claims that this
function returns userdata while it should return an integer, when I use the
function uint it properly returns an unsigned integer, but I need a signed
integer ;)

And just in general as a help to all who programs in Lua with Wireshark: More
documentation, for example on your API reference there is no full list of
columns for the pinfo.cols; or nowhere a function to get the text of a label in
a tree item, this means there is none (?) or it's skipped in the documentation?
Also pretty important: you return _userdata_ ... This is very annoying when you
don't have the proper documentation since there is no way to retrieve what
values there are in the userdata, couldn't you just push arrays to the Lua
environment and use metatables? Lua itself has very poor or even no
documentation on how to properly use userdata.

Many thanks and I hope to see those bottlenecks stretched very soon ;)

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