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
//! winping - Easy ICMP Echo for Windows, and no elevated rights required!
//!
//! Published on crates.io as `winping-rs`, a maintained fork of the `winping` crate and a drop-in
//! replacement for it. The library target keeps the name `winping`, so `use winping::...` works
//! unchanged.
//!
//! Super basic ping.exe example
//!
//! ```rust
//! use std::net::IpAddr;
//! use winping::{Buffer, Pinger};
//!
//! fn main() {
//! let dst = std::env::args()
//! .nth(1)
//! .unwrap_or(String::from("127.0.0.1"))
//! .parse::<IpAddr>()
//! .expect("Could not parse IP Address");
//!
//! let pinger = Pinger::new().unwrap();
//! let mut buffer = Buffer::new();
//!
//! for _ in 0..4 {
//! match pinger.send(dst, &mut buffer) {
//! Ok(rtt) => println!("Response time {} ms.", rtt),
//! Err(err) => println!("{}.", err),
//! }
//! }
//! }
//! ```
//!
pub
pub use ;
pub use Buffer;
pub use Error;
// Only the integration tests use `futures`; acknowledge it for the lib's own
// test target, which still exists for doctests and util's unit test.
use futures as _;
pub use ;