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 14:24:19 -0700
On Sun, May 30, 2004 at 11:21:00PM +0200, Thomas Anders wrote:
> Guy Harris wrote:
> > Have "dissect_kerberos_main()" take an argument that supplies callback
> > routines for the Kerberos dissector to use on those specific subfields?
> 
> But how does the Kerberos dissector know what "those specific subfields"
> are? It may be one of several candidates. Should it try the callback on
> each?

Can all the candidates be enumerated?

If so, the callback routines could, for example, be supplied as a table
of tags for the subfields and callbacks to be called for each of them.

> > 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.
> 
> If dissector X knows the "name" of this field, shouldn't it have the
> possibility to retrieve the relevant details (tree/item/hf) and
> overwrite the existing dissection? Technically possible?

I don't know whether the "epan/proto.c" code currently supports that.