traceroute

package
v1.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPacketSize = 52
	DefaultHopTimeout = 5 * time.Second
	DefaultMaxHops    = 20
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Hop

type Hop struct {
	Seq  int
	Info []HopInfo
}

Hop represents a network hop in a traceroute result

func (Hop) IPs

func (h Hop) IPs() []net.IP

func (Hop) RTTs

func (h Hop) RTTs() []time.Duration

func (Hop) String

func (h Hop) String() string

type HopInfo

type HopInfo struct {
	IP  net.IP
	RTT time.Duration
}

type Tracer

type Tracer struct {
	PacketSize uint16
	HopTimeout time.Duration
	MaxHops    int
}

func (*Tracer) Trace

func (t *Tracer) Trace(ctx context.Context, dest net.IP, c chan Hop) error

Jump to

Keyboard shortcuts

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