Creates a ByteArray Object
- hexbytes (optional)
-
A string consisting of hexadecimal bytes like "00 B1 A2" or "1a2b3c4d"
Concatenate two ByteArrays
Prepend a ByteArray to this ByteArray
Append a ByteArray to this ByteArray
Sets the size of a ByteArray, either truncating it or filling it with zeros.
Sets the value of an index of a ByteArray.
Get the value of a byte in a ByteArray
Obtain the length of a ByteArray
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
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 them are unusable once the function has returned. To create a tvbrange the tvb must be called with offset and length as optional arguments ( the offset defaults to 0 and the length to tvb:len() )
Creates a new Tvb from a bytearray (it gets added to the current frame too)
Creates a (sub)Tvb from using a TvbRange
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.
Obtain the reported length of a TVB
Obtain the reported length of packet data to end of a TVB or -1 if the offset is beyond the end of the TVB
Returns the raw offset (from the beginning of the source Tvb) of a sub Tvb.
A TvbRange represents a 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.
Creates a tvbr from this Tvb. This is used also as the Tvb:__call() metamethod.
- offset (optional)
-
The offset (in octets) from the beginning of the Tvb. Defaults to 0.
- length (optional)
-
The length (in octets) of the range. Defaults to until the end of the Tvb.
Get a Big Endian (network order) unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long.
Get a Little Endian unsigned integer from a TvbRange. The range must be 1, 2, 3 or 4 octets long.
Get a Big Endian (network order) unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long.
Get a Little Endian unsigned 64 bit integer from a TvbRange. The range must be 1-8 octets long.
Get a Big Endian (network order) signed integer from a TvbRange. The range must be 1, 2 or 4 octets long.
Get a Little Endian signed integer from a TvbRange. The range must be 1, 2 or 4 octets long.
Get a Big Endian (network order) signed 64 bit integer from a TvbRange. The range must be 1-8 octets long.
Get a Little Endian signed 64 bit integer from a TvbRange. The range must be 1-8 octets long.
Get a Big Endian (network order) floating point number from a TvbRange. The range must be 4 or 8 octets long.
Get a Little Endian floating point number from a TvbRange. The range must be 4 or 8 octets long.
Get an IPv4 Address from a TvbRange.
Get an Little Endian IPv4 Address from a TvbRange.
Get an Ethernet Address from a TvbRange.
Obtain a nstime from a TvbRange
Obtain a nstime from a TvbRange
Obtain a Big Endian (network order) UTF-16 encoded string from a TvbRange
Obtain a Little Endian UTF-16 encoded string from a TvbRange
Obtain a zero terminated string from a TvbRange
Obtain a Big Endian (network order) UTF-16 encoded zero terminated string from a TvbRange
Obtain a Little Endian UTF-16 encoded zero terminated string from a TvbRange
Get a bitfield from a TvbRange.
- position (optional)
-
The bit offset from the beginning of the TvbRange. Defaults to 0.
- length (optional)
-
The length (in bits) of the field. Defaults to 1.
Creates a sub-TvbRange from this TvbRange. This is used also as the TvbRange:__call() metamethod.
- offset (optional)
-
The offset (in octets) from the beginning of the TvbRange. Defaults to 0.
- length (optional)
-
The length (in octets) of the range. Defaults to until the end of the TvbRange.
- name
-
The name to be given to the new data-source.