Ethereal-users: Re: [Ethereal-users] Add protocol description

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, 24 Apr 2001 01:07:12 -0700
On Tue, Apr 24, 2001 at 08:03:22AM +0200, tokdgi@xxxxxx wrote:
> How can add a new protocol description on actual configuration ? ... 
> I need analize a custom data flow on port 5050 ! .

TCP port 5050, UDP port 5050, or some other port 5050?

You would:

	write a dissector for your custom protocol;

	have the dissector register itself with the appropriate other
	protocol, for example:

		dissector_add("udp.port", 5050, dissect_custom, proto_custom);

	if it's UDP port 5050 - "dissect_custom()" is the dissector
	routine for your protocol, and "proto_custom_ is the value
	returned by "proto_register_protocol()" in your dissector's
	registration routine;

	add the source file for your dissector to the
	"DISSECTOR_SOURCES" macros in "Makefile.am" and
	"Makefile.nmake";

	run "make" (on UNIX) or "nmake -f Makefile.nmake" (on Windows)
	to build Ethereal and Tethereal.

(I'm assuming that you've already downloaded the Ethereal source code.)

In the "doc" subdirectory of the Ethereal source are files
"README.developer" and "README.tvbuff"; read those for information on
how to write a dissector.