Wireshark-bugs: [Wireshark-bugs] [Bug 2243] LUA: TvbRange __index metamethod not working
Date Prev · Date Next · Thread Prev · Thread Next
Date: Fri, 31 Oct 2008 11:20:14 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2243


Balint Reczey <balint.reczey@xxxxxxxxxxxx> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |balint.reczey@xxxxxxxxxxxx
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #1 from Balint Reczey <balint.reczey@xxxxxxxxxxxx>  2008-10-31 11:20:09 PDT ---
Changed Lua interface to provide TvbRange:{offset|len}() instead of
TvbRange.{offset|len}.
Write access to offset and len from Lua is gone, too.

You can test the new interface using the following code snippet:

do
        local tap = Listener.new();
        function tap.packet(pinfo, tvb)
                print(tvb():offset())
                print(tvb():len())
                print(tvb():tvb())
                print(tvb())
        end
end

Committed revision 26657.

(In reply to comment #0)
> Created an attachment (id=1436)
 --> (https://bugs.wireshark.org/bugzilla/attachment.cgi?id=1436) [details]
> Test for TvbRange metamethods
> 
> Build Information:
> wireshark 0.99.7
> 
> Copyright 1998-2007 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.10.13, with GLib 2.12.9, with libpcap 0.9.4, with libz
> 1.2.3, without libpcre, without SMI, without ADNS, with Lua 5.1, with GnuTLS
> 1.4.1, with Gcrypt 1.2.3, with MIT Kerberos, without PortAudio, without
> AirPcap.
> NOTE: this build doesn't support the "matches" operator for Wireshark filter
> syntax.
> 
> Running on Linux 2.6.22.14-72.fc6, with libpcap version 0.9.4.
> 
> Built using gcc 4.1.2 20070626 (Red Hat 4.1.2-13).
> 
> --
> For some reason, TvbRange.offset TvbRange.len and TvbRange.tvb doesn't seem to
> work. See the attached program.
> 


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