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: "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


  • References:
    • [Wireshark-dev] Calling C++ files from C dissector
      • From: gogrady
  • Prev by Date: [Wireshark-dev] Calling C++ files from C dissector
  • Next by Date: Re: [Wireshark-dev] Calling C++ files from C dissector
  • Previous by thread: [Wireshark-dev] Calling C++ files from C dissector
  • Next by thread: Re: [Wireshark-dev] Calling C++ files from C dissector
  • Index(es):
    • Date
    • Thread

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