hopr_transport_probe/
lib.rs

1//! The crate provides the probing functionality used by the transport layer
2//! to identify different attributes of possible transport paths in the network.
3//!
4//! The goal of probing is to establish a map with weighted properties that will
5//! allow the caller to optimize transport, verify transport path properties and
6//! lay groundworks for mitigating potential adversarial behavior.
7//!
8//! There are 2 fundamental types of probing:
9//! 1. **Immediate hop probing** - collects telemetry for direct 0-hop neighbors. Such telemetry can be identified and
10//!    potentially gamed by an adversary, but it is still useful to identify the basic properties of the most immediate
11//!    connection to the neighbor, since in the worst case scenario the mitigation strategy can discard unsuitable
12//!    peers.
13//!
14//! 2. **Multi-hop probing** - collects telemetry using a probing mechanism based on looping. A loop is a message sent
15//!    by this peer to itself through different pre-selected peers. This probing mechanism can be combined together with
16//!    the cover traffic into a single mechanism improving the network view.
17//!
18//!
19//! Probing is fully configurable mechanism and **MAY** be used as a dispersion for the `Cover Traffic`.
20
21pub mod config;
22pub mod content;
23pub mod errors;
24pub mod ping;
25pub mod probe;
26pub mod types;
27
28pub use hopr_api::ct::{
29    traits::TrafficGeneration,
30    types::{Telemetry, TrafficGenerationError},
31};
32
33pub use crate::{
34    config::ProbeConfig, content::Message as TrafficReturnedObservation, probe::Probe, types::NeighborTelemetry,
35};
36
37#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, strum::Display)]
38pub enum HoprProbeProcess {
39    #[strum(to_string = "probe emission")]
40    Emit,
41    #[strum(to_string = "probe processing")]
42    Process,
43}