Ethereal-dev: [Ethereal-dev] Dissector not called automatically, only by "Decode as"

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

From: Thomas Boehne <TBoehne@xxxxxxxx>
Date: Mon, 14 Mar 2005 13:52:10 +0100
One of my dissectors should dissect UDP packets from and to port 7000,
so this is what I am doing to register the dissector:

void
proto_reg_handoff_adwin_config(void)
{
        adwin_config_handle = create_dissector_handle(dissect_adwin_config,
                                                      proto_adwin_config);
        dissector_add("udp.port", 7000, adwin_config_handle);
}

When I capture packets, UDP packets to/from port 7000 are handled by
the Cisco SM dissector or RUDP dissector, and when I disable those
protocols the packets are displayed as UDP packets. When I manually
select a packet and use "Decode as" and pick my dissector, everything
works properly. What's the problem here? Why is ethereal not calling
my dissector automatically?

I am calling dissector_add in exactly the same way for another
protocol (using a different port), and everything works there.

Sincerely yours, 
Thomas Böhne

-- 
Jäger Computergesteuerte Messtechnik GmbH
Thomas Böhne
Rheinstraße 2-4
64653 Lorsch
Germany
Phone: +49-6251-9632-0