1pub const VERSION: &str = env!("CARGO_PKG_VERSION");
3pub const _PROGRAM: &str = env!("CARGO_PKG_NAME");
4
5pub const ICMP_ECHO_REQUEST: u8 = 8;
7pub const ICMP_ECHO_REPLY: u8 = 0;
8pub const ICMP6_ECHO_REQUEST: u8 = 128;
9pub const ICMP6_ECHO_REPLY: u8 = 129;
10pub const ICMP_HEADER_LEN: usize = 8;
11
12pub const _DEFAULT_INTERVAL_MS: u64 = 10;
14pub const _DEFAULT_PERIOD_MS: u64 = 1000;
15pub const _DEFAULT_TIMEOUT_MS: u64 = 500;
16pub const _DEFAULT_RETRY: u32 = 3;
17pub const _DEFAULT_BACKOFF: f64 = 1.5;
18pub const _DEFAULT_PING_DATA_SIZE: usize = 56;
19
20pub const _MIN_BACKOFF: f64 = 1.0;
21pub const _MAX_BACKOFF: f64 = 5.0;
22
23pub const _MAX_GENERATE: usize = 131_072;
24pub const _MAX_TARGET_NAME: usize = 255;
25
26pub const _RESP_WAITING: i64 = -1;
28pub const _RESP_UNUSED: i64 = -2;
29pub const _RESP_TIMEOUT: i64 = -4;
30
31pub const _ICMP_TYPE_STR: &[&str] = &[
33 "ICMP Echo Reply", "",
35 "",
36 "ICMP Unreachable", "ICMP Source Quench", "ICMP Redirect", "",
40 "",
41 "ICMP Echo", "",
43 "",
44 "ICMP Time Exceeded", "ICMP Parameter Problem", "ICMP Timestamp Request", "ICMP Timestamp Reply", "ICMP Information Request", "ICMP Information Reply", "ICMP Mask Request", "ICMP Mask Reply", ];
53
54pub const _ICMP_UNREACH_STR: &[&str] = &[
55 "ICMP Network Unreachable",
56 "ICMP Host Unreachable",
57 "ICMP Protocol Unreachable",
58 "ICMP Port Unreachable",
59 "ICMP Unreachable (Fragmentation Needed)",
60 "ICMP Unreachable (Source Route Failed)",
61 "ICMP Unreachable (Destination Network Unknown)",
62 "ICMP Unreachable (Destination Host Unknown)",
63 "ICMP Unreachable (Source Host Isolated)",
64 "ICMP Unreachable (Communication with Network Prohibited)",
65 "ICMP Unreachable (Communication with Host Prohibited)",
66 "ICMP Unreachable (Network Unreachable For Type Of Service)",
67 "ICMP Unreachable (Host Unreachable For Type Of Service)",
68 "ICMP Unreachable (Communication Administratively Prohibited)",
69 "ICMP Unreachable (Host Precedence Violation)",
70 "ICMP Unreachable (Precedence cutoff in effect)",
71];