Ethereal-dev: Re: [Ethereal-dev] (re)dissecting another dissector's field

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 30 May 2004 13:32:30 -0700
On Sun, May 30, 2004 at 01:31:57PM +0200, Thomas Anders wrote:
> How can one add custom dissection to a field that another
> dissector has produced, without adding specific custom
> knowledge to that other, more generic dissector?
> 
> Let's say a dissector for a specific Kerberos-based protocol
> (e.g. packet-pktc.c) calls dissect_kerberos_main() from
> packet-kerberos.c, but wants to do its own (further) dissection
> for a specific sub field (e.g. KRB_SAFE User Data that is
> kind-of-opaque to packet-kerberos.c) further on.
> 
> How can we do this?

Have "dissect_kerberos_main()" take an argument that supplies callback
routines for the Kerberos dissector to use on those specific subfields?

That doesn't solve the arbitrary problem of alllowing arbitrary
dissector X to supply its own dissectors for arbitrary fields generated
by arbitrary dissector Y, but I don't know whether there's a clean
solution to that general problem.