Documentation
¶
Index ¶
- Constants
- func DestAddr(dest, proto string) (net.IP, error)
- func DestTTL(printMap map[int]*Probe) int
- func RunTraceroute(f *Flags) error
- func SrcAddr(proto string) (*net.IP, error)
- type Args
- type Coms
- type Flags
- type ICMPHeader
- type Probe
- type TCPHeader
- type Trace
- func (t *Trace) BuildICMP4Pkt(ttl uint8, id, seq uint16, tos int) (*ipv4.Header, []byte)
- func (t *Trace) BuildICMP6Pkt(ttl int, id uint16, seq uint16, tc int) (*ipv6.ControlMessage, []byte)
- func (t *Trace) BuildTCP4SYNPkt(srcPort uint16, dstPort uint16, ttl uint8, seq uint32, tos int) (*ipv4.Header, []byte)
- func (t *Trace) BuildTCP6SYNPkt(sport, dport, ttl uint16, seq uint32, tc int) (*ipv6.ControlMessage, []byte)
- func (t *Trace) BuildUDP4Pkt(srcPort uint16, dstPort uint16, ttl uint8, id uint16, tos int) (*ipv4.Header, []byte)
- func (t *Trace) BuildUDP6Pkt(sport, dport uint16, ttl uint8, id uint16, tos int) (*ipv6.ControlMessage, []byte)
- func (t *Trace) IPv4TCPPing(seq uint32, dport uint16)
- func (t *Trace) IPv4TCPProbe(dport uint16)
- func (t *Trace) IPv6TCPPing(seq uint32, dport uint16)
- func (t *Trace) IPv6TCPProbe(dport uint16)
- func (t *Trace) ReceiveTraceICMP6()
- func (t *Trace) ReceiveTracesICMP4()
- func (t *Trace) ReceiveTracesTCP4()
- func (t *Trace) ReceiveTracesTCP4ICMP()
- func (t *Trace) ReceiveTracesTCP6()
- func (t *Trace) ReceiveTracesTCP6ICMP()
- func (t *Trace) ReceiveTracesUDP4()
- func (t *Trace) ReceiveTracesUDP6()
- func (t *Trace) SendTracesICMP4()
- func (t *Trace) SendTracesICMP6()
- func (t *Trace) SendTracesTCP4()
- func (t *Trace) SendTracesTCP6()
- func (t *Trace) SendTracesUDP4()
- func (t *Trace) SendTracesUDP6()
- type UDPHeader
Constants ¶
View Source
const ( MAXDATALEN = 65000 DEFAULTDATALEN = 40 DEFFIRSTHOP = 1 MAXHOPS = 255 DEFSIMPROBES = 16 DEFNUMPROBES = 3 DEFPORT = 0 DEFTCPPORT = 80 DEFWAITSEC = 5 DEFHEREFACTOR = 3 DEFNEARFACTOR = 10 DEFSENDSECS = 0 DEFMODULE = "default" IPV4HdrMinLen = 20 IPV6HdrLen = 40 TCPDEFPORT = 443 UDPDEFPORT = 33434 DEFNUMHOPS = 20 DEFNUMTRACES = 3 )
View Source
const ( TCP_FIN = 1 << 0 TCP_SYN = 1 << 1 TCP_RST = 1 << 2 TCP_PSH = 1 << 3 TCP_ACK = 1 << 4 TCP_URG = 1 << 5 )
View Source
const ( DNSIPv6 = "[2001:4860:4860::8844]" DNSIPv4 = "8.8.8.8" )
Variables ¶
This section is empty.
Functions ¶
func RunTraceroute ¶
Types ¶
type ICMPHeader ¶
type Probe ¶
type TCPHeader ¶
type Trace ¶
type Trace struct {
DestIP net.IP
// See --port in traceroute(8):
// For UDP tracing, specifies the destination port base traceroute will use (the destination port number
// will be incremented by each probe).
// For ICMP tracing, specifies the initial ICMP sequence value (incremented by each probe too).
// For TCP and others specifies just the (constant) destination port to connect.
DestPort uint16
SrcIP net.IP
PortOffset int32
MaxHops int
SendChan chan<- *Probe
ReceiveChan chan<- *Probe
TracesPerHop int
PacketRate int
ICMPSeqStart uint16
}
func (*Trace) BuildICMP4Pkt ¶
func (*Trace) BuildICMP6Pkt ¶
func (*Trace) BuildTCP4SYNPkt ¶
func (*Trace) BuildTCP6SYNPkt ¶
func (*Trace) BuildUDP4Pkt ¶
func (*Trace) BuildUDP6Pkt ¶
func (*Trace) IPv4TCPPing ¶
func (*Trace) IPv4TCPProbe ¶
func (*Trace) IPv6TCPPing ¶
func (*Trace) IPv6TCPProbe ¶
func (*Trace) ReceiveTraceICMP6 ¶
func (t *Trace) ReceiveTraceICMP6()
func (*Trace) ReceiveTracesICMP4 ¶
func (t *Trace) ReceiveTracesICMP4()
func (*Trace) ReceiveTracesTCP4 ¶
func (t *Trace) ReceiveTracesTCP4()
func (*Trace) ReceiveTracesTCP4ICMP ¶
func (t *Trace) ReceiveTracesTCP4ICMP()
func (*Trace) ReceiveTracesTCP6 ¶
func (t *Trace) ReceiveTracesTCP6()
func (*Trace) ReceiveTracesTCP6ICMP ¶
func (t *Trace) ReceiveTracesTCP6ICMP()
func (*Trace) ReceiveTracesUDP4 ¶
func (t *Trace) ReceiveTracesUDP4()
func (*Trace) ReceiveTracesUDP6 ¶
func (t *Trace) ReceiveTracesUDP6()
func (*Trace) SendTracesICMP4 ¶
func (t *Trace) SendTracesICMP4()
func (*Trace) SendTracesICMP6 ¶
func (t *Trace) SendTracesICMP6()
func (*Trace) SendTracesTCP4 ¶
func (t *Trace) SendTracesTCP4()
func (*Trace) SendTracesTCP6 ¶
func (t *Trace) SendTracesTCP6()
func (*Trace) SendTracesUDP6 ¶
func (t *Trace) SendTracesUDP6()
Click to show internal directories.
Click to hide internal directories.