Wireshark

  • Riverbed Technology
  • WinPcap
the world's foremost network protocol analyzer
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

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

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: <gogrady@xxxxxxxxx>
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.



  • Prev by Date: Re: [Wireshark-dev] Calling C++ files from C dissector
  • Next by Date: Re: [Wireshark-dev] Open Watcom C compiler ?
  • Previous by thread: Re: [Wireshark-dev] Calling C++ files from C dissector
  • Next by thread: Re: [Wireshark-dev] [Wireshark-commits] rev 27274: /trunk/gtk/ /trunk/gtk/: prefs_column.c
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation