Documentation
¶
Overview ¶
Package traceroute implements tracerouting based on SCMP traceroute messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Dispatcher reliable.Dispatcher
Local *snet.UDPAddr
MTU uint16
PathEntry snet.Path
PayloadSize uint
Remote *snet.UDPAddr
Timeout time.Duration
// ProbesPerHop indicates how many probes should be done per hop.
ProbesPerHop int
// ErrHandler is invoked for every error that does not cause tracerouting to
// abort. Execution time must be small, as it is run synchronously.
ErrHandler func(error)
// Update handler is invoked for every hop. Execution time must be
// small, as it is run synchronously.
UpdateHandler func(Update)
}
Config configures the traceroute run.
type Stats ¶
type Stats struct {
Sent, Recv uint
}
Stats contains the amount of sent and received packets.
type Update ¶
type Update struct {
// Index indicates the hop index in the path.
Index int
// Remote is the remote router.
Remote *snet.UDPAddr
// Interface is the interface ID of the remote router.
Interface uint64
// RTTs are the RTTs for this hop. To detect whether there was a timeout the
// value of the RTT can be compared against the timeout value from the
// configuration.
RTTs []time.Duration
}
Update contains the information for a single hop.
Click to show internal directories.
Click to hide internal directories.