Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOptions = &Options{ DestinationPort: 33434, MaxHops: 30, NumProbes: 3, ProbeMaxWaitDuration: 500 * time.Millisecond, PacketLength: 60, }
Default options for the Tracer
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // "Unlikely" destination port to use when tracing. DestinationPort uint16 // Specifies the maximum number of hops (max time-to-live) the // Tracer will probe. MaxHops int // Specifies the number of probes to send per hop. NumProbes uint // Specifies how long to wait for a response to a probe. ProbeMaxWaitDuration time.Duration // PacketLength represents the size of the probe packets PacketLength int }
Options provide configuration settings for the Tracer.
type Probe ¶
type Probe struct { // Start time of the probe Start time.Time // End time of the probe End time.Time // IP of the discovered hop Hop net.IP // TTL of the probe TTL int // Error provides the error which may have occurred during // tracing Error error }
Probe represents a trace probe
type SockExtendedErr ¶
type SockExtendedErr struct { Errno uint32 Origin uint8 Type uint8 Code uint8 Pad uint8 Info uint32 Data uint32 }
See https://github.com/torvalds/linux/blob/master/include/uapi/linux/errqueue.h#L15
type SockExtendedErrorOrigin ¶
type SockExtendedErrorOrigin uint8
See https://github.com/torvalds/linux/blob/master/include/uapi/linux/errqueue.h#L28
const ( SockExtendedErrorOriginNone SockExtendedErrorOrigin = iota SockExtendedErrorOriginLocal SockExtendedErrorOriginICMP SockExtendedErrorOriginICMP6 SockExtendedErrorOriginTxStatus SockExtendedErrorOriginZeroCopy SockExtendedErrorOriginTxTime SockExtendedErrorOriginTimestamp = SockExtendedErrorOriginTxStatus )
Click to show internal directories.
Click to hide internal directories.