Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLocalIP ¶
Types ¶
type Hop ¶
type Hop struct {
Responses []ProbeResponse
}
type ProbeResponse ¶
type SockExtendedErr ¶
type SockExtendedErr struct { Errno uint32 Origin uint8 Type uint8 Code uint8 Pad uint8 Info uint32 Data uint32 }
TODO: pull from some library? taken from http://lxr.free-electrons.com/source/include/linux/errqueue.h?v=2.6.32#L6
type TracerouteOptions ¶
type TracerouteOptions struct { SourceAddr net.IP SourcePort int DestinationAddr net.IP DestinationPort int // enumerated value of tcp/udp/icmp ProbeType ProbeType // TODO: make the enum // TTL options StartingTTL int // default to 1 MaxTTL int // default to 30 // Probe options ProbeTimeout time.Duration // timeout for a probe -- default 5 ProbeCount int // Number of probes per hop-- default to 3 ProbeWait time.Duration // time to wait between probes -- default 0 ResultChan chan *ProbeResponse // contains filtered or unexported fields }
TODO: size of packet to send
type TracerouteResult ¶
type TracerouteResult struct { Opts *TracerouteOptions Hops []Hop }
TracerouteResult type
func Traceroute ¶
func Traceroute(opts *TracerouteOptions) (TracerouteResult, error)
Main traceroute method, we take in a set of options, and do a traceroute
Click to show internal directories.
Click to hide internal directories.