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

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%


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.

permanent link

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
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×637
×431
×1

question asked: 27 Apr '15, 03:20

question was seen: 3,530 times

last updated: 27 Apr '15, 17:55

p​o​w​e​r​e​d by O​S​Q​A