Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const CtxStack + type AbstractSocketNamespace struct + func (a *AbstractSocketNamespace) Bind(ctx context.Context, path string, ep transport.BoundEndpoint, ...) (string, *syserr.Error) + func (a *AbstractSocketNamespace) BoundEndpoint(name string) transport.BoundEndpoint + func (a *AbstractSocketNamespace) Remove(name string, socket refs.TryRefCounter) + type Interface struct + Addr []byte + DeviceType uint16 + Features []linux.EthtoolGetFeaturesBlock + Flags uint32 + MTU uint32 + Name string + type InterfaceAddr struct + Addr []byte + Family uint8 + Flags uint8 + PrefixLen uint8 + type Namespace struct + func NewNamespace(root *Namespace, userNS *auth.UserNamespace) *Namespace + func NewRootNamespace(stack Stack, creator NetworkStackCreator, userNS *auth.UserNamespace) *Namespace + func (n *Namespace) AbstractSockets() *AbstractSocketNamespace + func (n *Namespace) DecRef(ctx context.Context) + func (n *Namespace) Destroy(ctx context.Context) + func (n *Namespace) GetInode() *nsfs.Inode + func (n *Namespace) IncRef() + func (n *Namespace) IsRoot() bool + func (n *Namespace) ResetStack() + func (n *Namespace) RestoreRootStack(stack Stack) + func (n *Namespace) SetInode(inode *nsfs.Inode) + func (n *Namespace) Stack() Stack + func (n *Namespace) Type() string + func (n *Namespace) UserNamespace() *auth.UserNamespace + type NetworkStackCreator interface + CreateStack func() (Stack, error) + type Route struct + DstAddr []byte + DstLen uint8 + Family uint8 + Flags uint32 + GatewayAddr []byte + OutputInterface int32 + Protocol uint8 + Scope uint8 + SrcAddr []byte + SrcLen uint8 + TOS uint8 + Table uint8 + Type uint8 + type Stack interface + AddInterfaceAddr func(idx int32, addr InterfaceAddr) error + CleanupEndpoints func() []stack.TransportEndpoint + Destroy func() + InterfaceAddrs func() map[int32][]InterfaceAddr + Interfaces func() map[int32]Interface + Pause func() + PortRange func() (uint16, uint16) + RegisteredEndpoints func() []stack.TransportEndpoint + RemoveInterface func(idx int32) error + RemoveInterfaceAddr func(idx int32, addr InterfaceAddr) error + Restore func() + RestoreCleanupEndpoints func([]stack.TransportEndpoint) + Resume func() + RouteTable func() []Route + SetForwarding func(protocol tcpip.NetworkProtocolNumber, enable bool) error + SetInterface func(ctx context.Context, msg *nlmsg.Message) *syserr.Error + SetPortRange func(start uint16, end uint16) error + SetTCPReceiveBufferSize func(size TCPBufferSize) error + SetTCPRecovery func(recovery TCPLossRecovery) error + SetTCPSACKEnabled func(enabled bool) error + SetTCPSendBufferSize func(size TCPBufferSize) error + Statistics func(stat any, arg string) error + SupportsIPv6 func() bool + TCPReceiveBufferSize func() (TCPBufferSize, error) + TCPRecovery func() (TCPLossRecovery, error) + TCPSACKEnabled func() (bool, error) + TCPSendBufferSize func() (TCPBufferSize, error) + func StackFromContext(ctx context.Context) Stack + type StatDev [16]uint64 + type StatSNMPICMP [27]uint64 + type StatSNMPICMPMSG [512]uint64 + type StatSNMPIP [19]uint64 + type StatSNMPTCP [15]uint64 + type StatSNMPUDP [8]uint64 + type StatSNMPUDPLite [8]uint64 + type TCPBufferSize struct + Default int + Max int + Min int + type TCPLossRecovery int32 + const TCP_RACK_LOSS_DETECTION + const TCP_RACK_NO_DUPTHRESH + const TCP_RACK_STATIC_REO_WND + type TestStack struct + IPForwarding bool + InterfaceAddrsMap map[int32][]InterfaceAddr + InterfacesMap map[int32]Interface + Recovery TCPLossRecovery + RouteList []Route + SupportsIPv6Flag bool + TCPRecvBufSize TCPBufferSize + TCPSACKFlag bool + TCPSendBufSize TCPBufferSize + func NewTestStack() *TestStack + func (*TestStack) GROTimeout(NICID int32) (time.Duration, error) + func (*TestStack) PortRange() (uint16, uint16) + func (*TestStack) SetGROTimeout(NICID int32, timeout time.Duration) error + func (*TestStack) SetPortRange(start uint16, end uint16) error + func (s *TestStack) AddInterfaceAddr(idx int32, addr InterfaceAddr) error + func (s *TestStack) CleanupEndpoints() []stack.TransportEndpoint + func (s *TestStack) Destroy() + func (s *TestStack) InterfaceAddrs() map[int32][]InterfaceAddr + func (s *TestStack) Interfaces() map[int32]Interface + func (s *TestStack) Pause() + func (s *TestStack) RegisteredEndpoints() []stack.TransportEndpoint + func (s *TestStack) RemoveInterface(idx int32) error + func (s *TestStack) RemoveInterfaceAddr(idx int32, addr InterfaceAddr) error + func (s *TestStack) Restore() + func (s *TestStack) RestoreCleanupEndpoints([]stack.TransportEndpoint) + func (s *TestStack) Resume() + func (s *TestStack) RouteTable() []Route + func (s *TestStack) SetForwarding(protocol tcpip.NetworkProtocolNumber, enable bool) error + func (s *TestStack) SetInterface(ctx context.Context, msg *nlmsg.Message) *syserr.Error + func (s *TestStack) SetTCPReceiveBufferSize(size TCPBufferSize) error + func (s *TestStack) SetTCPRecovery(recovery TCPLossRecovery) error + func (s *TestStack) SetTCPSACKEnabled(enabled bool) error + func (s *TestStack) SetTCPSendBufferSize(size TCPBufferSize) error + func (s *TestStack) Statistics(stat any, arg string) error + func (s *TestStack) SupportsIPv6() bool + func (s *TestStack) TCPReceiveBufferSize() (TCPBufferSize, error) + func (s *TestStack) TCPRecovery() (TCPLossRecovery, error) + func (s *TestStack) TCPSACKEnabled() (bool, error) + func (s *TestStack) TCPSendBufferSize() (TCPBufferSize, error)