Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const StackPort + const TestInitialSequenceNumber + const TestPort + var StackAddr = tcpip.AddrFromSlice([]byte("\x0a\x00\x00\x01")) + var StackAddrWithPrefix = tcpip.AddressWithPrefix + var StackV4MappedAddr = tcpip.AddrFromSlice([]byte(...)) + var StackV6Addr = tcpip.AddrFromSlice([]byte("\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01")) + var StackV6AddrWithPrefix = tcpip.AddressWithPrefix + var TestAddr = tcpip.AddrFromSlice([]byte("\x0a\x00\x00\x02")) + var TestV4MappedAddr = tcpip.AddrFromSlice([]byte(...)) + var TestV6Addr = tcpip.AddrFromSlice([]byte("\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02")) + var V4MappedWildcardAddr = tcpip.AddrFromSlice([]byte("\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\x00\x00\x00\x00")) + type Context struct + EP tcpip.Endpoint + IRS seqnum.Value + Port uint16 + RcvdWindowScale uint8 + TimeStampEnabled bool + WQ waiter.Queue + WindowScale uint8 + func New(t *testing.T, mtu uint32) *Context + func NewWithOpts(t *testing.T, opts Options) *Context + func (c *Context) AcceptWithOptions(wndScale int, synOptions header.TCPSynOptions, delay time.Duration) *RawEndpoint + func (c *Context) AcceptWithOptionsNoDelay(wndScale int, synOptions header.TCPSynOptions) *RawEndpoint + func (c *Context) BuildSegment(payload []byte, h *Headers) buffer.Buffer + func (c *Context) BuildSegmentWithAddrs(payload []byte, h *Headers, src, dst tcpip.Address) buffer.Buffer + func (c *Context) CheckNoPacket(errMsg string) + func (c *Context) CheckNoPacketTimeout(errMsg string, wait time.Duration) + func (c *Context) Cleanup() + func (c *Context) CloseNoWait() + func (c *Context) Connect(iss seqnum.Value, rcvWnd seqnum.Size, options []byte) + func (c *Context) Create(epRcvBuf int) + func (c *Context) CreateConnected(iss seqnum.Value, rcvWnd seqnum.Size, epRcvBuf int) + func (c *Context) CreateConnectedWithOptions(wantOptions header.TCPSynOptions, delay time.Duration) *RawEndpoint + func (c *Context) CreateConnectedWithOptionsNoDelay(wantOptions header.TCPSynOptions) *RawEndpoint + func (c *Context) CreateConnectedWithRawOptions(iss seqnum.Value, rcvWnd seqnum.Size, epRcvBuf int, options []byte) + func (c *Context) CreateV6Endpoint(v6only bool) + func (c *Context) GetPacket() *buffer.View + func (c *Context) GetPacketNonBlocking() *buffer.View + func (c *Context) GetPacketWithTimeout(timeout time.Duration) *buffer.View + func (c *Context) GetV6Packet() *buffer.View + func (c *Context) MSSWithoutOptions() uint16 + func (c *Context) MSSWithoutOptionsV6() uint16 + func (c *Context) PassiveConnect(maxPayload, wndScale int, synOptions header.TCPSynOptions) + func (c *Context) PassiveConnectWithOptions(maxPayload, wndScale int, synOptions header.TCPSynOptions, delay time.Duration) *RawEndpoint + func (c *Context) ReceiveAndCheckPacket(data []byte, offset, size int) + func (c *Context) ReceiveAndCheckPacketWithOptions(data []byte, offset, size, optlen int) + func (c *Context) ReceiveNonBlockingAndCheckPacket(data []byte, offset, size int) bool + func (c *Context) SACKEnabled() bool + func (c *Context) SendAck(seq seqnum.Value, bytesReceived int) + func (c *Context) SendAckWithSACK(seq seqnum.Value, bytesReceived int, sackBlocks []header.SACKBlock) + func (c *Context) SendICMPPacket(typ header.ICMPv4Type, code header.ICMPv4Code, p1, p2 *buffer.View, ...) + func (c *Context) SendPacket(payload []byte, h *Headers) + func (c *Context) SendPacketWithAddrs(payload []byte, h *Headers, src, dst tcpip.Address) + func (c *Context) SendSegment(s buffer.Buffer) + func (c *Context) SendV6Packet(payload []byte, h *Headers) + func (c *Context) SendV6PacketWithAddrs(payload []byte, h *Headers, src, dst tcpip.Address) + func (c *Context) SetGSOEnabled(enable bool) + func (c *Context) Stack() *stack.Stack + type Headers struct + AckNum seqnum.Value + DstPort uint16 + Flags header.TCPFlags + RcvWnd seqnum.Size + SeqNum seqnum.Value + SrcPort uint16 + TCPOpts []byte + type Options struct + Clock tcpip.Clock + EnableV4 bool + EnableV6 bool + MTU uint32 + type RawEndpoint struct + AckNum seqnum.Value + C *Context + DstPort uint16 + Flags header.TCPFlags + NextSeqNum seqnum.Value + RecentTS uint32 + SACKPermitted bool + SrcPort uint16 + TSVal uint32 + WndSize seqnum.Size + func (r *RawEndpoint) SendPacket(payload []byte, opts []byte) + func (r *RawEndpoint) SendPacketWithTS(payload []byte, tsVal uint32) + func (r *RawEndpoint) VerifyACKHasSACK(sackBlocks []header.SACKBlock) + func (r *RawEndpoint) VerifyACKNoSACK() + func (r *RawEndpoint) VerifyACKRcvWnd(rcvWnd uint16) + func (r *RawEndpoint) VerifyACKWithTS(tsVal uint32) + func (r *RawEndpoint) VerifyAndReturnACKWithTS(tsVal uint32) *buffer.View