On Wed, Jul 28, 1999 at 01:47:00PM -0500, Jeff Jahr wrote:
>
>
>
> This brings up a question that I've been meaning to ask for a while now.
> Why are there two different calling types for the dissect-* functions? I
> first ran into this when I wrote the pppoe decoder. I wanted to be able
> to call dissect_ppp(pd,offset,cap_len,tree), but dissect_ppp was written
> as a top-level three argument dissector without the offest argument. In my
> clip hack, I wanted to call dissect_ip as a three argument dissector, but
> it was only available in the four argument style. Thierry handles the
> situation by wraping the dissect_ip(,,,) call in a dissect_clip(,,) call,
> which is arguably the correct thing to do-- but I'd like to hear the
> argument. ;')
I see nothing wrong in making all dissect() functions take 4 arguments.
dissect_packet() will simple pass 0 as the offset to the "top-level"
dissectors. Would this simplify your pppoe decoder?
--gilbert