This is our old Q&A Site. Please post any new questions and answers at

I want to make my own application using Wireshark libs. I did it already with NetworkMonitor API, but Wireshark offers some protocolls (i.e. S7comm).

The only one possibility I've found is to use Wireshark indirectly, using Lua. (Set a reference on LuaInterface.dll then "using LuaInterface" etc.)

Is it posiible without Lua? I want to make a reference to Wireshark in my project and to use all benefits of C#.

asked 11 May '12, 02:49

ZvDj's gravatar image

accept rate: 0%

edited 11 May '12, 14:22

helloworld's gravatar image


Using libwireshark.dll from C# should be like using any other native DLL from C#. See here for some details on how to do that in general.

However, using libwireshark is not for the faint-hearted, expect some bumps. The API hasn't really been designed for external consumption, more for the Wireshark project as a whole. There have been some other folks successfully using it in other apps (not C# IRC) so it can be done.

Remember the licensing of libwireshark is GPL, so think about the implications of that and read the FAQ on that for starters.

permanent link

answered 11 May '12, 03:04

grahamb's gravatar image

grahamb ♦
accept rate: 22%

Which kind of invoking would you recommend: Explicit, Implicit, Dynamic or "Converting C++ DLL to COM Server"?

Unfortunatelly are the links on the site, you have send me, not valid. Can you possibly send me links to some Examples of using of libwireshark.dll in C#?

Thanks in advance

(11 May '12, 03:57) ZvDj

I converted your "answer" to a comment as that's how this site works, please read the FAQ for more info.

The links works for me, here's what they point to: Invoke Native C++ DLL from .NET Code

I have no links to examples of using libwireshark.dll from C#. Google may have some, try that.

(11 May '12, 04:22) grahamb ♦

Sorry, I can open yout Link, but when I try to download (Download the All-In-One Code Framework (Library) package), I receive the message "The specified release was not found."

(11 May '12, 04:35) ZvDj

So it is. You'll have to contact MS about that.

(11 May '12, 05:06) grahamb ♦

Anyway, thank you very much

(11 May '12, 05:09) ZvDj

you should be able to create an execute command function in c# that expects a string... then execute the tshark command from the execute command function which invokes tshark and it's respective arguments :-)

permanent link

answered 25 Mar '13, 06:58

fdfvo's gravatar image

accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 11 May '12, 02:49

question was seen: 19,448 times

last updated: 25 Mar '13, 06:58

p​o​w​e​r​e​d by O​S​Q​A