pub struct TxMetadata {
pub id: TxId,
pub segment_count: u8,
pub flags: TxFlags,
pub len: u32,
pub l2_len: u8,
pub l3_len: u16,
pub l4_len: u8,
pub transport_header_offset: u16,
pub max_segment_size: u16,
pub vlan: Option<VlanMetadata>,
}Expand description
Transmit packet metadata.
Fields§
§id: TxIdThe transmit ID.
segment_count: u8The number of segments, including this one.
flags: TxFlagsFlags.
len: u32The total length of the packet in bytes.
l2_len: u8The length of the Ethernet frame header. Only guaranteed to be set if various offload flags are set.
l3_len: u16The length of the IP header. Only guaranteed to be set if various offload flags are set.
l4_len: u8The length of the TCP header. Only guaranteed to be set if various offload flags are set.
transport_header_offset: u16The offset into the buffer where the L4 header begins (TCP or UDP). Only expected to be set if offload (checksum and/or segmentation) flags are set.
max_segment_size: u16The maximum segment size, used for segmentation offload (TSO or USO).
Only guaranteed to be set if TxFlags::offload_tcp_segmentation or
TxFlags::offload_udp_segmentation is set.
vlan: Option<VlanMetadata>Information about 802.1Q VLAN tagging. When a vlan is in use, this structure is populated. Only applies when traffic is being sent over an L2 connection, so L3-only or above traffic will not use this option.
Trait Implementations§
Source§impl Clone for TxMetadata
impl Clone for TxMetadata
Source§fn clone(&self) -> TxMetadata
fn clone(&self) -> TxMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more