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] use tshark as part of one application

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Thu, 11 Mar 2010 17:49:27 -0500
Eloy Paris wrote:
Hi Jeff,

On 03/11/2010 05:19 PM, Jeff Morriss wrote:

[...]

libwireshark is NOT thread safe.  If you're using multiple threads,
you'd need one lock to prevent more than one thread from entering
libwireshark simultaneously.

Indeed. I personally found that out while integrating libwireshark into netexpect. For one particular feature netexpect needs to dissect two packet simultaneously (or keep two dissection results in memory at the same time) so I ended up using a very ugly hack, which I still have had a chance to fix in a better way.

Are there any plans, or at least a desire, to make it thread-safe at some point in the future? Is there any README or wiki page that gives at least a big picture overview of what such a project would entail? I understand it's a big undertaking...

Yes, it is big.  See:

http://wiki.wireshark.org/Development/multithreading

for more info.