#network #networking

tracert

Cross-platform library for traceroute and ping

11 releases (7 breaking)

0.7.0 Aug 17, 2023
0.5.2 Jul 16, 2023
0.4.1 Aug 28, 2022
0.3.1 May 7, 2022

#1258 in Network programming

Download history 286/week @ 2023-08-17 31/week @ 2023-08-24 272/week @ 2023-08-31 208/week @ 2023-09-07 199/week @ 2023-09-14 32/week @ 2023-09-21 140/week @ 2023-09-28 194/week @ 2023-10-05 196/week @ 2023-10-12 132/week @ 2023-10-19 52/week @ 2023-10-26 189/week @ 2023-11-02 198/week @ 2023-11-09 167/week @ 2023-11-16 1637/week @ 2023-11-23 734/week @ 2023-11-30

2,762 downloads per month
Used in 4 crates (3 directly)

MIT license

85KB
2K SLoC

tracert Crates.io License

Cross-platform library for traceroute and ping. Written in Rust.

Features

  • traceroute
    • IPv4 UDP
    • IPv6 UDP
  • ping
    • IPv4 ICMPv4
    • IPv6 ICMPv6
    • IPv4 UDP
    • IPv6 UDP
    • IPv4 TCP
    • IPv6 TCP

Usage

Add tracert to your dependencies

[dependencies]
tracert = "0.7"

Note for Windows users

You may need to set up firewall rules that allow ICMP Time-to-live Exceeded and ICMP Destination (Port) Unreachable packets to be received.

netsh example

netsh advfirewall firewall add rule name="All ICMP v4" dir=in action=allow protocol=icmpv4:any,any
netsh advfirewall firewall add rule name="All ICMP v6" dir=in action=allow protocol=icmpv6:any,any

Additional Notes

This library requires the ability to create raw sockets. Execute with administrator privileges.

Dependencies

~3–39MB
~570K SLoC