Versions in this module Expand all Collapse all v0 v0.0.1 Jun 16, 2020 Changes in this version + const StackAddr + const StackPort + const StackV4MappedAddr + const StackV6Addr + const TestAddr + const TestPort + const TestV4MappedAddr + const TestV6Addr + const V4MappedWildcardAddr + type Context struct + EP tcpip.Endpoint + IRS seqnum.Value + Port uint16 + TimeStampEnabled bool + WQ waiter.Queue + WindowScale uint8 + func New(t *testing.T, mtu uint32) *Context + func (c *Context) AcceptWithOptions(wndScale int, synOptions header.TCPSynOptions) *RawEndpoint + func (c *Context) BuildSegment(payload []byte, h *Headers) buffer.VectorisedView + func (c *Context) BuildSegmentWithAddrs(payload []byte, h *Headers, src, dst tcpip.Address) buffer.VectorisedView + func (c *Context) CheckNoPacket(errMsg string) + func (c *Context) CheckNoPacketTimeout(errMsg string, wait time.Duration) + func (c *Context) Cleanup() + 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) *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() []byte + func (c *Context) GetPacketNonBlocking() []byte + func (c *Context) GetV6Packet() []byte + func (c *Context) MSSWithoutOptions() uint16 + func (c *Context) PassiveConnect(maxPayload, wndScale int, synOptions header.TCPSynOptions) + func (c *Context) PassiveConnectWithOptions(maxPayload, wndScale int, synOptions header.TCPSynOptions) *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 uint8, p1, p2 []byte, maxTotalSize int) + 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.VectorisedView) + 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 int + RcvWnd seqnum.Size + SeqNum seqnum.Value + SrcPort uint16 + TCPOpts []byte + type RawEndpoint struct + AckNum seqnum.Value + C *Context + DstPort uint16 + Flags int + 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)