Ethereal-dev: [Ethereal-dev] How to use dissector_add

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

From: Stefano Pettini <spettini@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 31 Dec 2004 18:16:13 +0100
Hello,

I'm writing a new protocol dissector. Can somebody explain me what to write in proto_ref_handoff_xxx ???

My protocol (ALC, RFC 3450) is based on UDP, but the rfc doesn't define a default port. Indeed, the protocol seems to use a set of consecutive UDP ports, starting from a base one, which is not specified and is left to the user discretion.

I've left proto_ref_handoff_xxx empty, but my dissector becomes invisible (I can't choose it manually in the "decode as..." window).

Maybe it's not possible to automatically decode, after a brief inspection, an unknown UDP packet as an ALC one, but do I have to call dissect_add with a fake default UDP port, even if that default isn't specified?

I've tried this solution using port 4096 successfully: the dissector becomes visible in the "decode as..." window. Is this the right solution?

Thanks.
And Happy New Year.

Stefano