Wireshark mailing list archives

Re: Retrieving dissection result from another dissector


From: Richard Sharpe <realrichardsharpe () gmail com>
Date: Tue, 3 Jul 2018 08:27:31 -0700

On Tue, Jul 3, 2018 at 8:21 AM, Pascal Quantin <pascal.quantin () gmail com> wrote:
Hi Dario,

Le mar. 3 juil. 2018 à 17:11, Dario Lombardo <lomato () gmail com> a écrit :

Actually I'm using the blob to pass data from the caller to the called. I
guess it's a design flow to re-use this blob to have data back...


Simply add a parameter to your structure that is used to retrieve the output
data from the sub dissector:
struct {
    gint input_param1;
    guint32 input_param2;
    gint output_param;
} foo;

As the data parameter is not const in call_dissector_with_data() it should
work.

Yes. Once you have a large enough number of parameters to any function
anyway it becomes easier to pass in a pointer to a structure ...

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)(传说杜康是酒的发明者)
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: