On Tue, 28 Dec 2004 20:14:54 +0100, LEGO <luis.ontanon@xxxxxxxxx> wrote:
> Hi,
> I have few tapping questions:
>
> - Can I call tap_queue_packet() more times from the same dissector?
>
> - And if so, will the tap callback be called as many times and with
> the various instances of tap_specific_data?
Yes, that should work, if not it is a bug and just let me know and i
will fix it.
>
> - Who should take care of freeing what's passed into tap_specific_data?
Hm. Freeing the data afterwards is "difficult" since the taps are
called long after the dissection has finished.
The easiest way here would be to only pass static preallocated
structures through tap, or if you must use dynamic structures, keep
them hanging around by a pointer until the next time that dissector is
called and then let the dissector first clean up from the previous
invocation before generating new structures for the current packet.
>
> - How do I know from the dissector that the tap is going to be called?
You dont.
Do you really need to know this?
>
> Thanks,
>
> Luis Ontanon
>
> _______________________________________________
> Ethereal-dev mailing list
> Ethereal-dev@xxxxxxxxxxxx
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
>