traceroute

package
v0.0.0-...-9842712 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 14, 2019 License: Apache-2.0, ISC, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_MAX_HOPS = 30
View Source
const DEFAULT_PACKET_SIZE = 52
View Source
const DEFAULT_PORT = 33434
View Source
const DEFAULT_RETRIES = 3
View Source
const DEFAULT_TIMEOUT_MS = 500

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route map[int]string

func Traceroute

func Traceroute(ip net.IP, options *TracerouteOptions) Route

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

Outbound packets are UDP packets and inbound packets are ICMP.

Returns a TracerouteResult which contains an array of hops. Each hop includes the elapsed time and its IP address.

type TracerouteOptions

type TracerouteOptions struct {
	// contains filtered or unexported fields
}

TracrouteOptions type

func (*TracerouteOptions) MaxHops

func (options *TracerouteOptions) MaxHops() int

func (*TracerouteOptions) Retries

func (options *TracerouteOptions) Retries() int

func (*TracerouteOptions) SetMaxHops

func (options *TracerouteOptions) SetMaxHops(maxHops int)

func (*TracerouteOptions) SetRetries

func (options *TracerouteOptions) SetRetries(retries int)

func (*TracerouteOptions) SetTimeoutMs

func (options *TracerouteOptions) SetTimeoutMs(timeoutMs int)

func (*TracerouteOptions) TimeoutMs

func (options *TracerouteOptions) TimeoutMs() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL