User Guide
Lua Support in Wireshark
185
11.10.1.2.1. Arguments
tvb The buffer to dissect
pinfo The packet info
tree The tree on which to add the protocol items
11.10.2. DissectorTable
A table of subdissectors of a particular protocol (e.g. TCP subdissectors like http, smtp, sip are added to
table "tcp.port"). Useful to add more dissectors to a table so that they appear in the Decode As... dialog.
11.10.2.1. DissectorTable.new(tablename, [uiname], [type], [base])
Creates a new DissectorTable for your dissector's use.
11.10.2.1.1. Arguments
tablename The short name of the table.
uiname (optional) The name of the table in the User Interface (defaults to the name given).
type (optional) Either ftypes.UINT{8,16,24,32} or ftypes.STRING (defaults to
ftypes.UINT32)
base (optional) Either base.NONE, base.DEC, base.HEX, base.OCT, base.DEC_HEX or
base.HEX_DEC (defaults to base.DEC)
11.10.2.1.2. Returns
The newly created DissectorTable
11.10.2.2. DissectorTable.get(tablename)
Obtain a reference to an existing dissector table.
11.10.2.2.1. Arguments
tablename The short name of the table.
11.10.2.2.2. Returns
The DissectorTable
11.10.2.3. dissectortable:add(pattern, dissector)
Add a dissector to a table.
11.10.2.3.1. Arguments
pattern The pattern to match (either an integer or a string depending on the table's type).
dissector The dissector to add (either an Proto or a Dissector).