This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

TvbRange:uint() does not handle %d byte integers

0

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's gravatar image

qife
6224
accept rate: 0%


One Answer:

0

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's gravatar image

izopizo
2024714
accept rate: 0%

Thank you! I have read the docs,but I can't understand the function uint().Could you give me an example.

(27 Apr '15, 17:55) qife