pub struct TxFlags(/* private fields */);Expand description
Flags affecting transmit behavior.
Implementations§
Source§impl TxFlags
impl TxFlags
Sourcepub const fn offload_ip_header_checksum(&self) -> bool
pub const fn offload_ip_header_checksum(&self) -> bool
Offload IPv4 header checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 0..1
Sourcepub const fn with_offload_ip_header_checksum_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_offload_ip_header_checksum_checked( self, value: bool, ) -> Result<Self, ()>
Offload IPv4 header checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 0..1
Sourcepub const fn with_offload_ip_header_checksum(self, value: bool) -> Self
pub const fn with_offload_ip_header_checksum(self, value: bool) -> Self
Offload IPv4 header checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 0..1
Sourcepub const fn set_offload_ip_header_checksum(&mut self, value: bool)
pub const fn set_offload_ip_header_checksum(&mut self, value: bool)
Offload IPv4 header checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 0..1
Sourcepub const fn set_offload_ip_header_checksum_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_offload_ip_header_checksum_checked( &mut self, value: bool, ) -> Result<(), ()>
Offload IPv4 header checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 0..1
Sourcepub const fn offload_tcp_checksum(&self) -> bool
pub const fn offload_tcp_checksum(&self) -> bool
Offload the TCP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 1..2
Sourcepub const fn with_offload_tcp_checksum_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_offload_tcp_checksum_checked( self, value: bool, ) -> Result<Self, ()>
Offload the TCP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 1..2
Sourcepub const fn with_offload_tcp_checksum(self, value: bool) -> Self
pub const fn with_offload_tcp_checksum(self, value: bool) -> Self
Offload the TCP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 1..2
Sourcepub const fn set_offload_tcp_checksum(&mut self, value: bool)
pub const fn set_offload_tcp_checksum(&mut self, value: bool)
Offload the TCP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 1..2
Sourcepub const fn set_offload_tcp_checksum_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_offload_tcp_checksum_checked( &mut self, value: bool, ) -> Result<(), ()>
Offload the TCP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 1..2
Sourcepub const fn offload_udp_checksum(&self) -> bool
pub const fn offload_udp_checksum(&self) -> bool
Offload the UDP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 2..3
Sourcepub const fn with_offload_udp_checksum_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_offload_udp_checksum_checked( self, value: bool, ) -> Result<Self, ()>
Offload the UDP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 2..3
Sourcepub const fn with_offload_udp_checksum(self, value: bool) -> Self
pub const fn with_offload_udp_checksum(self, value: bool) -> Self
Offload the UDP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 2..3
Sourcepub const fn set_offload_udp_checksum(&mut self, value: bool)
pub const fn set_offload_udp_checksum(&mut self, value: bool)
Offload the UDP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 2..3
Sourcepub const fn set_offload_udp_checksum_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_offload_udp_checksum_checked( &mut self, value: bool, ) -> Result<(), ()>
Offload the UDP checksum calculation.
l3_protocol, l2_len, and l3_len must be set.
Bits: 2..3
Sourcepub const fn offload_tcp_segmentation(&self) -> bool
pub const fn offload_tcp_segmentation(&self) -> bool
Offload the TCP segmentation, allowing packets to be larger than the MTU.
l3_protocol, l2_len, l3_len, l4_len, and tcp_segment_size must
be set.
Bits: 3..4
Sourcepub const fn with_offload_tcp_segmentation_checked(
self,
value: bool,
) -> Result<Self, ()>
pub const fn with_offload_tcp_segmentation_checked( self, value: bool, ) -> Result<Self, ()>
Offload the TCP segmentation, allowing packets to be larger than the MTU.
l3_protocol, l2_len, l3_len, l4_len, and tcp_segment_size must
be set.
Bits: 3..4
Sourcepub const fn with_offload_tcp_segmentation(self, value: bool) -> Self
pub const fn with_offload_tcp_segmentation(self, value: bool) -> Self
Offload the TCP segmentation, allowing packets to be larger than the MTU.
l3_protocol, l2_len, l3_len, l4_len, and tcp_segment_size must
be set.
Bits: 3..4
Sourcepub const fn set_offload_tcp_segmentation(&mut self, value: bool)
pub const fn set_offload_tcp_segmentation(&mut self, value: bool)
Offload the TCP segmentation, allowing packets to be larger than the MTU.
l3_protocol, l2_len, l3_len, l4_len, and tcp_segment_size must
be set.
Bits: 3..4
Sourcepub const fn set_offload_tcp_segmentation_checked(
&mut self,
value: bool,
) -> Result<(), ()>
pub const fn set_offload_tcp_segmentation_checked( &mut self, value: bool, ) -> Result<(), ()>
Offload the TCP segmentation, allowing packets to be larger than the MTU.
l3_protocol, l2_len, l3_len, l4_len, and tcp_segment_size must
be set.
Bits: 3..4
Sourcepub const fn with_is_ipv4_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_is_ipv4_checked(self, value: bool) -> Result<Self, ()>
If true, the packet is IPv4.
Bits: 4..5
Sourcepub const fn with_is_ipv4(self, value: bool) -> Self
pub const fn with_is_ipv4(self, value: bool) -> Self
If true, the packet is IPv4.
Bits: 4..5
Sourcepub const fn set_is_ipv4(&mut self, value: bool)
pub const fn set_is_ipv4(&mut self, value: bool)
If true, the packet is IPv4.
Bits: 4..5
Sourcepub const fn set_is_ipv4_checked(&mut self, value: bool) -> Result<(), ()>
pub const fn set_is_ipv4_checked(&mut self, value: bool) -> Result<(), ()>
If true, the packet is IPv4.
Bits: 4..5
Sourcepub const fn is_ipv6(&self) -> bool
pub const fn is_ipv6(&self) -> bool
If true, the packet is IPv6. Mutually exclusive with is_ipv4.
Bits: 5..6
Sourcepub const fn with_is_ipv6_checked(self, value: bool) -> Result<Self, ()>
pub const fn with_is_ipv6_checked(self, value: bool) -> Result<Self, ()>
If true, the packet is IPv6. Mutually exclusive with is_ipv4.
Bits: 5..6
Sourcepub const fn with_is_ipv6(self, value: bool) -> Self
pub const fn with_is_ipv6(self, value: bool) -> Self
If true, the packet is IPv6. Mutually exclusive with is_ipv4.
Bits: 5..6
Sourcepub const fn set_is_ipv6(&mut self, value: bool)
pub const fn set_is_ipv6(&mut self, value: bool)
If true, the packet is IPv6. Mutually exclusive with is_ipv4.
Bits: 5..6