pub enum PacketCaptureProviderRequest {
StartRolling {
common_params: CommonPacketCaptureParams,
params: RollingPacketCaptureParams,
responder: PacketCaptureProviderStartRollingResponder,
},
ReconnectRolling {
name: String,
responder: PacketCaptureProviderReconnectRollingResponder,
},
}Expand description
Provides packet captures.
[PacketCaptureProvider.StartRolling] is recommended if:
- You need resilience against network interruptions closing the channel tied to the packet capture’s lifetime.
- You know when the packets of interest get captured, e.g. when a specific networking event you’re looking for occurs.
- Not having to continuously read packet capture data from the Netstack is a benefit.
Note that in order to conserve memory, the server maintains a limit on the number of concurrent packet captures, and starting another packet capture when the quota has been met fails.
In all cases, the server sends the packet captures in pcapng format, i.e. there is a Section Header Block at the start of each packet capture followed by one or more Interface Description Blocks, followed by Enhanced Packet Blocks containing packet data. Other blocks defined by the pcapng file standard may appear as well.
Variants§
StartRolling
Start a rolling packet capture.
Lifetime of the packet capture is tied to the pipelined channel unless
[RollingPacketCapture.Detach] has been called.
§Error
All variants of PacketCaptureStartError may be returned by this
method.
Fields
common_params: CommonPacketCaptureParamsparams: RollingPacketCaptureParamsresponder: PacketCaptureProviderStartRollingResponderReconnectRolling
Reconnects to a packet capture previously started with
[PacketCaptureProvider/StartRolling].
Note reconnecting does not reattach the lifetime of the packet capture to
channel.
Implementations§
Source§impl PacketCaptureProviderRequest
impl PacketCaptureProviderRequest
pub fn into_start_rolling( self, ) -> Option<(CommonPacketCaptureParams, RollingPacketCaptureParams, PacketCaptureProviderStartRollingResponder)>
pub fn into_reconnect_rolling( self, ) -> Option<(String, PacketCaptureProviderReconnectRollingResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL