Documentation ¶
Overview ¶
Package e2e contains definitions common to all e2e tcp tests.
Index ¶
- Constants
- func CheckBrokenUpWrite(t *testing.T, c *context.Context, maxPayload int)
- func CreateConnectedWithSACKAndTS(c *context.Context) *context.RawEndpoint
- func CreateConnectedWithSACKPermittedOption(c *context.Context) *context.RawEndpoint
- func EnableCUBIC(t *testing.T, c *context.Context)
- func SendAndReceiveWithSACK(t *testing.T, c *context.Context, maxPayload int, numPackets int, ...) []byte
- func SetStackSACKPermitted(t *testing.T, c *context.Context, enable bool)
- func SetStackTCPRecovery(t *testing.T, c *context.Context, recovery int)
- func TestV4Connect(t *testing.T, c *context.Context, checkers ...checker.NetworkChecker)
- func TestV6Connect(t *testing.T, c *context.Context, checkers ...checker.NetworkChecker)
Constants ¶
const ( // DefaultMTU is the MTU, in bytes, used throughout the tests, except // where another value is explicitly used. It is chosen to match the MTU // of loopback interfaces on linux systems. DefaultMTU = 65535 // DefaultIPv4MSS is the MSS sent by the network stack in SYN/SYN-ACK for an // IPv4 endpoint when the MTU is set to defaultMTU in the test. DefaultIPv4MSS = DefaultMTU - header.IPv4MinimumSize - header.TCPMinimumSize // TSOptionSize is the size in bytes of the TCP timestamp option. TSOptionSize = 12 // MaxTCPOptionSize is the maximum size TCP Options in a TCP header. MaxTCPOptionSize = 40 )
Variables ¶
This section is empty.
Functions ¶
func CheckBrokenUpWrite ¶
CheckBrokenUpWrite does a large write > than the specified maxPayload and verifies that the received packets carry the expected payload and that the large write was broken up into > 1 packet.
func CreateConnectedWithSACKAndTS ¶
func CreateConnectedWithSACKAndTS(c *context.Context) *context.RawEndpoint
CreateConnectedWithSACKAndTS creates and connects c.ep with the SACK & TS option enabled if the stack in the context has SACK and TS enabled.
func CreateConnectedWithSACKPermittedOption ¶
func CreateConnectedWithSACKPermittedOption(c *context.Context) *context.RawEndpoint
CreateConnectedWithSACKPermittedOption creates and connects c.ep with the SACKPermitted option enabled if the stack in the context has the SACK support enabled.
func EnableCUBIC ¶
EnableCUBIC sets the CUBIC congestion control as the default congestion control algorithm for all newly created endpoints in the context stack.
func SendAndReceiveWithSACK ¶
func SendAndReceiveWithSACK(t *testing.T, c *context.Context, maxPayload int, numPackets int, enableRACK bool) []byte
SendAndReceiveWithSACK creates a SACK enabled connection w/ RACK enabled if enableRACK is true. It then proceeds to write a large payload and verifies that numPackets were received.
func SetStackSACKPermitted ¶
SetStackSACKPermitted sets the tcpip.TCPSACKEnabled option of the context stack to enabled value.
func SetStackTCPRecovery ¶
SetStackTCPRecovery sets the tcpip.TCPRecovery option of the context stack to the specified recovery value.
func TestV4Connect ¶
TestV4Connect establishes an IPv4 Connection with the context stack.
func TestV6Connect ¶
TestV6Connect establishes an IPv6 Connection with the context stack.
Types ¶
This section is empty.