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

Ethereal-dev: Re: [Ethereal-dev] Dynamic Dissector Port Assignment

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sat, 19 Jul 2003 17:41:01 -0700
On Sat, Jul 19, 2003 at 03:42:37PM -0700, 1 wrote:
> I'm going to be writing a dissector for a custom protocol
> that starts off by having a client connect to a server at a 
> well known port.  The first response from the server 
> specifies two dynamically obtained ports.  Both the client 
> and server close the initial connection and then the client
> reconnects on the dynamically obtained ports.

The way this is generally handled in Ethereal is to set up a
conversation, using the addresses and server port that will be used by
the subsequent connection, and associate the appropriate dissector with
it.  (If necessary, the client address can be omitted if it's not known
what address the client would use.)

See, for example, the RTSP dissector.