pub(crate) fn attach_icmp_filter(
socket: &Socket,
icmp_id: u16,
is_ipv6: bool,
) -> Result<()>Expand description
Attach a filter to a raw ICMP socket so the kernel only delivers ICMP echo
replies whose identifier matches icmp_id, dropping all other ICMP traffic.
ยงArguments
socket- the raw ICMP socket to attach the filter toicmp_id- the ICMP identifier used for this measurementis_ipv6- whether this is an IPv6 (ICMPv6) socket