Commit Graph

5 Commits

Author SHA1 Message Date
Tomasz Moń 0e7c240897
capture: Convert sync pipe to GIOChannel
Reduce the amount of platform specific Wireshark code by using
GIOChannel watch, i.e. do not use UNIX specific GLib functionality and
do not peek into pipe every 100 ms on Windows.
2022-10-23 13:17:10 +02:00
Tomasz Moń c1861ad1cc
extcap: Close capture session after extcap finishes
Wait up to 30 seconds for extcap process to finish after closing pipes.
The wait is achieved in non-blocking fashion, i.e. the UI is completely
responsive during the wait. Only actions related to capture process like
capture control, file open, save, export are inactive during the wait.

On Windows extcap child watch callback gets called immediately as the
process is forcefully terminated. Prior to this change the extcap was
forcefully terminated on Windows anyway.

The wait is possible on UNIX systems if extcap does handle SIGPIPE and
SIGTERM signals. The defaults handlers for SIGPIPE and SIGTERM simply
terminate the process so for large number of extcaps there is no change.
If extcap does not finish within 30 seconds, it is forcefully terminated
using SIGKILL signal.
2022-08-10 06:18:15 +02:00
Tomasz Moń 2d1380ae5b
capture: Move capture pipe polling out of UI
Both CLI and Qt interfaces spin GLib mainloop. Move the capture pipe
polling into common code to reduce code duplication.
2022-07-30 16:42:12 +02:00
Moshe Kaplan 65a651d5b9 capture: Add header files to Doxygen
Add @file markers for capture
headers so that Doxygen will
generate documentation for them.

Additionally, update the doxygen
config file per
7fee50274f
merging the caputils and capchild
directories.
2021-11-30 06:27:26 +00:00
João Valverde 7fee50274f Merge the caputils/ and capchild/ directories
The distinction between the different kinds of capture utility
may not warrant a special subfolfer for each, and sometimes the
distinction is not be clear or some functions could stradle
multiple "categories" (like capture_ifinfo.[ch]).

Simplify by having only a generic 'capture' subfolder. The
separate CMake libraries are kept as a way to reuse object code
efficiently.
2021-03-29 06:08:02 +01:00