pub struct InterfacesStep;
Expand description
List the interfaces and toolbar controls supported by this extcap
implementation in stdout for Wireshark’s consumption. Corresponds to the
--extcap-interfaces
argument in extcap. Implementations should call
list_interfaces
during this step.
Implementations§
Source§impl InterfacesStep
impl InterfacesStep
Sourcepub fn list_interfaces(
&self,
metadata: &Metadata,
interfaces: &[&Interface],
controls: &[&dyn ToolbarControl],
)
pub fn list_interfaces( &self, metadata: &Metadata, interfaces: &[&Interface], controls: &[&dyn ToolbarControl], )
List the interfaces and toolbar controls supported by this extcap implementation in stdout for Wireshark’s consumption. Wireshark calls this when the application starts up to populate the list of available interfaces.
-
metadata: metadata like version info and help URL for this program. This is used by Wireshark to display in the UI.
The
cargo_metadata
macro can be used to create this from data inCargo.toml
. -
interfaces: List of interfaces to make available for external capture. Since that interface list is cached and the interface names can be used later when the user tries to start a capture session, the interface list should stay as consistent as possible. If the list of interfaces can change, the extcap program must be prepared to handle stale values in
ConfigStep::interface
andCaptureStep::interface
. -
controls: List the toolbar controls for this interface. In Wireshark, this is presented to the user in View > Interface Toolbars. See the documentation in
controls
for details.