Wireshark-dev: Re: [Wireshark-dev] Future of extcap "API"

Date Prev · Date Next · Thread Prev · Thread Next
From: Jirka Novak <j.novak@xxxxxxxxxxxx>
Date: Sun, 28 Aug 2022 13:34:52 +0200
Hi,

I drawn attached diagram. It can became part of developers doc when finished. Please, comment it.

Wireshark is the one who creates command line for extcap - name of
binary and its parameters. This information should be passed to helper
and it will run command line. How to pass this information to helper?

I think just appending extcap binary and commandline after "--" helper
commandline argument is all that is needed.

Yes, it makes sense.

How Wireshark will control helper?
We can't use signals on Win32. So pipe or windows events?

I think single character (e.g. 'q' for graceful termination, and 't'
for termination) write to a pipe is all that is needed. The pipe can
be duplex as it will be Windows only.

I think wireshark do not need to distinguish which phase of shutdown is requested because wireshark do not know whether extcap requires/supports it. Therefore it would send 'q' and later 't' for every extcap. It looks useless for me. I think that just shutdown should be requested (e.g. by QUIT word as for dumpcap) and helper will send signal and then terminate the process. Of course, wireshark must wait for helper termination and it can take a little more than 30 seconds (timeout for graceful shutdown).
Duplex pipe looks useless to me for same reason.

						Best regards,

							Jirka

Attachment: ws-capture_graceful_shutdown.dia
Description: application/dia-diagram