Versions in this module Expand all Collapse all v1 v1.0.1 Apr 30, 2024 Changes in this version + const CtxRestoreStack + const DefaultBufferSize + const DefaultMaxBufferSize + const DefaultTOS + const GVisorGSOMaxSize + const HookUnset + const MinBufferSize + const NeighborCacheSize + const PacketBufferStructSize + func BufferSince(h PacketHeader) buffer.Buffer + func MergeFragment(dst, frag *PacketBuffer) + func PayloadSince(h PacketHeader) *buffer.View + type AcceptTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + func (*AcceptTarget) Action(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int) + type AddressAssignmentState int + const AddressAssigned + const AddressDisabled + const AddressTentative + func (state AddressAssignmentState) String() string + type AddressConfigType int + const AddressConfigSlaac + const AddressConfigStatic + type AddressDispatcher interface + OnChanged func(AddressLifetimes, AddressAssignmentState) + OnRemoved func(AddressRemovalReason) + type AddressEndpoint interface + ConfigType func() AddressConfigType + Deprecated func() bool + GetKind func() AddressKind + Lifetimes func() AddressLifetimes + RegisterDispatcher func(AddressDispatcher) + SetDeprecated func(bool) + SetKind func(AddressKind) + SetLifetimes func(AddressLifetimes) + Temporary func() bool + type AddressKind int + const Permanent + const PermanentExpired + const PermanentTentative + const Temporary + func (k AddressKind) IsPermanent() bool + type AddressLifetimes struct + Deprecated bool + PreferredUntil tcpip.MonotonicTime + ValidUntil tcpip.MonotonicTime + type AddressProperties struct + ConfigType AddressConfigType + Disp AddressDispatcher + Lifetimes AddressLifetimes + PEB PrimaryEndpointBehavior + Temporary bool + type AddressRemovalReason int + const AddressRemovalDADFailed + const AddressRemovalInterfaceRemoved + const AddressRemovalInvalidated + const AddressRemovalManualAction + func (reason AddressRemovalReason) String() string + type AddressableEndpoint interface + AcquireAssignedAddress func(localAddr tcpip.Address, allowTemp bool, tempPEB PrimaryEndpointBehavior, ...) AddressEndpoint + AcquireOutgoingPrimaryAddress func(remoteAddr, srcHint tcpip.Address, allowExpired bool) AddressEndpoint + AddAndAcquirePermanentAddress func(addr tcpip.AddressWithPrefix, properties AddressProperties) (AddressEndpoint, tcpip.Error) + MainAddress func() tcpip.AddressWithPrefix + PermanentAddresses func() []tcpip.AddressWithPrefix + PrimaryAddresses func() []tcpip.AddressWithPrefix + RemovePermanentAddress func(addr tcpip.Address) tcpip.Error + SetLifetimes func(addr tcpip.Address, lifetimes AddressLifetimes) tcpip.Error + type AddressableEndpointState struct + func (a *AddressableEndpointState) AcquireAssignedAddress(localAddr tcpip.Address, allowTemp bool, tempPEB PrimaryEndpointBehavior, ...) AddressEndpoint + func (a *AddressableEndpointState) AcquireAssignedAddressOrMatching(localAddr tcpip.Address, f func(AddressEndpoint) bool, allowTemp bool, ...) AddressEndpoint + func (a *AddressableEndpointState) AcquireOutgoingPrimaryAddress(remoteAddr tcpip.Address, srcHint tcpip.Address, allowExpired bool) AddressEndpoint + func (a *AddressableEndpointState) AddAndAcquireAddress(addr tcpip.AddressWithPrefix, properties AddressProperties, kind AddressKind) (AddressEndpoint, tcpip.Error) + func (a *AddressableEndpointState) AddAndAcquirePermanentAddress(addr tcpip.AddressWithPrefix, properties AddressProperties) (AddressEndpoint, tcpip.Error) + func (a *AddressableEndpointState) AddAndAcquireTemporaryAddress(addr tcpip.AddressWithPrefix, peb PrimaryEndpointBehavior) (AddressEndpoint, tcpip.Error) + func (a *AddressableEndpointState) Cleanup() + func (a *AddressableEndpointState) ForEachEndpoint(f func(AddressEndpoint) bool) + func (a *AddressableEndpointState) ForEachPrimaryEndpoint(f func(AddressEndpoint) bool) + func (a *AddressableEndpointState) GetAddress(addr tcpip.Address) AddressEndpoint + func (a *AddressableEndpointState) Init(networkEndpoint NetworkEndpoint, options AddressableEndpointStateOptions) + func (a *AddressableEndpointState) MainAddress() tcpip.AddressWithPrefix + func (a *AddressableEndpointState) OnNetworkEndpointEnabledChanged() + func (a *AddressableEndpointState) PermanentAddresses() []tcpip.AddressWithPrefix + func (a *AddressableEndpointState) PrimaryAddresses() []tcpip.AddressWithPrefix + func (a *AddressableEndpointState) RemovePermanentAddress(addr tcpip.Address) tcpip.Error + func (a *AddressableEndpointState) RemovePermanentEndpoint(ep AddressEndpoint, reason AddressRemovalReason) tcpip.Error + func (a *AddressableEndpointState) SetDeprecated(addr tcpip.Address, deprecated bool) tcpip.Error + func (a *AddressableEndpointState) SetLifetimes(addr tcpip.Address, lifetimes AddressLifetimes) tcpip.Error + type AddressableEndpointStateOptions struct + HiddenWhileDisabled bool + type AssignableAddressEndpoint interface + AddressWithPrefix func() tcpip.AddressWithPrefix + DecRef func() + IsAssigned func(allowExpired bool) bool + Subnet func() tcpip.Subnet + TryIncRef func() bool + type ConnTrack struct + type DADAborted struct + type DADCheckAddressDisposition int + const DADAlreadyRunning + const DADDisabled + const DADStarting + type DADCompletionHandler func(DADResult) + type DADConfigurations struct + DupAddrDetectTransmits uint8 + RetransmitTimer time.Duration + func DefaultDADConfigurations() DADConfigurations + func (c *DADConfigurations) Validate() + type DADDupAddrDetected struct + HolderLinkAddress tcpip.LinkAddress + type DADError struct + Err tcpip.Error + type DADResult interface + type DADSucceeded struct + type DNATTarget struct + Addr tcpip.Address + ChangeAddress bool + ChangePort bool + NetworkProtocol tcpip.NetworkProtocolNumber + Port uint16 + func (rt *DNATTarget) Action(pkt *PacketBuffer, hook Hook, r *Route, addressEP AddressableEndpoint) (RuleVerdict, int) + type DropTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + func (*DropTarget) Action(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int) + type DuplicateAddressDetector interface + CheckDuplicateAddress func(tcpip.Address, DADCompletionHandler) DADCheckAddressDisposition + DuplicateAddressProtocol func() tcpip.NetworkProtocolNumber + SetDADConfigurations func(c DADConfigurations) + type ErrorTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + func (*ErrorTarget) Action(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int) + type ForwardingNetworkEndpoint interface + Forwarding func() bool + SetForwarding func(bool) bool + type GSO struct + CsumOffset uint16 + L3HdrLen uint16 + MSS uint16 + MaxSize uint32 + NeedsCsum bool + Type GSOType + type GSOEndpoint interface + GSOMaxSize func() uint32 + SupportedGSO func() SupportedGSO + type GSOType int + const GSOGvisor + const GSONone + const GSOTCPv4 + const GSOTCPv6 + type GroupAddressableEndpoint interface + IsInGroup func(group tcpip.Address) bool + JoinGroup func(group tcpip.Address) tcpip.Error + LeaveGroup func(group tcpip.Address) tcpip.Error + type Hook uint + const Forward + const Input + const NumHooks + const Output + const Postrouting + const Prerouting + func (i Hook) String() string + type ICMPRateLimiter struct + func NewICMPRateLimiter(clock tcpip.Clock) *ICMPRateLimiter + func (l *ICMPRateLimiter) Allow() bool + func (l *ICMPRateLimiter) Burst() int + func (l *ICMPRateLimiter) Limit() rate.Limit + func (l *ICMPRateLimiter) SetBurst(burst int) + func (l *ICMPRateLimiter) SetLimit(limit rate.Limit) + type IPHeaderFilter struct + CheckProtocol bool + Dst tcpip.Address + DstInvert bool + DstMask tcpip.Address + InputInterface string + InputInterfaceInvert bool + InputInterfaceMask string + OutputInterface string + OutputInterfaceInvert bool + OutputInterfaceMask string + Protocol tcpip.TransportProtocolNumber + Src tcpip.Address + SrcInvert bool + SrcMask tcpip.Address + func EmptyFilter4() IPHeaderFilter + func EmptyFilter6() IPHeaderFilter + func (fl IPHeaderFilter) NetworkProtocol() tcpip.NetworkProtocolNumber + type IPNetworkEndpointStats interface + IPStats func() *tcpip.IPStats + type IPTables struct + func DefaultTables(clock tcpip.Clock, rand *rand.Rand) *IPTables + func (it *IPTables) CheckForward(pkt *PacketBuffer, inNicName, outNicName string) bool + func (it *IPTables) CheckInput(pkt *PacketBuffer, inNicName string) bool + func (it *IPTables) CheckOutput(pkt *PacketBuffer, r *Route, outNicName string) bool + func (it *IPTables) CheckPostrouting(pkt *PacketBuffer, r *Route, addressEP AddressableEndpoint, outNicName string) bool + func (it *IPTables) CheckPrerouting(pkt *PacketBuffer, addressEP AddressableEndpoint, inNicName string) bool + func (it *IPTables) ForceReplaceTable(id TableID, table Table, ipv6 bool) + func (it *IPTables) GetTable(id TableID, ipv6 bool) Table + func (it *IPTables) Modified() bool + func (it *IPTables) OriginalDst(epID TransportEndpointID, netProto tcpip.NetworkProtocolNumber, ...) (tcpip.Address, uint16, tcpip.Error) + func (it *IPTables) ReplaceTable(id TableID, table Table, ipv6 bool) + func (it *IPTables) VisitTargets(transform func(Target) Target) + type InjectableLinkEndpoint interface + InjectInbound func(protocol tcpip.NetworkProtocolNumber, pkt *PacketBuffer) + InjectOutbound func(dest tcpip.Address, packet *buffer.View) tcpip.Error + type LinkAddressResolver interface + LinkAddressProtocol func() tcpip.NetworkProtocolNumber + LinkAddressRequest func(targetAddr, localAddr tcpip.Address, remoteLinkAddr tcpip.LinkAddress) tcpip.Error + ResolveStaticAddress func(addr tcpip.Address) (tcpip.LinkAddress, bool) + type LinkEndpoint interface + type LinkEndpointCapabilities uint + const CapabilityDisconnectOk + const CapabilityLoopback + const CapabilityNone + const CapabilityRXChecksumOffload + const CapabilityResolutionRequired + const CapabilitySaveRestore + const CapabilityTXChecksumOffload + type LinkResolutionResult struct + Err tcpip.Error + LinkAddress tcpip.LinkAddress + type LinkResolvableNetworkEndpoint interface + HandleLinkResolutionFailure func(*PacketBuffer) + type LinkWriter interface + WritePackets func(PacketBufferList) (int, tcpip.Error) + type MasqueradeTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + func (mt *MasqueradeTarget) Action(pkt *PacketBuffer, hook Hook, r *Route, addressEP AddressableEndpoint) (RuleVerdict, int) + type Matcher interface + Match func(hook Hook, packet *PacketBuffer, ...) (matches bool, hotdrop bool) + type MulticastForwardingEventDispatcher interface + OnMissingRoute func(MulticastPacketContext) + OnUnexpectedInputInterface func(context MulticastPacketContext, expectedInputInterface tcpip.NICID) + type MulticastForwardingNetworkEndpoint interface + MulticastForwarding func() bool + SetMulticastForwarding func(bool) bool + type MulticastForwardingNetworkProtocol interface + AddMulticastRoute func(UnicastSourceAndMulticastDestination, MulticastRoute) tcpip.Error + DisableMulticastForwarding func() + EnableMulticastForwarding func(MulticastForwardingEventDispatcher) (bool, tcpip.Error) + MulticastRouteLastUsedTime func(UnicastSourceAndMulticastDestination) (tcpip.MonotonicTime, tcpip.Error) + RemoveMulticastRoute func(UnicastSourceAndMulticastDestination) tcpip.Error + type MulticastPacketContext struct + InputInterface tcpip.NICID + SourceAndDestination UnicastSourceAndMulticastDestination + type MulticastRoute struct + ExpectedInputInterface tcpip.NICID + OutgoingInterfaces []MulticastRouteOutgoingInterface + type MulticastRouteOutgoingInterface struct + ID tcpip.NICID + MinTTL uint8 + type NDPEndpoint interface + InvalidateDefaultRouter func(tcpip.Address) + type NICContext any + type NICInfo struct + ARPHardwareType header.ARPHardwareType + Context NICContext + Flags NICStateFlags + Forwarding map[tcpip.NetworkProtocolNumber]bool + LinkAddress tcpip.LinkAddress + MTU uint32 + MulticastForwarding map[tcpip.NetworkProtocolNumber]bool + Name string + NetworkStats map[tcpip.NetworkProtocolNumber]NetworkEndpointStats + ProtocolAddresses []tcpip.ProtocolAddress + Stats tcpip.NICStats + type NICOptions struct + Context NICContext + DeliverLinkPackets bool + Disabled bool + Name string + QDisc QueueingDiscipline + type NICStateFlags struct + Loopback bool + Promiscuous bool + Running bool + Up bool + type NUDConfigurations struct + BaseReachableTime time.Duration + DelayFirstProbeTime time.Duration + LearnBaseReachableTime bool + LearnRetransmitTimer bool + MaxAnycastDelayTime time.Duration + MaxMulticastProbes uint32 + MaxRandomFactor float32 + MaxReachabilityConfirmations uint32 + MaxUnicastProbes uint32 + MinRandomFactor float32 + RetransmitTimer time.Duration + func DefaultNUDConfigurations() NUDConfigurations + type NUDDispatcher interface + OnNeighborAdded func(tcpip.NICID, NeighborEntry) + OnNeighborChanged func(tcpip.NICID, NeighborEntry) + OnNeighborRemoved func(tcpip.NICID, NeighborEntry) + type NUDState struct + func NewNUDState(c NUDConfigurations, clock tcpip.Clock, rng *rand.Rand) *NUDState + func (s *NUDState) Config() NUDConfigurations + func (s *NUDState) ReachableTime() time.Duration + func (s *NUDState) SetConfig(c NUDConfigurations) + type NeighborEntry struct + Addr tcpip.Address + LinkAddr tcpip.LinkAddress + State NeighborState + UpdatedAt tcpip.MonotonicTime + type NeighborState uint8 + const Delay + const Incomplete + const Probe + const Reachable + const Stale + const Static + const Unknown + const Unreachable + func (i NeighborState) String() string + type NeighborStats struct + UnreachableEntryLookups *tcpip.StatCounter + type NetworkDispatcher interface + DeliverLinkPacket func(protocol tcpip.NetworkProtocolNumber, pkt *PacketBuffer) + DeliverNetworkPacket func(protocol tcpip.NetworkProtocolNumber, pkt *PacketBuffer) + type NetworkEndpoint interface + Close func() + DefaultTTL func() uint8 + Disable func() + Enable func() tcpip.Error + Enabled func() bool + HandlePacket func(pkt *PacketBuffer) + MTU func() uint32 + MaxHeaderLength func() uint16 + NetworkProtocolNumber func() tcpip.NetworkProtocolNumber + Stats func() NetworkEndpointStats + WriteHeaderIncludedPacket func(r *Route, pkt *PacketBuffer) tcpip.Error + WritePacket func(r *Route, params NetworkHeaderParams, pkt *PacketBuffer) tcpip.Error + type NetworkEndpointID struct + LocalAddress tcpip.Address + type NetworkEndpointStats interface + IsNetworkEndpointStats func() + type NetworkHeaderParams struct + Protocol tcpip.TransportProtocolNumber + TOS uint8 + TTL uint8 + type NetworkInterface interface + CheckLocalAddress func(tcpip.NetworkProtocolNumber, tcpip.Address) bool + Enabled func() bool + HandleNeighborConfirmation func(tcpip.NetworkProtocolNumber, tcpip.Address, tcpip.LinkAddress, ...) tcpip.Error + HandleNeighborProbe func(tcpip.NetworkProtocolNumber, tcpip.Address, tcpip.LinkAddress) tcpip.Error + ID func() tcpip.NICID + IsLoopback func() bool + Name func() string + PrimaryAddress func(tcpip.NetworkProtocolNumber) (tcpip.AddressWithPrefix, tcpip.Error) + Promiscuous func() bool + Spoofing func() bool + WritePacket func(*Route, *PacketBuffer) tcpip.Error + WritePacketToRemote func(tcpip.LinkAddress, *PacketBuffer) tcpip.Error + type NetworkLinkEndpoint interface + ARPHardwareType func() header.ARPHardwareType + AddHeader func(*PacketBuffer) + Attach func(dispatcher NetworkDispatcher) + Capabilities func() LinkEndpointCapabilities + IsAttached func() bool + LinkAddress func() tcpip.LinkAddress + MTU func() uint32 + MaxHeaderLength func() uint16 + ParseHeader func(*PacketBuffer) bool + Wait func() + type NetworkPacketInfo struct + IsForwardedPacket bool + LocalAddressBroadcast bool + type NetworkProtocol interface + Close func() + MinimumPacketSize func() int + NewEndpoint func(nic NetworkInterface, dispatcher TransportDispatcher) NetworkEndpoint + Number func() tcpip.NetworkProtocolNumber + Option func(option tcpip.GettableNetworkProtocolOption) tcpip.Error + Parse func(pkt *PacketBuffer) (proto tcpip.TransportProtocolNumber, hasTransportHdr bool, ok bool) + ParseAddresses func(b []byte) (src, dst tcpip.Address) + SetOption func(option tcpip.SettableNetworkProtocolOption) tcpip.Error + Wait func() + type NetworkProtocolFactory func(*Stack) NetworkProtocol + type Options struct + AllowPacketEndpointWrite bool + Clock tcpip.Clock + DefaultIPTables func(clock tcpip.Clock, rand *rand.Rand) *IPTables + HandleLocal bool + IPTables *IPTables + NUDConfigs NUDConfigurations + NUDDisp NUDDispatcher + NetworkProtocols []NetworkProtocolFactory + RandSource rand.Source + RawFactory RawFactory + SecureRNG io.Reader + Stats tcpip.Stats + TransportProtocols []TransportProtocolFactory + UniqueID UniqueID + type PacketBuffer struct + EgressRoute RouteInfo + GSOOptions GSO + Hash uint32 + NICID tcpip.NICID + NetworkPacketInfo NetworkPacketInfo + NetworkProtocolNumber tcpip.NetworkProtocolNumber + Owner tcpip.PacketOwner + PktType tcpip.PacketType + RXChecksumValidated bool + TransportProtocolNumber tcpip.TransportProtocolNumber + func NewPacketBuffer(opts PacketBufferOptions) *PacketBuffer + func (pk *PacketBuffer) AsSlices() [][]byte + func (pk *PacketBuffer) AsViewList() (buffer.ViewList, int) + func (pk *PacketBuffer) AvailableHeaderBytes() int + func (pk *PacketBuffer) Clone() *PacketBuffer + func (pk *PacketBuffer) CloneToInbound() *PacketBuffer + func (pk *PacketBuffer) Data() PacketData + func (pk *PacketBuffer) DecRef() + func (pk *PacketBuffer) DeepCopyForForwarding(reservedHeaderBytes int) *PacketBuffer + func (pk *PacketBuffer) HeaderSize() int + func (pk *PacketBuffer) ID() uintptr + func (pk *PacketBuffer) IncRef() *PacketBuffer + func (pk *PacketBuffer) LinkHeader() PacketHeader + func (pk *PacketBuffer) MemSize() int + func (pk *PacketBuffer) Network() header.Network + func (pk *PacketBuffer) NetworkHeader() PacketHeader + func (pk *PacketBuffer) ReserveHeaderBytes(reserved int) + func (pk *PacketBuffer) ReservedHeaderBytes() int + func (pk *PacketBuffer) Size() int + func (pk *PacketBuffer) ToBuffer() buffer.Buffer + func (pk *PacketBuffer) ToView() *buffer.View + func (pk *PacketBuffer) TransportHeader() PacketHeader + func (pk *PacketBuffer) VirtioNetHeader() PacketHeader + type PacketBufferList struct + func (pl *PacketBufferList) AsSlice() []*PacketBuffer + func (pl *PacketBufferList) Len() int + func (pl *PacketBufferList) PushBack(pb *PacketBuffer) + func (pl *PacketBufferList) Reset() + func (pl PacketBufferList) DecRef() + type PacketBufferOptions struct + IsForwardedPacket bool + OnRelease func() + Payload buffer.Buffer + ReserveHeaderBytes int + type PacketData struct + func (d PacketData) AppendView(v *buffer.View) + func (d PacketData) AsRange() Range + func (d PacketData) CapLength(length int) + func (d PacketData) Checksum() uint16 + func (d PacketData) ChecksumAtOffset(offset int) uint16 + func (d PacketData) Consume(size int) ([]byte, bool) + func (d PacketData) Merge(oth PacketData) + func (d PacketData) MergeBuffer(b *buffer.Buffer) + func (d PacketData) PullUp(size int) (b []byte, ok bool) + func (d PacketData) ReadFrom(src *buffer.Buffer, count int) int + func (d PacketData) ReadFromPacketData(oth PacketData, count int) + func (d PacketData) ReadTo(dst io.Writer, peek bool) (int, error) + func (d PacketData) Size() int + func (d PacketData) ToBuffer() buffer.Buffer + func (d PacketData) TrimFront(count int) + type PacketEndpoint interface + HandlePacket func(nicID tcpip.NICID, netProto tcpip.NetworkProtocolNumber, pkt *PacketBuffer) + type PacketHeader struct + func (h PacketHeader) Consume(size int) (v []byte, consumed bool) + func (h PacketHeader) Push(size int) []byte + func (h PacketHeader) Slice() []byte + func (h PacketHeader) View() *buffer.View + type PacketLooping byte + const PacketLoop + const PacketOut + type ParseResult int + const ParsedOK + const TransportLayerParseError + const UnknownTransportProtocol + type PrimaryEndpointBehavior int + const CanBePrimaryEndpoint + const FirstPrimaryEndpoint + const NeverPrimaryEndpoint + func (peb PrimaryEndpointBehavior) String() string + type QueueingDiscipline interface + Close func() + WritePacket func(*PacketBuffer) tcpip.Error + type Range struct + func (r Range) Capped(max int) Range + func (r Range) Size() int + func (r Range) SubRange(off int) Range + func (r Range) ToSlice() []byte + func (r Range) ToView() *buffer.View + type RawFactory interface + NewPacketEndpoint func(stack *Stack, cooked bool, netProto tcpip.NetworkProtocolNumber, ...) (tcpip.Endpoint, tcpip.Error) + NewUnassociatedEndpoint func(stack *Stack, netProto tcpip.NetworkProtocolNumber, ...) (tcpip.Endpoint, tcpip.Error) + type RawTransportEndpoint interface + HandlePacket func(*PacketBuffer) + type RcvBufAutoTuneParams struct + CopiedBytes int + Disabled bool + MeasureTime tcpip.MonotonicTime + PrevCopiedBytes int + RTT time.Duration + RTTMeasureSeqNumber seqnum.Value + RTTMeasureTime tcpip.MonotonicTime + RTTVar time.Duration + RcvBufSize int + type ReachabilityConfirmationFlags struct + IsRouter bool + Override bool + Solicited bool + type ReceiveBufferSizeOption struct + Default int + Max int + Min int + type RedirectTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + Port uint16 + func (rt *RedirectTarget) Action(pkt *PacketBuffer, hook Hook, r *Route, addressEP AddressableEndpoint) (RuleVerdict, int) + type RejectIPv4Target struct + Handler RejectIPv4WithHandler + RejectWith RejectIPv4WithICMPType + func (rt *RejectIPv4Target) Action(pkt *PacketBuffer, hook Hook, _ *Route, _ AddressableEndpoint) (RuleVerdict, int) + type RejectIPv4WithHandler interface + SendRejectionError func(pkt *PacketBuffer, rejectWith RejectIPv4WithICMPType, inputHook bool) tcpip.Error + type RejectIPv4WithICMPType int + const RejectIPv4WithICMPAdminProhibited + const RejectIPv4WithICMPHostProhibited + const RejectIPv4WithICMPHostUnreachable + const RejectIPv4WithICMPNetProhibited + const RejectIPv4WithICMPNetUnreachable + const RejectIPv4WithICMPPortUnreachable + type RejectIPv6Target struct + Handler RejectIPv6WithHandler + RejectWith RejectIPv6WithICMPType + func (rt *RejectIPv6Target) Action(pkt *PacketBuffer, hook Hook, _ *Route, _ AddressableEndpoint) (RuleVerdict, int) + type RejectIPv6WithHandler interface + SendRejectionError func(pkt *PacketBuffer, rejectWith RejectIPv6WithICMPType, forwardingHook bool) tcpip.Error + type RejectIPv6WithICMPType int + const RejectIPv6WithICMPAddrUnreachable + const RejectIPv6WithICMPAdminProhibited + const RejectIPv6WithICMPNoRoute + const RejectIPv6WithICMPPortUnreachable + type ResolvedFieldsResult struct + Err tcpip.Error + RouteInfo RouteInfo + type RestoredEndpoint interface + Restore func(*Stack) + type ResumableEndpoint interface + Resume func() + type ReturnTarget struct + NetworkProtocol tcpip.NetworkProtocolNumber + func (*ReturnTarget) Action(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int) + type Route struct + func (r *Route) Acquire() + func (r *Route) ConfirmReachable() + func (r *Route) DefaultTTL() uint8 + func (r *Route) Fields() RouteInfo + func (r *Route) GSOMaxSize() uint32 + func (r *Route) HasDisconnectOkCapability() bool + func (r *Route) HasGVisorGSOCapability() bool + func (r *Route) HasHostGSOCapability() bool + func (r *Route) HasSaveRestoreCapability() bool + func (r *Route) IsOutboundBroadcast() bool + func (r *Route) IsResolutionRequired() bool + func (r *Route) LocalAddress() tcpip.Address + func (r *Route) LocalLinkAddress() tcpip.LinkAddress + func (r *Route) Loop() PacketLooping + func (r *Route) MTU() uint32 + func (r *Route) MaxHeaderLength() uint16 + func (r *Route) NICID() tcpip.NICID + func (r *Route) NetProto() tcpip.NetworkProtocolNumber + func (r *Route) NextHop() tcpip.Address + func (r *Route) OutgoingNIC() tcpip.NICID + func (r *Route) PseudoHeaderChecksum(protocol tcpip.TransportProtocolNumber, totalLen uint16) uint16 + func (r *Route) Release() + func (r *Route) RemoteAddress() tcpip.Address + func (r *Route) RemoteLinkAddress() tcpip.LinkAddress + func (r *Route) RequiresTXTransportChecksum() bool + func (r *Route) ResolveWith(addr tcpip.LinkAddress) + func (r *Route) ResolvedFields(afterResolve func(ResolvedFieldsResult)) tcpip.Error + func (r *Route) Stack() *Stack + func (r *Route) Stats() tcpip.Stats + func (r *Route) WriteHeaderIncludedPacket(pkt *PacketBuffer) tcpip.Error + func (r *Route) WritePacket(params NetworkHeaderParams, pkt *PacketBuffer) tcpip.Error + type RouteInfo struct + RemoteLinkAddress tcpip.LinkAddress + type Rule struct + Filter IPHeaderFilter + Matchers []Matcher + Target Target + type RuleVerdict int + const RuleAccept + const RuleDrop + const RuleJump + const RuleReturn + type SNATTarget struct + Addr tcpip.Address + ChangeAddress bool + ChangePort bool + NetworkProtocol tcpip.NetworkProtocolNumber + Port uint16 + func (st *SNATTarget) Action(pkt *PacketBuffer, hook Hook, r *Route, _ AddressableEndpoint) (RuleVerdict, int) + type SendBufSizeProto interface + SendBufferSize func() tcpip.TCPSendBufferSizeRangeOption + type Stack struct + func New(opts Options) *Stack + func RestoreStackFromContext(ctx context.Context) *Stack + func (s *Stack) AddMulticastRoute(protocol tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) AddProtocolAddress(id tcpip.NICID, protocolAddress tcpip.ProtocolAddress, ...) tcpip.Error + func (s *Stack) AddRoute(route tcpip.Route) + func (s *Stack) AddStaticNeighbor(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address, ...) tcpip.Error + func (s *Stack) AddTCPProbe(probe TCPProbeFunc) + func (s *Stack) AllAddresses() map[tcpip.NICID][]tcpip.ProtocolAddress + func (s *Stack) AllowICMPMessage() bool + func (s *Stack) CheckDuplicateAddress(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address, ...) (DADCheckAddressDisposition, tcpip.Error) + func (s *Stack) CheckLocalAddress(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address) tcpip.NICID + func (s *Stack) CheckNIC(id tcpip.NICID) bool + func (s *Stack) CheckNetworkProtocol(protocol tcpip.NetworkProtocolNumber) bool + func (s *Stack) CheckRegisterTransportEndpoint(netProtos []tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) CleanupEndpoints() []TransportEndpoint + func (s *Stack) ClearNeighbors(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber) tcpip.Error + func (s *Stack) Clock() tcpip.Clock + func (s *Stack) Close() + func (s *Stack) CompleteTransportEndpointCleanup(ep TransportEndpoint) + func (s *Stack) CreateNIC(id tcpip.NICID, ep LinkEndpoint) tcpip.Error + func (s *Stack) CreateNICWithOptions(id tcpip.NICID, ep LinkEndpoint, opts NICOptions) tcpip.Error + func (s *Stack) Destroy() + func (s *Stack) DisableMulticastForwardingForProtocol(protocol tcpip.NetworkProtocolNumber) tcpip.Error + func (s *Stack) DisableNIC(id tcpip.NICID) tcpip.Error + func (s *Stack) EnableMulticastForwardingForProtocol(protocol tcpip.NetworkProtocolNumber, disp MulticastForwardingEventDispatcher) (bool, tcpip.Error) + func (s *Stack) EnableNIC(id tcpip.NICID) tcpip.Error + func (s *Stack) FindNICNameFromID(id tcpip.NICID) string + func (s *Stack) FindRoute(id tcpip.NICID, localAddr, remoteAddr tcpip.Address, ...) (*Route, tcpip.Error) + func (s *Stack) FindTransportEndpoint(netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, ...) TransportEndpoint + func (s *Stack) GetLinkAddress(nicID tcpip.NICID, addr, localAddr tcpip.Address, ...) tcpip.Error + func (s *Stack) GetLinkEndpointByName(name string) LinkEndpoint + func (s *Stack) GetMainNICAddress(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber) (tcpip.AddressWithPrefix, tcpip.Error) + func (s *Stack) GetNetworkEndpoint(nicID tcpip.NICID, proto tcpip.NetworkProtocolNumber) (NetworkEndpoint, tcpip.Error) + func (s *Stack) GetRouteTable() []tcpip.Route + func (s *Stack) GetTCPProbe() TCPProbeFunc + func (s *Stack) HandleLocal() bool + func (s *Stack) HasNIC(id tcpip.NICID) bool + func (s *Stack) ICMPBurst() int + func (s *Stack) ICMPLimit() rate.Limit + func (s *Stack) IPTables() *IPTables + func (s *Stack) InsecureRNG() *rand.Rand + func (s *Stack) IsInGroup(nicID tcpip.NICID, multicastAddr tcpip.Address) (bool, tcpip.Error) + func (s *Stack) IsSubnetBroadcast(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address) bool + func (s *Stack) JoinGroup(protocol tcpip.NetworkProtocolNumber, nicID tcpip.NICID, ...) tcpip.Error + func (s *Stack) LeaveGroup(protocol tcpip.NetworkProtocolNumber, nicID tcpip.NICID, ...) tcpip.Error + func (s *Stack) MulticastRouteLastUsedTime(protocol tcpip.NetworkProtocolNumber, ...) (tcpip.MonotonicTime, tcpip.Error) + func (s *Stack) NICForwarding(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber) (bool, tcpip.Error) + func (s *Stack) NICInfo() map[tcpip.NICID]NICInfo + func (s *Stack) NICMulticastForwarding(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber) (bool, tcpip.Error) + func (s *Stack) NUDConfigurations(id tcpip.NICID, proto tcpip.NetworkProtocolNumber) (NUDConfigurations, tcpip.Error) + func (s *Stack) Neighbors(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber) ([]NeighborEntry, tcpip.Error) + func (s *Stack) NetworkProtocolInstance(num tcpip.NetworkProtocolNumber) NetworkProtocol + func (s *Stack) NetworkProtocolOption(network tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) NewEndpoint(transport tcpip.TransportProtocolNumber, network tcpip.NetworkProtocolNumber, ...) (tcpip.Endpoint, tcpip.Error) + func (s *Stack) NewPacketEndpoint(cooked bool, netProto tcpip.NetworkProtocolNumber, waiterQueue *waiter.Queue) (tcpip.Endpoint, tcpip.Error) + func (s *Stack) NewRawEndpoint(transport tcpip.TransportProtocolNumber, network tcpip.NetworkProtocolNumber, ...) (tcpip.Endpoint, tcpip.Error) + func (s *Stack) NewRouteForMulticast(nicID tcpip.NICID, remoteAddr tcpip.Address, ...) *Route + func (s *Stack) Option(option any) tcpip.Error + func (s *Stack) PacketEndpointWriteSupported() bool + func (s *Stack) ParsePacketBufferTransport(protocol tcpip.TransportProtocolNumber, pkt *PacketBuffer) ParseResult + func (s *Stack) Pause() + func (s *Stack) PortRange() (uint16, uint16) + func (s *Stack) RegisterPacketEndpoint(nicID tcpip.NICID, netProto tcpip.NetworkProtocolNumber, ep PacketEndpoint) tcpip.Error + func (s *Stack) RegisterRawTransportEndpoint(netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, ...) tcpip.Error + func (s *Stack) RegisterRestoredEndpoint(e RestoredEndpoint) + func (s *Stack) RegisterResumableEndpoint(e ResumableEndpoint) + func (s *Stack) RegisterTransportEndpoint(netProtos []tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) RegisteredEndpoints() []TransportEndpoint + func (s *Stack) RemoveAddress(id tcpip.NICID, addr tcpip.Address) tcpip.Error + func (s *Stack) RemoveMulticastRoute(protocol tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) RemoveNIC(id tcpip.NICID) tcpip.Error + func (s *Stack) RemoveNeighbor(nicID tcpip.NICID, protocol tcpip.NetworkProtocolNumber, addr tcpip.Address) tcpip.Error + func (s *Stack) RemoveRoutes(match func(tcpip.Route) bool) + func (s *Stack) RemoveTCPProbe() + func (s *Stack) Restore() + func (s *Stack) RestoreCleanupEndpoints(es []TransportEndpoint) + func (s *Stack) Resume() + func (s *Stack) SecureRNG() cryptorand.RNG + func (s *Stack) Seed() uint32 + func (s *Stack) SetAddressLifetimes(id tcpip.NICID, addr tcpip.Address, lifetimes AddressLifetimes) tcpip.Error + func (s *Stack) SetForwardingDefaultAndAllNICs(protocol tcpip.NetworkProtocolNumber, enable bool) tcpip.Error + func (s *Stack) SetICMPBurst(burst int) + func (s *Stack) SetICMPLimit(newLimit rate.Limit) + func (s *Stack) SetNICForwarding(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber, enable bool) (bool, tcpip.Error) + func (s *Stack) SetNICMulticastForwarding(id tcpip.NICID, protocol tcpip.NetworkProtocolNumber, enable bool) (bool, tcpip.Error) + func (s *Stack) SetNUDConfigurations(id tcpip.NICID, proto tcpip.NetworkProtocolNumber, c NUDConfigurations) tcpip.Error + func (s *Stack) SetNetworkProtocolOption(network tcpip.NetworkProtocolNumber, ...) tcpip.Error + func (s *Stack) SetOption(option any) tcpip.Error + func (s *Stack) SetPortRange(start uint16, end uint16) tcpip.Error + func (s *Stack) SetPromiscuousMode(nicID tcpip.NICID, enable bool) tcpip.Error + func (s *Stack) SetRouteTable(table []tcpip.Route) + func (s *Stack) SetSpoofing(nicID tcpip.NICID, enable bool) tcpip.Error + func (s *Stack) SetTransportProtocolHandler(p tcpip.TransportProtocolNumber, ...) + func (s *Stack) SetTransportProtocolOption(transport tcpip.TransportProtocolNumber, ...) tcpip.Error + func (s *Stack) StartTransportEndpointCleanup(netProtos []tcpip.NetworkProtocolNumber, ...) + func (s *Stack) Stats() tcpip.Stats + func (s *Stack) TCPSendBufferLimits() tcpip.TCPSendBufferSizeRangeOption + func (s *Stack) TransportProtocolInstance(num tcpip.TransportProtocolNumber) TransportProtocol + func (s *Stack) TransportProtocolOption(transport tcpip.TransportProtocolNumber, ...) tcpip.Error + func (s *Stack) UniqueID() uint64 + func (s *Stack) UnregisterPacketEndpoint(nicID tcpip.NICID, netProto tcpip.NetworkProtocolNumber, ep PacketEndpoint) + func (s *Stack) UnregisterRawTransportEndpoint(netProto tcpip.NetworkProtocolNumber, transProto tcpip.TransportProtocolNumber, ...) + func (s *Stack) UnregisterTransportEndpoint(netProtos []tcpip.NetworkProtocolNumber, ...) + func (s *Stack) Wait() + func (s *Stack) WritePacketToRemote(nicID tcpip.NICID, remote tcpip.LinkAddress, ...) tcpip.Error + func (s *Stack) WriteRawPacket(nicID tcpip.NICID, proto tcpip.NetworkProtocolNumber, payload buffer.Buffer) tcpip.Error + type SupportedGSO int + const GSONotSupported + const GVisorGSOSupported + const HostGSOSupported + type TCPCubicState struct + Beta float64 + C float64 + K float64 + T tcpip.MonotonicTime + TimeSinceLastCongestion time.Duration + WC float64 + WEst float64 + WLastMax float64 + WMax float64 + type TCPEndpointID struct + LocalAddress tcpip.Address + LocalPort uint16 + RemoteAddress tcpip.Address + RemotePort uint16 + type TCPEndpointState struct + ID TCPEndpointID + RcvBufState TCPRcvBufState + Receiver TCPReceiverState + SACK TCPSACKInfo + SegTime tcpip.MonotonicTime + Sender TCPSenderState + SndBufState TCPSndBufState + type TCPEndpointStateInner struct + RecentTS uint32 + SACKPermitted bool + SendTSOk bool + TSOffset tcp.TSOffset + type TCPFastRecoveryState struct + Active bool + First seqnum.Value + HighRxt seqnum.Value + Last seqnum.Value + MaxCwnd int + RescueRxt seqnum.Value + type TCPInvalidRateLimitOption time.Duration + type TCPProbeFunc func(s *TCPEndpointState) + type TCPRACKState struct + DSACKSeen bool + EndSequence seqnum.Value + FACK seqnum.Value + RTT time.Duration + RTTSeq seqnum.Value + ReoWnd time.Duration + ReoWndIncr uint8 + ReoWndPersist int8 + Reord bool + XmitTime tcpip.MonotonicTime + type TCPRTTState struct + RTTVar time.Duration + SRTT time.Duration + SRTTInited bool + type TCPRcvBufState struct + RcvAutoParams RcvBufAutoTuneParams + RcvBufUsed int + RcvClosed bool + type TCPReceiverState struct + PendingBufUsed int + RcvAcc seqnum.Value + RcvNxt seqnum.Value + RcvWndScale uint8 + type TCPSACKInfo struct + Blocks []header.SACKBlock + MaxSACKED seqnum.Value + ReceivedBlocks []header.SACKBlock + type TCPSenderState struct + Closed bool + Cubic TCPCubicState + DupAckCount int + FastRecovery TCPFastRecoveryState + LastSendTime tcpip.MonotonicTime + MaxPayloadSize int + MaxSentAck seqnum.Value + Outstanding int + RACKState TCPRACKState + RTO time.Duration + RTTMeasureSeqNum seqnum.Value + RTTMeasureTime tcpip.MonotonicTime + RTTState TCPRTTState + RetransmitTS uint32 + SackedOut int + SndCAAckCount int + SndCwnd int + SndNxt seqnum.Value + SndUna seqnum.Value + SndWnd seqnum.Size + SndWndScale uint8 + SpuriousRecovery bool + Ssthresh int + type TCPSndBufState struct + AutoTuneSndBufDisabled atomicbitops.Uint32 + PacketTooBigCount int + SndBufSize int + SndBufUsed int + SndClosed bool + SndMTU int + type Table struct + BuiltinChains [NumHooks]int + Rules []Rule + Underflows [NumHooks]int + func EmptyFilterTable() Table + func EmptyNATTable() Table + func (table *Table) ValidHooks() uint32 + type TableID int + const FilterID + const MangleID + const NATID + const NumTables + type Target interface + Action func(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int) + type TransportDispatcher interface + DeliverRawPacket func(tcpip.TransportProtocolNumber, *PacketBuffer) + DeliverTransportError func(local, remote tcpip.Address, _ tcpip.NetworkProtocolNumber, ...) + DeliverTransportPacket func(tcpip.TransportProtocolNumber, *PacketBuffer) TransportPacketDisposition + type TransportEndpoint interface + Abort func() + HandleError func(TransportError, *PacketBuffer) + HandlePacket func(TransportEndpointID, *PacketBuffer) + UniqueID func() uint64 + Wait func() + type TransportEndpointID struct + LocalAddress tcpip.Address + LocalPort uint16 + RemoteAddress tcpip.Address + RemotePort uint16 + type TransportEndpointInfo struct + BindAddr tcpip.Address + BindNICID tcpip.NICID + ID TransportEndpointID + NetProto tcpip.NetworkProtocolNumber + RegisterNICID tcpip.NICID + TransProto tcpip.TransportProtocolNumber + func (*TransportEndpointInfo) IsEndpointInfo() + func (t *TransportEndpointInfo) AddrNetProtoLocked(addr tcpip.FullAddress, v6only bool) (tcpip.FullAddress, tcpip.NetworkProtocolNumber, tcpip.Error) + type TransportError interface + Kind func() TransportErrorKind + type TransportErrorKind int + const DestinationHostDownTransportError + const DestinationHostUnreachableTransportError + const DestinationNetworkUnreachableTransportError + const DestinationPortUnreachableTransportError + const DestinationProtoUnreachableTransportError + const PacketTooBigTransportError + const SourceHostIsolatedTransportError + const SourceRouteFailedTransportError + type TransportPacketDisposition int + const TransportPacketDestinationPortUnreachable + const TransportPacketHandled + const TransportPacketProtocolUnreachable + type TransportProtocol interface + Close func() + HandleUnknownDestinationPacket func(TransportEndpointID, *PacketBuffer) UnknownDestinationPacketDisposition + MinimumPacketSize func() int + NewEndpoint func(netProto tcpip.NetworkProtocolNumber, waitQueue *waiter.Queue) (tcpip.Endpoint, tcpip.Error) + NewRawEndpoint func(netProto tcpip.NetworkProtocolNumber, waitQueue *waiter.Queue) (tcpip.Endpoint, tcpip.Error) + Number func() tcpip.TransportProtocolNumber + Option func(option tcpip.GettableTransportProtocolOption) tcpip.Error + Parse func(pkt *PacketBuffer) (ok bool) + ParsePorts func(b []byte) (src, dst uint16, err tcpip.Error) + Pause func() + Resume func() + SetOption func(option tcpip.SettableTransportProtocolOption) tcpip.Error + Wait func() + type TransportProtocolFactory func(*Stack) TransportProtocol + type UnicastSourceAndMulticastDestination struct + Destination tcpip.Address + Source tcpip.Address + type UniqueID interface + UniqueID func() uint64 + type UnknownDestinationPacketDisposition int + const UnknownDestinationPacketHandled + const UnknownDestinationPacketMalformed + const UnknownDestinationPacketUnhandled + type UserChainTarget struct + Name string + NetworkProtocol tcpip.NetworkProtocolNumber + func (*UserChainTarget) Action(*PacketBuffer, Hook, *Route, AddressableEndpoint) (RuleVerdict, int)