1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Helper functions to query pertinent platform-dependent behaviors.
use cfg_if;
/// Returns `true` if the current platform forces the ICMP Echo `id` to be the local port (big
/// endian) on sent messages.
///
/// See [`crate::socket::IcmpSocket::local_port`] and [`crate::socket::IcmpSocket::platform_echo_id`].
/// Returns `true` if the current platform includes the ipv4 header before the icmp message
/// when reading from a socket
pub
/// Returns `true` if the current platform requires calculating an ICMPv4 checksum on outgoing
/// messages.
pub
/// Returns `true` if the current platform sets a nonzero local port on a socket after a `bind()`
/// with `0.0.0.0:0` or `:::0`.
pub
/// Returns true on macOS, false otherwise
/// Returns true on Linux, false otherwise