sack

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Overview

Package sack has selective ACK-based tracerouting logic

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunSackTraceroute

func RunSackTraceroute(ctx context.Context, p Params) (*result.TracerouteRun, error)

RunSackTraceroute fully executes a SACK traceroute using the given parameters

Types

type NotSupportedError

type NotSupportedError struct {
	Err error
}

NotSupportedError means the target did not respond with the SACK Permitted TCP option, or we couldn't establish a TCP connection to begin with

func (*NotSupportedError) Error

func (e *NotSupportedError) Error() string

func (*NotSupportedError) Unwrap

func (e *NotSupportedError) Unwrap() error

type Params

type Params struct {
	// Target is the IP:port to traceroute
	Target netip.AddrPort
	// HandshakeTimeout is how long to wait for a handshake SYNACK to be seen
	HandshakeTimeout time.Duration
	// FinTimeout is how much extra time to allow for FIN to finish
	FinTimeout time.Duration
	// ParallelParams are the standard params for parallel traceroutes
	ParallelParams common.TracerouteParallelParams
	// LoosenICMPSrc disables checking the source IP/port in ICMP payloads when enabled.
	// Reason: Some environments don't properly translate the payload of an ICMP TTL exceeded
	// packet meaning you can't trust the source address to correspond to your own private IP.
	LoosenICMPSrc bool
	// UseWindowsDriver controls whether to use driver-based packet capture (Windows)
	UseWindowsDriver bool
}

Params is the SACK traceroute parameters

func (Params) MaxTimeout

func (p Params) MaxTimeout() time.Duration

MaxTimeout returns the sum of all timeouts/delays for a SACK traceroute

Jump to

Keyboard shortcuts

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