traceroute

package
v0.0.0-...-a62dbf7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2016 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FIN = 1 << 0
	SYN = 1 << 1
	RST = 1 << 2
	PSH = 1 << 3
	ACK = 1 << 4
	URG = 1 << 5
)

TCP flags

Variables

This section is empty.

Functions

func ICMPReceiver

func ICMPReceiver(done <-chan struct{}, af string, srcAddr net.IP) (chan interface{}, error)

ICMPReceiver runs on its own collecting ICMP responses until its explicitly told to stop

func Resolver

func Resolver(input chan interface{}) (chan interface{}, error)

func TCPReceiver

func TCPReceiver(done <-chan struct{}, af, targetAddr string, srcAddr *net.IP,
	probePortStart, probePortEnd, targetPort, maxTTL int) (chan interface{}, error)

TCPReceiver Feeds on TCP RST messages we receive from the end host; we use lots of parameters to check if the incoming packet is actually a response to our probe. We create TCPResponse structs and emit them on the output channel

Types

type ICMPResponse

type ICMPResponse struct {
	Probe
	// contains filtered or unexported fields
}

type Probe

type Probe struct {
	// contains filtered or unexported fields
}

type TCPHeader

type TCPHeader struct {
	Source      uint16
	Destination uint16
	SeqNum      uint32
	AckNum      uint32
	DataOffset  uint8 // 4 bits
	Reserved    uint8 // 6 bits
	Flags       uint8 // 6 bits
	Window      uint16
	Checksum    uint16
	Urgent      uint16
}

TCPHeader defines the TCP header struct

func (*TCPHeader) Serialize

func (tcp *TCPHeader) Serialize() []byte

Serialize emits raw bytes for the header

type TCPResponse

type TCPResponse struct {
	Probe
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL