On Mon, Nov 19, 2012 at 7:46 PM, Tony Trinh <[email protected]> wrote:

> On Mon, Nov 19, 2012 at 7:42 PM, Tony Trinh <[email protected]> wrote:
>
>> In your code, the variable "data" is actually a list of instances of the
>> field in the packet (each represented by a FieldInfo object). To get the
>> values, you'll need to iterate the list:
>>
>> for _,fieldinfo in pairs( data ) do
>>     print( fieldinfo.label, fieldinfo.value )
>> end
>>
>>
> Woops, forgot to wrap data. Try this:
>
> for _,fieldinfo in pairs({ data }) do
>     print( fieldinfo.label, fieldinfo.value )
> end
>
>
And to get the value in hex, you have to convert the UInt64 object to a
string, and pass the result to tonumber().


    print(string.format("%X", tonumber( tostring(fieldinfo.value) ) ))
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <[email protected]>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:[email protected]?subject=unsubscribe

Reply via email to