User Guide

Lua Support in Wireshark
192
11.12.1.6.1. Arguments
index The position of the byte to be set
value The char value to set [0-255]
11.12.1.7. bytearray:get_index(index)
Get the value of a byte in a ByteArray
11.12.1.7.1. Arguments
index The position of the byte to get
11.12.1.7.2. Returns
The value [0-255] of the byte.
11.12.1.8. bytearray:len()
Obtain the length of a ByteArray
11.12.1.8.1. Returns
The length of the ByteArray.
11.12.1.9. bytearray:subset(offset, length)
Obtain a segment of a ByteArray
11.12.1.9.1. Arguments
offset The position of the first byte
length The length of the segment
11.12.1.9.2. Returns
A ByteArray contaning the requested segment.
A string contaning a representaion of the ByteArray.
11.12.2. Int
Int64 represents a 64 bit integer. Lua uses one single number representation which can be chosen at compile
time and since it is often set to IEEE 754 double precision floating point, we cannot store a 64 bit integer
with full precision. For details, see: http://lua-users.org/wiki/FloatingPoint
11.12.3. Tvb
A Tvb represents the packet's buffer. It is passed as an argument to listeners and dissectors, and can be
used to extract information (via TvbRange) from the packet's data. Beware that Tvbs are usable only by the
current listener or dissector call and are destroyed as soon as the listener/dissector returns, so references to