pub struct RecvMeta {
pub addr: SocketAddr,
pub len: usize,
pub stride: usize,
pub ecn: Option<EcnCodepoint>,
pub dst_ip: Option<IpAddr>,
pub destination: Option<TargetAddr>,
}Expand description
Metadata for a single buffer filled with bytes received from the network
This is our custom version of RecvMeta that includes destination information for better packet routing support.
Fields§
§addr: SocketAddrThe source address of the datagram(s) contained in the buffer
len: usizeThe number of bytes the associated buffer has
stride: usizeThe 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 (API level > 25), FreeBSD, OpenBSD, NetBSD, macOS, and iOS.
destination: Option<TargetAddr>The destination address that this packet is intended for This is our custom field for better packet routing