pub struct RecvMeta {
pub addr: SocketAddr,
pub len: usize,
pub stride: usize,
pub ecn: Option<EcnCodepoint>,
pub dst_ip: Option<IpAddr>,
}
Expand description
Metadata for a single buffer filled with bytes received from the network
This associated buffer can contain one or more datagrams, see stride
.
Fields§
§addr: SocketAddr
The source address of the datagram(s) contained in the buffer
len: usize
The number of bytes the associated buffer has
stride: usize
The size of a single datagram in the associated buffer
When GRO (Generic Receive Offload) is used this indicates the size of a single
datagram inside the buffer. If the buffer is larger, that is if len
is greater
then this value, then the individual datagrams contained have their boundaries at
stride
increments from the start. The last datagram could be smaller than
stride
.
ecn: Option<EcnCodepoint>
The Explicit Congestion Notification bits for the datagram(s) in the buffer
dst_ip: Option<IpAddr>
The destination IP address which was encoded in this datagram
Populated on platforms: Windows, Linux, Android, FreeBSD, OpenBSD, NetBSD, macOS, and iOS.
Trait Implementations§
impl Copy for RecvMeta
Auto Trait Implementations§
impl Freeze for RecvMeta
impl RefUnwindSafe for RecvMeta
impl Send for RecvMeta
impl Sync for RecvMeta
impl Unpin for RecvMeta
impl UnwindSafe for RecvMeta
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)