Wireshark mailing list archives

Re: How to stop extcap gracefully


From: Roland Knall <rknall () gmail com>
Date: Sat, 27 Nov 2021 22:35:51 +0100

Due to the nature of extcaps, they are not explicitly closed. Instead, you
should monitor the created pipes. Dumpcap closes those pipes when the
capture has finished. We do send them a kill signal, but due to the nature
of the signal handling, this signal may be missed.

The sure fire way is, if the pipe gets closed, end the extcap from the
extcap side.

cheers
Roland

Am Sa., 27. Nov. 2021 um 22:29 Uhr schrieb Jirka Novak <j.novak () netsystem cz
:

Hi,

  I'm working on ciscodump extcap.
  The the application creates settings on Cisco device and when it ends,
it clears settings.
  The issue is that when capture is stopped during capture, the
application is stopped and settings stays on Cisco device.

  I added signal handling to ciscodump so when it is stopped from CLI,
it cleanups as expected. I'm capturing TERM and INT signals. But it
looks that when it is run from wireshark, application is terminated and
signal is not thrown.
  Can I ask someone to help me/explain how extcaps are stopped to adapt
to it?

  I know how unix signals works, I'm just missing information how
wireshark terminates extcaps.

                                        Best regards,

                                                Jirka
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org
?subject=unsubscribe

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: