pub struct Interface {
pub value: Cow<'static, str>,
pub display: Cow<'static, str>,
pub dlt: Dlt,
}
Expand description
Definition of an interface for this extcap program. An interface is an entry
in the Wireshark homepage, similar to Wi-Fi: en0
. Instances of this should
be passed to
InterfacesStep::list_interfaces
.
Fields§
§value: Cow<'static, str>
A unique identifier for this interface. This value will be passed back
from Wireshark in the --extcap-interface
argument in subsequent calls
to indicate which interface the user is working with.
display: Cow<'static, str>
A user-readable string describing this interface, which is shown in the Wireshark UI.
dlt: Dlt
The DLT associated with this interface. The DLT is used by Wireshark to determine how to dissect the packet data given by this extcap program.
Note: While the extcap-example and documentation chapter 8.2 says this is a list of DLTs, in reality only one DLT per interface is supported, per this thread.
Implementations§
Trait Implementations§
Source§impl PrintSentence for Interface
use r_extcap::config::ExtcapFormatter;
use r_extcap::interface::{DataLink, Dlt, Interface};
assert_eq!(
ExtcapFormatter(&Interface{ value: "MyInterface".into(), display: "My interface".into(), dlt }).to_string(),
"interface {value=MyInterface}{display=My interface}\n",
);
impl PrintSentence for Interface
use r_extcap::config::ExtcapFormatter;
use r_extcap::interface::{DataLink, Dlt, Interface};
assert_eq!(
ExtcapFormatter(&Interface{ value: "MyInterface".into(), display: "My interface".into(), dlt }).to_string(),
"interface {value=MyInterface}{display=My interface}\n",
);