Documentation
¶
Overview ¶
Package packetview supplies bounded, scope-preserving inner datagram views. A Processor is owned by the collector's serialized admission path.
Index ¶
- func Accounting(p gopacket.Packet) (count, bytes, first, last int64)
- func FillContext(dst *types.PacketContext, p gopacket.Packet)
- func Scope(p gopacket.Packet) string
- func ScopeFlow(ci gopacket.CaptureInfo) gopacket.Flow
- func ScopeHash(p gopacket.Packet) uint64
- func ScopeInterface(p gopacket.Packet, base string) string
- type Context
- type Limits
- type Processor
- type Result
- type Stats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Accounting ¶
Accounting attributes original wire packets to a completed datagram once.
func FillContext ¶
func FillContext(dst *types.PacketContext, p gopacket.Packet)
Types ¶
type Context ¶
type Context struct {
Scope string
Tunnels []*types.Encapsulation
Packets []*types.CapturePacketRef
Reassembled bool
CompletedAt time.Time // admission time; CaptureInfo.Timestamp remains the earliest evidence
Status string
SyntheticNetwork bool // its original fragment headers were already audited
}
Context is immutable after dispatch and survives TCP/UDP capture-info copies.
func FromCapture ¶
func FromCapture(ci gopacket.CaptureInfo) *Context
type Limits ¶
type Limits struct {
MaxDatagrams, MaxBytes, MaxFragments, MaxDepth int
Timeout time.Duration
Checksum bool // validate original IPv4 fragment headers before reconstruction
}
func DefaultLimits ¶
func DefaultLimits() Limits
type Processor ¶
type Processor struct {
// contains filtered or unexported fields
}
func (*Processor) ExpireIdle ¶
ExpireIdle is for live-capture maintenance; offline expiry uses capture time.
type Result ¶
type Result struct {
Original gopacket.Packet
Evidence []gopacket.Packet
Packet gopacket.Packet
Opaque gopacket.Packet // unresolved tunnel: network Connection only, never transport dispatch
Status string
}
Result separates original header evidence from the one datagram eligible for application dispatch. Original owns pooled memory until all views are consumed.