Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: [Wireshark-dev] Lua converting a UINT64 to hex

From: "Zadik, Maayan" <mzadik@xxxxxxxxxxxxxxxx>
Date: Mon, 19 Nov 2012 16:07:49 +0000
Hi all,
I'm trying to create a validation script on my protocol dissector.
My dissector is written in C and the validation script is obviously in Lua.

I have this field that is 64bits long. I'm trying to read it in my Lua script
local data_f  	= Field.new("my_protocol.data")

I'm trying ti convert it to a hex string 
local data = data_f()
...
Local s = string.format("%X", data.value)

and get the following error:
bad argument #2 to 'format' (number expected, got userdata)

is there no way to retrieve the value of a UINT64 field in Lua?
Maybe breaking it to 2 UINT32 or something?

Thanks so much,
Maayan