Zadik, Maayan
2012-11-19 16:07:49 UTC
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
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/***@public.gmane.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request-IZ8446WsY0/***@public.gmane.org?subject=unsubscribe
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
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev-IZ8446WsY0/***@public.gmane.org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request-IZ8446WsY0/***@public.gmane.org?subject=unsubscribe