Categorygithub.com/jfreeland/traceroute
modulepackage
0.0.0-20201231181154-2bda1fc58d63
Repository: https://github.com/jfreeland/traceroute.git
Documentation: pkg.go.dev

# README

Traceroute in Go

A traceroute library written in Go.

Must be run as sudo on OS X (and others)?

CLI App

go build cmd/gotraceroute
sudo ./gotraceroute example.com

Library

See the code in cmd/gotraceroute.go for an example of how to use the library from within your application.

The traceroute.Traceroute() function accepts a domain name and an options struct and returns a TracerouteResult struct that holds an array of TracerouteHop structs.

Resources

Useful resources:

Notes

# Packages

No description provided by the author

# Functions

Traceroute uses the given dest (hostname) and options to execute a traceroute from your machine to the remote host.

# Constants

DefaultFirstHop is the default first hop (1).
DefaultMaxHops is the default int of max hops (64).
DefaultPacketSize is the default packet size.
DefaultPort is the default local src port (33434).
DefaultRetries is the default number of times to retry.
DefaultTimeoutMs is the default timeout in ms.

# Structs

Hop type.
Options is the struct for options.
Result is a traceroute result struct.