Versions in this module Expand all Collapse all v1 v1.0.0 Oct 10, 2023 Changes in this version + const DefaultTTL + var ErrFunnelNotFound = errors.New("funnel not found") + func FindIPVersion(p []byte) (uint8, error) + func FindProtocol(p []byte) (layers.IPProtocol, error) + type ActivityTracker struct + func NewActivityTracker() *ActivityTracker + func (at *ActivityTracker) LastActive() time.Time + func (at *ActivityTracker) UpdateLastActive() + type Encoder struct + func NewEncoder() *Encoder + func (e Encoder) Encode(packet Packet) (RawPacket, error) + type Funnel interface + Close func() error + Equal func(other Funnel) bool + LastActive func() time.Time + UpdateLastActive func() + type FunnelID interface + Type func() string + type FunnelTracker struct + func NewFunnelTracker() *FunnelTracker + func (ft *FunnelTracker) Get(id FunnelID) (Funnel, bool) + func (ft *FunnelTracker) GetOrRegister(id FunnelID, shouldReplaceFunc func(Funnel) bool, ...) (funnel Funnel, new bool, err error) + func (ft *FunnelTracker) ScheduleCleanup(ctx context.Context, idleTimeout time.Duration) + func (ft *FunnelTracker) Unregister(id FunnelID, funnel Funnel) (deleted bool) + type FunnelUniPipe interface + Close func() error + SendPacket func(dst netip.Addr, pk RawPacket) error + type ICMP struct + func NewICMPTTLExceedPacket(originalIP *IP, originalPacket RawPacket, routerIP netip.Addr) *ICMP + func (i *ICMP) EncodeLayers() ([]gopacket.SerializableLayer, error) + type ICMPDecoder struct + func NewICMPDecoder() *ICMPDecoder + func (pd *ICMPDecoder) Decode(packet RawPacket) (*ICMP, error) + type IP struct + Dst netip.Addr + Protocol layers.IPProtocol + Src netip.Addr + TTL uint8 + func (ip *IP) EncodeLayers() ([]gopacket.SerializableLayer, error) + func (ip *IP) IPLayer() *IP + type IPDecoder struct + func NewIPDecoder() *IPDecoder + func (pd *IPDecoder) Decode(packet RawPacket) (*IP, error) + type Packet interface + EncodeLayers func() ([]gopacket.SerializableLayer, error) + IPLayer func() *IP + type PseudoHeader struct + DstIP [16]byte + NextHeader uint8 + SrcIP [16]byte + UpperLayerPacketLength uint32 + func (ph *PseudoHeader) Marshal() []byte + type RawPacket struct + Data []byte + type Session struct + ID uuid.UUID + Payload []byte