async_arp/lib.rs
1//! ## Example: Probing Hosts in a Network Range with Retry Capabilities
2//!
3//! This example demonstrates probing all hosts in a given network range (e.g., an IPv4 subnet) with retry capabilities,
4//! using [`ClientSpinner`] to batch the probes. This approach allows for retrying failed probes across the entire network range.
5//! To run this example locally, make sure to specify the network interface (e.g., `eth0` or `wlan0`) as a parameter.
6//!
7//! ```ignore
8//! use common;
9#![doc = include_str!("../examples/probe-spinner.rs")]
10//! ```
11//!
12//! ## Example 2: Using [`Client`] for Single Probe Requests
13//!
14//! When more granular control over the execution order is needed, or if only a single probe or request is desired,
15//! you can use [`Client`] instead of [`ClientSpinner`]. This approach is useful for cases when you want to handle
16//! each probe individually or when finer control is needed over how the futures are driven to completion.
17//!
18//! ```ignore
19//! use common;
20#![doc = include_str!("../examples/probe-client.rs")]
21//! ```
22//!
23//! ## Advanced ARP Requests (Diagnostic Purposes)
24//!
25//! In a similar fashion, more advanced ARP requests (e.g., for diagnostic purposes) can be sent using either
26//! [`ClientSpinner::request_batch`] or [`Client::request`]. The former allows for batching multiple ARP requests,
27//! while the latter provides more control over individual requests. Both approaches enable sending specific ARP requests tailored
28//! to your network diagnostic needs.
29//!
30mod client;
31mod error;
32mod probe;
33mod request;
34
35pub use client::{Client, ClientConfig, ClientConfigBuilder, ClientSpinner};
36pub use error::{Error, InputBuildError, OpaqueError, Result};
37pub use probe::{ProbeInput, ProbeInputBuilder, ProbeOutcome, ProbeStatus};
38pub use request::{RequestInput, RequestInputBuilder, RequestOutcome};
39
40pub(crate) mod caching;
41pub(crate) mod constants;
42pub(crate) mod notification;
43pub(crate) mod response;