option

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: GPL-3.0 Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*stack.Stack) error

func WithDefault

func WithDefault() Option

WithDefault sets all default values for stack.

func WithDefaultTTL

func WithDefaultTTL(ttl uint8) Option

WithDefaultTTL sets the default TTL used by stack.

func WithForwarding

func WithForwarding(v bool) Option

WithForwarding sets packet forwarding between NICs for IPv4 & IPv6.

func WithICMPBurst

func WithICMPBurst(burst int) Option

WithICMPBurst sets the number of ICMP messages that can be sent in a single burst.

func WithICMPLimit

func WithICMPLimit(limit rate.Limit) Option

WithICMPLimit sets the maximum number of ICMP messages permitted by rate limiter.

func WithTCPCongestionControl

func WithTCPCongestionControl(cc string) Option

WithTCPCongestionControl sets the current congestion control algorithm.

func WithTCPDelay

func WithTCPDelay(v bool) Option

WithTCPDelay enables or disables Nagle's algorithm in TCP.

func WithTCPModerateReceiveBuffer

func WithTCPModerateReceiveBuffer(v bool) Option

WithTCPModerateReceiveBuffer sets receive buffer moderation for TCP.

func WithTCPReceiveBufferSize

func WithTCPReceiveBufferSize(size int) Option

WithTCPReceiveBufferSize sets the default receive buffer size for TCP.

func WithTCPReceiveBufferSizeRange

func WithTCPReceiveBufferSizeRange(a, b, c int) Option

WithTCPReceiveBufferSizeRange sets the receive buffer size range for TCP.

func WithTCPRecovery

func WithTCPRecovery(v tcpip.TCPRecovery) Option

WithTCPRecovery sets the recovery option for TCP.

func WithTCPSACKEnabled

func WithTCPSACKEnabled(v bool) Option

WithTCPSACKEnabled sets the SACK option for TCP.

func WithTCPSendBufferSize

func WithTCPSendBufferSize(size int) Option

WithTCPSendBufferSize sets default the send buffer size for TCP.

func WithTCPSendBufferSizeRange

func WithTCPSendBufferSizeRange(a, b, c int) Option

WithTCPSendBufferSizeRange sets the send buffer size range for TCP.

Jump to

Keyboard shortcuts

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