Having issues with hex data and endianness
I am taking hex bytes out of a buffer and trying to display them (it's a ID string in hex). I can get the data using
USID = ProtoField.string("myproto.USID", "usidVersion")
function myproto_protocol.dissector(buffer, pinfo, tree)
local subtree = tree:add(myproto_protocol, buffer(), "myproto Protocol Data")
local headerSubtree = subtree:add(myproto_protocol, buffer(), "Header")
headerSubtree:add_le(myproto_protocol.fields["USID"], buffer:bytes(2,8):tohex())
However the displayed info is still not in little endian. I have tried using a bytes ProtoField as well with less success displaying the data. I am sure I am missing something simple but I have not messed with hex fields and Little Endian much
What do you mean by an "ID string"?
Is it a character string?
Is it a fixed-length number, from 2 to 8 bytes, to display in hex?
Or is it a variable-length array of bytes?