Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-users: Re: [Wireshark-users] ./configure --enable-threads is not really enabling them

From: Andrei Pirvan <adypirvan@xxxxxxxxx>
Date: Tue, 30 Jun 2009 11:41:27 +0300
Thanks for info. I managed to accomplish it using pthreads and a
function called periodically with gtk_timeout_add() to update my
add-on's interface.

On Mon, Jun 29, 2009 at 12:43 AM, Gerald Combs<gerald@xxxxxxxxxxxxx> wrote:
> Andrei Pirvan wrote:
>> Hello. I tried to build Wireshark 1.0.8 and Wireshark 1.2.0 on Ubuntu
>> 9.04 amd64 with threads support. The configure script reports at the
>> end that threads will be used (Use threads : yes), but when I run the
>> program with "libtool --mode=execute gdb wireshark" I can see only the
>> main thread. Also, I noticed that "defined USE_THREADS" it's false (in
>> gtk/main.c), so that's the reason why it won't use threads, even if
>> "defined(G_THREADS_ENABLED)" is true. I need it because I must run
>> another thread used to inject some packets, and must have the
>> interface updating in the same time. Thanks in advance for any ideas.
>
> Thread support has been neglected, unfortunately. One reason is that
> GTK+ hasn't supported threads very well on Windows as discussed at
>
>   http://www.wireshark.org/lists/wireshark-dev/200611/msg00172.html
>
> and
>
>   http://library.gnome.org/devel/gdk/stable/gdk-Threads.html
>
> Another reason is that the obvious application for threads (parallelized
> packet dissection) is really, really hard to implement in the current
> codebase. We should probably revisit the threads issue just to see what
> we can & can't do within Wireshark. At the very least we need to clean
> up the "--enable-threads" configure option.
>
> Does packet injection require elevated privileges? If so, you should use
> a separate process for that similar to dumpcap.
> ___________________________________________________________________________
> Sent via:    Wireshark-users mailing list <wireshark-users@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-users
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-users
>             mailto:wireshark-users-request@xxxxxxxxxxxxx?subject=unsubscribe
>