Documentation ¶
Overview ¶
Package common contains common functionality for both TCP and UDP traceroute implementations
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LocalAddrForHost ¶
LocalAddrForHost takes in a destionation IP and port and returns the local address that should be used to connect to the destination. The returned connection should be closed by the caller when the the local UDP port is no longer needed
Types ¶
type CanceledError ¶
type CanceledError string
CanceledError is sent when a listener is canceled
func (CanceledError) Error ¶
func (c CanceledError) Error() string
Error implements the error interface for CanceledError
type Hop ¶
type Hop struct { IP net.IP Port uint16 ICMPType layers.ICMPv4TypeCode RTT time.Duration IsDest bool }
Hop encapsulates information about a single hop in a traceroute
type MatcherFunc ¶
MatcherFunc defines functions for matching a packet from the wire to a traceroute based on the source/destination addresses and an identifier
type MismatchError ¶
type MismatchError string
MismatchError is an error type that indicates a MatcherFunc failed due to one or more fields from the packet not matching the expected information
func (MismatchError) Error ¶
func (m MismatchError) Error() string
Error implements the error interface for MismatchError