Wireshark-dev: Re: [Wireshark-dev] Save extracted data from reassembled packets
From: Peter Smith <psmith135@xxxxxxxxx>
Date: Mon, 22 Feb 2010 17:34:41 +0200
If I use print(type(wsp_pdu)) it show me userdata type which is not in the switch statement in epan/wslua/wsula_field.c. The problem is that I can't find any function that could convert this userdata type to any other usable type to work with... 

On the other hand using print("USERDATA LENGTH: " .. wsp_pdu.len) works fine and gives me apparently the correct length of the field data reassembled from multiple packets. Here is the output:
USERDATA LENGTH: 8706
USERDATA LENGTH: 36097
USERDATA LENGTH: 32302
... skipped ...


On Mon, Feb 22, 2010 at 5:20 PM, Beth <beth.tridium@xxxxxxxxx> wrote:
Is the field a boolean?  Lua support for boolean fields was fixed for 1.3.x in bug 4049.  It just got added to the 1.2 trunk and should be available in release 1.2.7.

If it's not a boolean, make sure its type is in the switch statement in epan/wslua/wsula_field.c (and the similar one in wslua_tree.c).  That's where the error message is generated.



On Mon, Feb 22, 2010 at 9:38 AM, Peter Smith <psmith135@xxxxxxxxx> wrote:
I also tried to use a similar code as in previously mentioned presentation:

===================================
wsp_extractor = Field.new("wsp")
tap = Listener.new(nil,"wsp")
function tap.packet(pinfo,tvb,userdata)
local wsp_pdu =  wsp_extractor()
if wsp_pdu then
print(wsp_pdu.value)
end
end
===================================

In this case I get another error:
[string "wsp.lua"]:6: FT_ not yet supported

So I am stuck for now...



___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe