pub struct NetworkPacketTraceConfig {
pub poll_ms: Option<u32>,
pub aggregation_threshold: Option<u32>,
pub intern_limit: Option<u32>,
pub drop_local_port: Option<bool>,
pub drop_remote_port: Option<bool>,
pub drop_tcp_flags: Option<bool>,
}
Expand description
Network tracing data source that records details on all packets sent or received by the network.
Fields§
§poll_ms: Option<u32>
Polling frequency in milliseconds. Network tracing writes to a fixed size ring buffer. The polling interval should be such that the ring buffer is unlikely to fill in that interval (or that filling is an acceptable risk). The minimum polling rate is 100ms (values below this are ignored). Introduced in Android 14 (U).
aggregation_threshold: Option<u32>
The aggregation_threshold is the number of packets at which an event will switch from per-packet details to aggregate details. For example, a value of 50 means that if a particular event (grouped by the unique combinations of metadata fields: {interface, direction, uid, etc}) has fewer than 50 packets, the exact timestamp and length are recorded for each packet. If there were 50 or more packets in an event, it would only record the total duration, packets, and length. A value of zero or unspecified will always / record per-packet details. A value of 1 always records aggregate details.
intern_limit: Option<u32>
Specifies the maximum number of packet contexts to intern at a time. This prevents the interning table from growing too large and controls whether interning is enabled or disabled (a value of zero disables interning and is the default). When a data sources interning table reaches this amount, packet contexts will be inlined into NetworkPacketEvents.
drop_local_port: Option<bool>
The following fields specify whether certain fields should be dropped from the output. Dropping fields improves normalization results, reduces the size of the interning table, and slightly reduces event size.
drop_remote_port: Option<bool>
§drop_tcp_flags: Option<bool>
Implementations§
Source§impl NetworkPacketTraceConfig
impl NetworkPacketTraceConfig
Sourcepub fn poll_ms(&self) -> u32
pub fn poll_ms(&self) -> u32
Returns the value of poll_ms
, or the default value if poll_ms
is unset.
Sourcepub fn aggregation_threshold(&self) -> u32
pub fn aggregation_threshold(&self) -> u32
Returns the value of aggregation_threshold
, or the default value if aggregation_threshold
is unset.
Sourcepub fn intern_limit(&self) -> u32
pub fn intern_limit(&self) -> u32
Returns the value of intern_limit
, or the default value if intern_limit
is unset.
Sourcepub fn drop_local_port(&self) -> bool
pub fn drop_local_port(&self) -> bool
Returns the value of drop_local_port
, or the default value if drop_local_port
is unset.
Sourcepub fn drop_remote_port(&self) -> bool
pub fn drop_remote_port(&self) -> bool
Returns the value of drop_remote_port
, or the default value if drop_remote_port
is unset.
Sourcepub fn drop_tcp_flags(&self) -> bool
pub fn drop_tcp_flags(&self) -> bool
Returns the value of drop_tcp_flags
, or the default value if drop_tcp_flags
is unset.
Trait Implementations§
Source§impl Clone for NetworkPacketTraceConfig
impl Clone for NetworkPacketTraceConfig
Source§fn clone(&self) -> NetworkPacketTraceConfig
fn clone(&self) -> NetworkPacketTraceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for NetworkPacketTraceConfig
impl Debug for NetworkPacketTraceConfig
Source§impl Default for NetworkPacketTraceConfig
impl Default for NetworkPacketTraceConfig
Source§impl Message for NetworkPacketTraceConfig
impl Message for NetworkPacketTraceConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.