traceroute

package
v0.0.0-...-6f44a9b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTTL  = 30
	TimeOut = 10 * time.Second
)

Variables

This section is empty.

Functions

func NewTrace

func NewTrace(raddr *net.IPAddr) (*trace, error)

func NewTraceError

func NewTraceError(msg string) *traceError

Types

type TraceResponse

type TraceResponse struct {
	Src         net.IP
	Dst         net.IP
	Seq         int
	ID          int
	TTL         int // time-to-live
	SendTime    time.Time
	ReceiveTime time.Time
}

type TraceResult

type TraceResult struct {
}

type TraceRoute

type TraceRoute interface {
	SendPacket(ttl int) (*TraceResponse, error)
	RecievePacket() (*TraceResponse, error)
}

func NewTraceIcmpV4

func NewTraceIcmpV4(raddr *net.IPAddr, timeout time.Duration) (TraceRoute, error)

Jump to

Keyboard shortcuts

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