Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // NumProbes determines the number of probes we're sending for a given TTL. NumProbes int // TTLStart determines the TTL at which we start sending trace packets. TTLStart int // TTLEnd determines the TTL at which we stop sending trace packets. TTLEnd int // SnapLen determines the number of bytes per frame that we want libpcap to // capture. 500 bytes is enough for ICMP TTL exceeded packets. SnapLen int32 // PktBufTimeout determines the time we're willing to wait for packets to // accumulate in our receive buffer. PktBufTimeout time.Duration // Interface determines the network interface that we're going to use to // listen for incoming network packets. Interface string }
Config holds configuration options for the ZeroTrace object.
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
NewDefaultConfig returns a configuration object containing the following defaults. *Note* that you probably need to change the networking interface.
NumProbes: 3 TTLStart: 5 TTLEnd: 32 SnapLen: 500 PktBufTimeout: time.Millisecond * 10 Interface: "eth0"
type ZeroTrace ¶
type ZeroTrace struct {
// contains filtered or unexported fields
}
ZeroTrace implements the 0trace traceroute technique: https://seclists.org/fulldisclosure/2007/Jan/145
func NewZeroTrace ¶
NewZeroTrace returns a new ZeroTrace object that uses the given configuration.
func (*ZeroTrace) CalcRTT ¶
CalcRTT starts a new 0trace traceroute and returns the RTT to the target or, if the target won't respond to us, the RTT of the hop that's closest. The given net.Conn represents an already-established TCP connection to the target. Note that the TCP connection may be corrupted as part of the 0trace measurement.