Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Calling C++ files from C dissector

From: "Behdad Forghani" <behdad.forghani@xxxxxxxxx>
Date: Mon, 2 Feb 2009 12:13:22 -0500
You need to declare your function to use C calling convention using extern
"C" declaration and then you can link it into your code.

-----Original Message-----
From: wireshark-dev-bounces@xxxxxxxxxxxxx
[mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] On Behalf Of gogrady@xxxxxxxxx
Sent: Monday, February 02, 2009 12:09 PM
To: wireshark-dev@xxxxxxxxxxxxx
Subject: [Wireshark-dev] Calling C++ files from C dissector

Hello,

So i'm writing a custom dissector. I have a library for a custom protocol
which has functions i need to call. What i want to do is take the raw data,
send it to the library, and the library will send back the useful
information for output. I've written the dissector code for getting the raw
data, but now i don't know how to call the library. I want to create a
proxy, or another file that i will use to call the library so my dissector
isnt interacting directly with the library. I'm not sure how i even start to
do this. any help would be greatly appreciated, i'm new to C/C++.

Thank,
Greg
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe