diff --git a/Cargo.toml b/Cargo.toml index f3766bd..02a0dc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,4 +10,4 @@ ansi_term = "0.12" clap = { version = "4.5", features = ["derive"] } [[bin]] -name = "duration_to_string" \ No newline at end of file +name = "duration_to_string" diff --git a/belleville.txt b/belleville.txt index b64d39e..e64cf79 100644 --- a/belleville.txt +++ b/belleville.txt @@ -5,3 +5,9 @@ 10.12.22.1 8.8.8.8 1.1.1.1 +24.51.235.162 +99.214.0.92 +216.234.202.122 +24.143.184.98 +192.186.110.6 +129.222.197.36 diff --git a/lindsay.txt b/lindsay.txt index a407568..a17fdb2 100644 --- a/lindsay.txt +++ b/lindsay.txt @@ -5,3 +5,9 @@ 10.12.32.1 8.8.8.8 1.1.1.1 +24.51.235.162 +99.214.0.92 +216.234.202.122 +24.143.184.98 +192.186.110.6 +129.222.197.36 diff --git a/src/main.rs b/src/bin/pp.rs similarity index 93% rename from src/main.rs rename to src/bin/pp.rs index 05b26c7..f908d2a 100644 --- a/src/main.rs +++ b/src/bin/pp.rs @@ -7,19 +7,12 @@ use std::str::FromStr; use std::sync::mpsc; use std::time::{Duration, SystemTime}; use clap::Parser; -use crate::manager::Manager; -use crate::ping_result::PingResult; -use crate::state::State; -use crate::target_state::TargetState; - -mod manager; -mod state; -mod target_state; -mod ping_result; -mod ping_request; - -const SECONDS_BETWEEN_DISPLAY: u32 = 1; -const SECONDS_BETWEEN_PING: u32 = 2; +use pp::ping_result::PingResult; +use pp::ping_request::PingRequest; +use pp::manager::Manager; +use pp::SECONDS_BETWEEN_DISPLAY; +use pp::state::State; +use pp::target_state::TargetState; fn read_lines

(filename: P) -> io::Result>> where P: AsRef, { diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..5174034 --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,9 @@ +pub mod manager; +pub mod ping_request; +pub mod ping_result; +pub mod state; +pub mod target_state; + + +pub const SECONDS_BETWEEN_DISPLAY: u32 = 1; +pub const SECONDS_BETWEEN_PING: u32 = 2;