Module r_extcap::controls::asynchronous

source ·
Expand description

Tools for handling the Control Pipe with async (tokio).

There are three main classes provided in this module:

  • ExtcapControlSender – Implements the sender side for sending control packets from the extcap program you are implementing to Wireshark.
  • ExtcapControlReader – Implements the reader side that receives control packets sent from Wireshark.
  • ChannelExtcapControlReader – A wrapper around ExtcapControlReader that provides simpler, but less flexible, handling of the communication using a Tokio channel.

See Wireshark’s Adding Capture Interfaces And Log Sources Using Extcap section 8.2.3.2.1 for a description of the protocol format.

Modules§

  • Random assortment of utility methods.

Structs§

  • A reader for an Extcap Control using a Channel. This is the easier to use, but higher overhead way to read control packets. When the reader is spawned, a thread is spawned to continuously read messages and writes them into a bounded channel. This allows reading the control messages without worrying about spawning async tasks, by calling try_read_packet every once in a while.
  • A reader for the Extcap control pipe.
  • A sender for the extcap control packets. out_file should be the file given by the --extcap-control-out flag.

Enums§

Traits§

  • Sender for extcap control packets. These control packets controls the UI generated by Wireshark. This trait also provides convenience functions for sending control packets formatted for particular usages like info_message and status_message. For other functions controlling various toolbar controls, see the methods in the control module instead.