ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-users: Re: [ethereal-users] Alternative HTTP port

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

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Tue, 9 May 2000 10:15:30 -0700
On Tue, May 09, 2000 at 06:51:12PM +0200, Gabriel, Akos /ECF wrote:
> My question: if I have a HTTP server on an alternative port (let's say 5000)
> how could I tell Ethereal to acknowledge the packets as HTTP (as with port
> 80) ?

Unfortunately, the only way to do that at present is to add to the
"proto_reg_handoff_http()" routine in "packet-http.c" the line

	dissector_add("tcp.port", 5000, dissect_http);

We may, at some point, want to provide a way in which one can, from the
user interface, force dissectors to be added to tables.  One
possibility, which I've mentioned in the past, would involve:

	1) adding a mechanism by which dissectors can register settable
	   options with the core of Ethereal, specifying a name, a
	   description, and a type;

	2) having such options settable from:

		the command line, with, say, a "-o" flag, e.g.
		"-o http.ports=5000";

		the GUI, e.g. with all protocols that have registered
		options getting a tab in a "protocol properties"
		notebook, and with "http.ports" (which I'd make a
		string, so that it could contain a comma-separated list
		of ports) being displayed as

			Additional HTTP ports [ <text entry widget> ]

		perhaps also the preferences file, with a line such as

			http.ports: 5000

This could also subsume the "-D" flag and the "Decode IPv4 TOS field as
DiffServ field" item in the "Display Options" dialog box - it might
become a Boolean option "ip.diffserv".

The preferences file would then have to be read *after* all dissectors'
registration routine was called, so that it knew about all the settable
options, and we'd also have to call the registration routines before
even parsing the command-line options, unless we save all "-o" options
and process them after registering the dissectors; whenever an option is
set (either when the preferences file is read, the command line is
parsed, or whatever dialog box lets them be edited has the "OK" or
"Apply" button clicked), a routine associated with the option would be
called, and passed the new value for the option.  In the case of, say,
"http:ports", the HTTP dissector would un-register the ports it'd
previously registered, and register the new ones.