User Guide
Lua Support in Wireshark
203
11.12.3.3. tvb:__tostring()
Convert the bytes of a Tvb into a string, to be used for debugging purposes as '...' will be appended in
case the string is too long.
11.12.3.3.1. Returns
The string.
11.12.3.4. tvb:reported_len()
Obtain the reported length of a TVB
11.12.3.4.1. Returns
The length of the Tvb.
11.12.3.5. tvb:len()
Obtain the length of a TVB
11.12.3.5.1. Returns
The length of the Tvb.
11.12.3.6. tvb:reported_length_remaining()
Obtain the reported length of packet data to end of a TVB or -1 if the offset is beyond the end of the TVB
11.12.3.6.1. Returns
The length of the Tvb.
11.12.3.7. tvb:offset()
Returns the raw offset (from the beginning of the source Tvb) of a sub Tvb.
11.12.3.7.1. Returns
The raw offset of the Tvb.
11.12.3.8. tvb:__call()
Equivalent to tvb:range(...)
11.12.3.9. wslua:__concat()
Concatenate two objects to a string
11.12.4. TvbRange
A TvbRange represents an usable range of a Tvb and is used to extract data from the Tvb that generated it
TvbRanges are created by calling a tvb (e.g. tvb(offset,length)). If the TvbRange span is outside the Tvb's
range the creation will cause a runtime error.