Expand description
Trippy - A network tracing library.
This crate provides the core network tracing facility used by the standalone Trippy application.
Note: the public API is not stable and is highly likely to change in the future.
§Example
The following example builds and runs a tracer with default configuration and prints out the tracing data for each round:
use trippy_core::Builder;
let addr = IpAddr::from_str("1.1.1.1")?;
Builder::new(addr)
.build()?
.run_with(|round| println!("{:?}", round))?;The following example traces using the UDP protocol with the Dublin ECMP strategy with fixed src and dest ports. It also operates in unprivileged mode (only supported on some platforms):
use trippy_core::{Builder, MultipathStrategy, Port, PortDirection, PrivilegeMode, Protocol};
let addr = IpAddr::from_str("1.1.1.1")?;
Builder::new(addr)
.privilege_mode(PrivilegeMode::Unprivileged)
.protocol(Protocol::Udp)
.multipath_strategy(MultipathStrategy::Dublin)
.port_direction(PortDirection::FixedBoth(Port(33434), Port(3500)))
.build()?
.run_with(|round| println!("{:?}", round))?;§See Also
Builder- Build aTracer.Tracer::run- Run the tracer on the current thread.Tracer::run_with- Run the tracer with a custom round handler.Tracer::spawn- Run the tracer on a new thread.Tracer::spawn_with- Run the tracer on a new thread with a custom round handler.
Modules§
- Default values for configuration.
Structs§
- Build a tracer.
- The ICMP extensions for a probe response.
- Probe flags.
- Identifies a tracing
Flow. - Information about a single
Hopwithin aTrace. MaxInflightnewtype.MaxRoundnewtype.- The members of a MPLS probe response extension.
- A member of a MPLS probe response extension.
PacketSizenewtype.PayloadPatternnewtype.- Port newtype.
- An incomplete network tracing probe.
- A complete network tracing probe.
- The output from a round of tracing.
Roundnewtype.Sequencenumber newtype.- The state of a trace.
- Trace a path to a target.
TimeToLive(ttl) newtype.TraceIdnewtype.- A traceroute implementation.
TypeOfService(akaDSCP&ECN) newtype.- An unknown ICMP extension.
Enums§
- Indicates what triggered the completion of the tracing round.
- A tracer error.
- A probe response extension.
- An entry in a
Flow. - The ICMP extension parsing mode.
- The type of ICMP packet received.
- The Equal-cost Multi-Path routing strategy.
- The state of a NAT detection for a
Hop. - Whether to fix the src, dest or both ports for a trace.
- The privilege mode.
- A network tracing probe.
- The tracing protocol.
Constants§
- The maximum time-to-live value allowed.