Wireshark mailing list archives
Lua converting a UINT64 to hex
From: "Zadik, Maayan" <mzadik () qti qualcomm com>
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 ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Lua converting a UINT64 to hex Zadik, Maayan (Nov 19)
- Re: Lua converting a UINT64 to hex Tony Trinh (Nov 19)
- Re: Lua converting a UINT64 to hex Tony Trinh (Nov 19)
- Re: Lua converting a UINT64 to hex Tony Trinh (Nov 19)
- Re: Lua converting a UINT64 to hex Tony Trinh (Nov 19)
- Re: Lua converting a UINT64 to hex Stig Bjørlykke (Nov 20)
- Re: Lua converting a UINT64 to hex Tony Trinh (Nov 19)