Documentation ¶
Overview ¶
Package tracer takes care of all interactions with the traceroute tools, currently only scamper. This package supports two types of traceroutes among the many that scamper can run: MDA and regular:
- MDA traceroute (tracelb) finds load balanced paths between two addresses by varying the first 4 bytes of the transport header, but keeping the first 4 bytes constant when probing consecutive hops. the -P parameter to tracelb says what type of probes to send, and while the names have overlap with the -P parameter to trace, they mean different things.
- Regular traceroute using Paris algorithm (trace -P icmp-paris) finds a single path between two addresses by keeping the first 4 bytes of the transport header constant.
See scamper's man page for more details.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyUUID is returned when a required UUID is empty. ErrEmptyUUID = errors.New("uuid is empty") )
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { UUID string TracerouteCallerVersion string CachedResult bool CachedUUID string }
Metadata is the first line of the traceroute .jsonl file.
TODO: move this struct to ETL parser.
type Scamper ¶ added in v0.5.0
type Scamper struct {
// contains filtered or unexported fields
}
Scamper invokes an instance of the scamper tool for each traceroute.
func NewScamper ¶ added in v0.10.0
func NewScamper(cfg ScamperConfig) (*Scamper, error)
NewScamper validates the specified scamper configuration and, if successful, returns a new Scamper instance. Otherwise, it returns nil and an error.
func (*Scamper) CachedTrace ¶ added in v0.10.0
CachedTrace creates an updated traceroute using the given uuid and time based on the traceroute cache.
func (*Scamper) DontTrace ¶ added in v0.5.0
func (*Scamper) DontTrace()
DontTrace is called when a previous traceroute that we were waiting for fails. It increments a counter that tracks the number of these failures.