Wireshark-dev: Re: [Wireshark-dev] port tracking ?
Date: Tue, 17 Oct 2006 09:24:07 +0000 (UTC)
On Tue, 10 Oct 2006, Kukosa, Tomas wrote:

See README.developer chapters 2.2-2.4 concerning conversations.
Especially 2.4 Dynamic server port dissector registration


Thank you for this. But I'm in doubt whether this works in plugins, too.
It always crahsed.

But I think there is a comparatively more simple solution:

	Somewhere:

		static dissector_handle_t data_channnel_handle;
		data_channnel_handle = create_dissector_handle(...);

	In control channel dissector:

		if ( /* a data channel is announced on port X */ ) {
			dissector_add("udp.port", X, data_channnel_handle);
		}

and also in control channel dissector:

		if ( /* a data channel closing is announced on port X */ ) {
			dissector_delete("udp.port", X, data_channnel_handle);
		}

This works fine.(?)

--
J.Anders, GERMANY, TU Chemnitz, Fakultaet fuer Informatik