I am writing a wireshark dissector in lua,set "buf={} buf=buffer(0,size):uint()",and run wireshark,error occurred:"TvbRange:uint() does not handle %d byte integers". asked 27 Apr '15, 03:20 qife |
One Answer:
Have a look at Pascal's answer here http://ask.wireshark.org/questions/41614/converting-userdata-to-number Specifically reference to lua uint() function 11.8.3.3. tvbrange:uint() Get a Big Endian (network order) unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long. Returns The unsigned integer value. answered 27 Apr '15, 03:49 izopizo |
Thank you! I have read the docs,but I can't understand the function uint().Could you give me an example.