First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Does Wireshark support multi-threading for packet parsing?

Which version of Wireshark supports concurrent parsing through C language with multiple threads? I'm currently facing issues with global variable conflicts in Wireshark version 2.4 when using multi-threaded parsing. I would like to know if there is a higher version of Wireshark that provides better support for multi-threading.

mpy's avatar
3
mpy
asked 2024-01-12 06:45:17 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

1

Which version of Wireshark supports concurrent parsing through C language with multiple threads?

None.

Packet dissection is not an "embarrassingly parallel" problem. For example, the dissection of packet N may depend on the dissection of one or more packets before it. Dissecting flows in separate threads might make that less of a problem, but there's no guarantee that the dissection of a packet in one flow won't depend on information from another flow.

I.e., there are more problems than global variables here.

Guy Harris's avatar
19.9k
Guy Harris
answered 2024-01-12 08:19:01 +0000
edit flag offensive 0 remove flag delete link

Comments

Is it not allowed to create two threads in a C language program, with each thread parsing a separate pcap file? I tried doing this, but encountered global variable conflicts. Does this mean that no version of Wireshark supports any form of multi-threaded packet parsing (whether it's two threads parsing the same pcap file or two threads parsing two different pcap files)?

mpy's avatar mpy (2024-01-12 08:35:07 +0000) edit

Is it not allowed to create two threads in a C language program, with each thread parsing a separate pcap file?

Unfortunately, various state required by the dissection process (including the state that makes packet dissection not embarrassingly-parallel) is stored in global variables rather than in per-file variables, so, no, trying to process two files in the same process won't work.

Guy Harris's avatar Guy Harris (2024-01-13 08:59:45 +0000) edit
add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer