Wireshark-dev: [Wireshark-dev] Proper private_data usage
From: Christopher Maynard <[email protected]>
Date: Tue, 15 Oct 2013 16:00:18 +0000 (UTC)
What is the proper, safe and recommended way to use pinfo->private_data?

If you look at the TCP dissector, you see the following:

        pd_save = pinfo->private_data;
        TRY {
            (*dissect_pdu)(next_tvb, pinfo, tree);
            /*  Restore the private_data structure in case one of the
             *  called dissectors modified it (and, due to the exception,
             *  was unable to restore it).
            pinfo->private_data = pd_save;
            show_exception(tvb, pinfo, tree, EXCEPT_CODE, GET_MESSAGE);

I did not check all dissectors, but this is certainly not done for all of
them.  I guess the question I have is, should it?  Is this the recommended

- Chris