Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrMissingHost error = errors.New("missing host")
ErrMissingHost occurs when we try to process a response for a destination that's not in the list of destinations.
Functions ¶
This section is empty.
Types ¶
type Continuous ¶
type Continuous struct {
Timeout time.Duration
MaxTTL int
FirstPort int
PortRange int
Destinations []Addr
Generations int
PayloadLength int
// contains filtered or unexported fields
}
Continuous does a continous traceroute for a set of destinations.
func NewContinuous ¶
func NewContinuous(destinations []string, logger log.Interface) *Continuous
NewContinuous returns a new Continuous for monitoring the supplied destinations using the default options. The supplied Logger, if non-nil, will be used for logging. Invalid destinations will be skipped.
func (*Continuous) Reports ¶
func (c *Continuous) Reports() []Report
type Hop ¶
type Hop struct {
// Src is the source (ie, local) address.
Src Addr
// Dst is the destination (ie, remote) address.
Dst Addr
// Node is the node at this step of the route.
Node Addr
// Step is the location of this node in the route, ie the TTL value used.
Step int
// ID is a unique ID that is used to match the original request with the ICMP response.
// It can be derived from either the request or the response.
ID string
// DstPort is the destination port targeted.
DstPort int
// Sent is the time the query began.
Sent time.Time
// Received is the time the query completed.
Received time.Time
// Elapsed is the duration of the query.
Elapsed time.Duration
// Generation is the cycle counter.
Generation int
// contains filtered or unexported fields
}
Hop is a step in the network route between a source and destination address.