User Guide

Lua Support in Wireshark
180
11.10.5. Proto
A new protocol in wireshark. Protocols have more uses, the main one is to dissect a protocol. But they can
be just dummies used to register preferences for other purposes.
11.10.5.1. Proto.new(name, desc)
11.10.5.1.1. Arguments
name The name of the protocol
desc A Long Text description of the protocol (usually lowercase)
11.10.5.1.2. Returns
The newly created protocol
11.10.5.2. proto.dissector
The protocol's dissector, a function you define
11.10.5.3. proto.fields
The Fields Table of this dissector
11.10.5.4. proto.prefs
The preferences of this dissector
11.10.5.5. proto.init
The init routine of this dissector, a function you define
11.10.5.6. proto.name
The name given to this dissector
11.10.6. ProtoField
A Protocol field (to be used when adding items to the dissection tree)
11.10.6.1. ProtoField.new(name, abbr, type, [voidstring], [base],
[mask], [descr])
Creates a new field to be used in a protocol.
11.10.6.1.1. Arguments
name Actual name of the field (the string that appears in the tree).
abbr Filter name of the field (the string that is used in filters).