Module traceroute

Module traceroute 

Source
Expand description

Core traceroute functionality and utilities

This module provides the main traceroute implementation including:

§Error Handling

All traceroute operations return a Result<T, TracerouteError> where TracerouteError is an enum providing structured error information:

  • InsufficientPermissions - Includes what permissions are needed and suggestions
  • NotImplemented - Feature not yet implemented (e.g., TCP traceroute)
  • Ipv6NotSupported - IPv6 targets not yet supported
  • ResolutionError - DNS resolution failed
  • SocketError - Socket creation/operation failed
  • ConfigError - Invalid configuration
  • ProbeSendError - Failed to send probe packet

This design allows library users to handle errors programmatically without parsing error strings.

Re-exports§

pub use async_api::trace_async as trace;
pub use async_api::trace_with_config_async as trace_with_config;
pub use async_api::AsyncTraceroute as Traceroute;
pub use config::TimingConfig;
pub use config::TracerouteConfig;
pub use config::TracerouteConfigBuilder;
pub use error::TracerouteError;
pub use result::TracerouteProgress;
pub use result::TracerouteResult;
pub use types::ClassifiedHopInfo;
pub use types::IspInfo;
pub use types::RawHopInfo;

Modules§

async_api
Async high-level traceroute API
async_engine
Async traceroute engine
config
Configuration types for traceroute operations
error
Error types for traceroute operations
fully_parallel_async_engine
Fully parallel async traceroute engine
isp_from_path
Extract ISP information from traceroute path
result
Result types for traceroute operations
types
Core types for traceroute operations

Structs§

AsnInfo
Autonomous System Number (ASN) information for an IP address

Enums§

SegmentType
Classification of a hop’s network segment

Functions§

is_cgnat
Checks if an IP is in the CGNAT range (100.64.0.0/10).
is_internal_ip
Checks if an IP address is within private/internal ranges.
parse_asn
Parse an ASN string into components
parse_cidr
Parse CIDR notation into Ipv4Net