Ethereal-dev: [ethereal-dev] What about one dissector for multiple ports

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

From: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Sun, 20 Aug 2000 11:09:21 +0900
Hi,

It just struck me that we cannot easily re-use a dissector in the case
where the same protocol is being carried on multiple ports.

For example, SWAT traffic is simply HTTP on port 901.

1. How do we declare that port 901 is HTTP, and should be dissected with
dissect_http?  This could be solved if we have some mechanism involving
preferences where we can bind http to multiple ports. The dissector simply
retrieves a list of ports and adds itself for each.

2. How do we have dissect_http display it in the packet list as SWAT? Since
dissect_http has been hard-coded to refer to its protocol as HTTP, we seem
to be in a bind.

Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Contributing author, SAMS Teach Yourself Samba in 24 Hours
Author, Special Edition, Using Samba