Ethereal-dev: Re: [Ethereal-dev] Some questions

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

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 22 Dec 2005 11:17:57 +0100 (CET)
On Tue, 20 Dec 2005, fabio matturro wrote:

> 1) I'm writing a plugin for a protocol which runs atop UDP for most of the
> time. Sometimes, if the user sets an option, it also uses TCP. How can I
> switch from UDP to TCP?

Add your dissector to both the UDP and TCP port

	dissector_add("udp.port", PROTO_UDP_PORT, PROTO_handle);
	dissector_add("tcp.port", PROTO_TCP_PORT, PROTO_handle);

> 2) Is there a way to collect several packets and relate them to each oher?
> I've got some packets which are interpretable in the right way only if
> considered in a stream. I've read the documentation about conversations but
> I'm not sure how to apply them to my problem.

Check out the developer guide for packet reassembly. Chapter 8.4

Good luck,
Jaap