Am 25.03.2011 um 17:06 schrieb Chris Maynard <chris.maynard@xxxxxxxxx>:
> Roland Knall <rknall@...> writes:
>
>> 1. Is there a way to provide additional information to the
>> subdissector? Someone could use private_data, but that field I need
>> somewhere else, therefore can not be used here.
>
> I haven't looked at the patch or anything, but I just wanted to comment on this
> part. If you want/need to use the private data, you can do what several
> dissectors do and save a pointer to the current private_data before replacing
> the pinfo->private_data with your own, then restore the original afterwards.
> One example is packet-http.c, but there are others. (search for
> "save_private_data")
I thought of that. But the main argument against the use of the
private data would be, that the subdissector isn't expecting the data
in that place.
Anyway, I do not need the functionality anyway, just thought that
there should be a way of dealing with such cases.
kind regards,
Roland