Ask Your Question

Rex555's profile - activity

2023-04-17 21:45:46 +0000 commented answer Having issues with hex data and endianness

Gotcha, I did not see that icon (I did look for it) the only thing I was able to do was close as answered, will do bette

2023-04-17 13:33:07 +0000 marked best answer 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

2023-04-16 22:53:33 +0000 commented question Having issues with hex data and endianness

THANK YOU!! I had been trying various incantations but the :le_int64() was the missing piece!

2023-04-16 20:29:10 +0000 asked a question Having issues with hex data and endianness

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 s