package
0.0.0-20240720002214-37b2b8227b91
Repository: https://github.com/progrium/go-netstack.git
Documentation: pkg.go.dev

# Functions

FindWndScale determines the window scale to use for the given maximum window size.
GetTCPReceiveBufferLimits is used to get send buffer size limits for TCP.
GetTCPSendBufferLimits is used to get send buffer size limits for TCP.
NewForwarder allocates and initializes a new forwarder with the given maximum number of in-flight connection attempts.
NewProtocol returns a TCP transport protocol.
NewSACKScoreboard returns a new SACK Scoreboard.
TrimSACKBlockList updates the sack block list by removing/modifying any block where start is < rcvNxt.
UpdateSACKBlocks updates the list of SACK blocks to include the segment specified by segStart->segEnd.

# Constants

DefaultKeepaliveCount is the number of keep-alive probes that are sent before declaring the connection dead.
DefaultKeepaliveIdle is the idle time for a connection before keep-alive probes are sent.
DefaultKeepaliveInterval is the time between two successive keep-alive probes.
1MB.
1MB.
DefaultSynRetries is the default value for the number of SYN retransmits before a connect is aborted.
DefaultTCPLingerTimeout is the amount of time that sockets linger in FIN_WAIT_2 state before being marked closed.
DefaultTCPTimeWaitTimeout is the amount of time that sockets linger in TIME_WAIT state before being marked closed.
InitialCwnd is the initial congestion window.
InitialRTO is the initial retransmission timeout.
4MB.
MaxRetries is the maximum number of probe retries sender does before timing out the connection.
MaxRTO is the maximum allowed value for the retransmit timeout.
MaxSACKBlocks is the maximum number of SACK blocks stored at receiver side.
MaxTCPLingerTimeout is the maximum amount of time that sockets linger in FIN_WAIT_2 state before being marked closed.
4096 bytes.
MinRTO is the minimum allowed value for the retransmit timeout.
MinSRTT is the minimum allowed value for smoothed RTT.
ProtocolNumber is the tcp protocol number.
SegOverheadFactor is used to multiply the value provided by the user on a SetSockOpt for setting the socket send/receive buffer sizes.
SegOverheadSize is the size of an empty seg in memory including packet buffer overhead.
Endpoint states.
Endpoint states.
Endpoint states.
Endpoint states.
Connect() called, but the initial SYN hasn't been sent.
Endpoint states.
TCP protocol states in sync with the definitions in https://github.com/torvalds/linux/blob/7acac4b3196/include/net/tcp_states.h#L13.
Endpoint states.
Endpoint states.
Endpoint states internal to netstack.
Endpoint states.
Endpoint states.
Endpoint states.
Endpoint states.
Endpoint states.

# Structs

Forwarder is a connection request forwarder, which allows clients to decide what to do with a connection request, for example: ignore it, send a RST, or attempt to complete the 3-way handshake.
ForwarderRequest represents a connection request received by the forwarder and passed to the client.
ReceiveErrors collect segment receive errors within transport layer.
SACKInfo holds TCP SACK related information for a given endpoint.
SACKScoreboard stores a set of disjoint SACK ranges.
SendErrors collect segment send errors within the transport layer.
Stats holds statistics about the endpoint.

# Type aliases

EndpointState represents the state of a TCP endpoint.