tvbrange:raw() returns more bytes then expected
I have this lua dissector using:
s = buffer(1, len):raw()
But the result is that s contains all data in buffer, i.e. looks like to ignore the len parameter.
When I modify this to:
s = buffer(1, len):tvb():raw() it works.
Can this be explained or am I doing something wrong?
What is buffer, how is it created?
buffer is the first parameter for the dissector (company coding standard):
-- Create a function to dissect it function myprotocol.dissector(buffer, pinfo, tree )