ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

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

Date: Mon, 2 Feb 2009 18:17:33 +0000
well that could be helpful. The thing is, i cant write anything to the library. It's all set and isn't to be changed by me. I was hoping there was a way to create a third file of sorts. So that my c function calls the third file which calls the library function and returns the information that way. I dont know how i would go about writing this however.
--------------------------------------
Let's say you want to write a function x with C calling function to call a function called y in a C++ libarary.
In file x.cpp, declare
extern "C" void x()
{
  y();
}
In Wireshark call x.
Link Wireshark, x and library together.