Ask Your Question
0

Does Wireshark support multi-threading for packet parsing?

asked 2024-01-12 06:45:17 +0000

mpy gravatar image

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.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2024-01-12 08:19:01 +0000

Guy Harris gravatar image

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.

edit flag offensive delete link more

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 gravatar imagempy ( 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 gravatar imageGuy Harris ( 2024-01-13 08:59:45 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2024-01-12 06:45:17 +0000

Seen: 557 times

Last updated: Jan 12