User Guide

Lua Support in Wireshark
189
11.11. Adding information to the dissection
tree
11.11.1. TreeItem
TreeItems represent information in the packet-details pane. A root TreeItem is passed to dissectors as first
argument.
11.11.1.1. treeitem:add()
Adds an child item to a given item, returning the child. tree_item:add([proto_field | proto], [tvbrange],
[label], ...) if the proto_field represents a numeric value (int, uint or float) is to be treated as a Big Endian
(network order) Value.
11.11.1.1.1. Returns
The child item
11.11.1.2. treeitem:add_le()
Adds (and returns) an child item to a given item, returning the child. tree_item:add([proto_field | proto],
[tvbrange], [label], ...) if the proto_field represents a numeric value (int, uint or float) is to be treated as
a Little Endian Value.
11.11.1.2.1. Returns
The child item
11.11.1.3. treeitem:set_text(text)
Sets the text of the label
11.11.1.3.1. Arguments
text The text to be used.
11.11.1.4. treeitem:append_text(text)
Appends text to the label
11.11.1.4.1. Arguments
text The text to be appended.
11.11.1.5. treeitem:set_expert_flags([group], [severity])
Sets the expert flags of the item.
11.11.1.5.1. Arguments
group (optional) One of PI_CHECKSUM, PI_SEQUENCE, PI_RESPONSE_CODE,
PI_REQUEST_CODE, PI_UNDECODED, PI_REASSEMBLE,
PI_MALFORMED or PI_DEBUG