traceroute

package
v0.0.0-...-9dae73e Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolICMP     = 1
	ProtocolTCP      = 6
	ProtocolUDP      = 17
	ProtocolIPv6ICMP = 58
)

IANA Assigned Internet Protocol Numbers

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Delay   time.Duration
	Timeout time.Duration
	MaxHops int
	Count   int
	Network string
	Addr    *net.IPAddr
}

type Reply

type Reply struct {
	IP   net.IP
	RTT  time.Duration
	Hops int
}

type Session

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

func (*Session) Close

func (s *Session) Close()

func (*Session) Ping

func (s *Session) Ping(ttl int) error

func (*Session) Receive

func (s *Session) Receive() <-chan *Reply

type Tracer

type Tracer struct {
	Config

	Retries          int
	PingsPerformed   *int32
	PingsReceived    *int32
	RetriesPerformed *int32
	// contains filtered or unexported fields
}

func (*Tracer) Close

func (t *Tracer) Close()

func (*Tracer) NewSession

func (t *Tracer) NewSession(ip net.IP) (*Session, error)

func (*Tracer) Trace

func (t *Tracer) Trace(ctx context.Context, ip net.IP) ([]Reply, error)

Jump to

Keyboard shortcuts

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