Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Define dissector port

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sun, 14 Jan 2007 02:12:51 -0800
sharon lin wrote:

I would like that user of my dissector will define the port on which the protocol works on from the regular expression field for example myProtocol.port == 1000

I don't see any regular expression there.

The way dissectors that let the user define the port the protocol works on is by adding a protocol preference with the port number. See, for example, epan/dissectors/packet-actrace.c.

You could specify that from the command line with "-o myProtocol.port:1000", or from the GUI in Edit -> Preferences.