Trait netstack3_core::transport::udp::NonSyncContext
source · pub trait NonSyncContext<I: IcmpIpExt> {
// Required method
fn receive_icmp_error(&mut self, id: SocketId<I>, err: I::ErrorCode);
}
Expand description
An execution context for the UDP protocol.
Required Methods§
sourcefn receive_icmp_error(&mut self, id: SocketId<I>, err: I::ErrorCode)
fn receive_icmp_error(&mut self, id: SocketId<I>, err: I::ErrorCode)
Receives an ICMP error message related to a previously-sent UDP packet.
err
is the specific error identified by the incoming ICMP error
message.
Concretely, this method is called when an ICMP error message is received which contains an original packet which - based on its source and destination IPs and ports - most likely originated from the given socket. Note that the offending packet is not guaranteed to have originated from the given socket. For example, it may have originated from a previous socket with the same addresses, it may be the result of packet corruption on the network, it may have been injected by a malicious party, etc.