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 LogicalInterface(ci gopacket.CaptureInfo) int
- 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
- func TimeUnavailable(ci gopacket.CaptureInfo) bool
- type CaptureInterface
- type Context
- type Limits
- type Processor
- type Result
- type Stats
- type TimestampMissing
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)
func LogicalInterface ¶ added in v0.16.7
func LogicalInterface(ci gopacket.CaptureInfo) int
func ScopeFlow ¶
func ScopeFlow(ci gopacket.CaptureInfo) gopacket.Flow
ScopeFlow supplies an opaque, direction-independent third reassembly key. Network endpoints remain unmodified for checksums and application attribution.
func ScopeInterface ¶
ScopeInterface fits the existing host/detection scope schema without changing it.
func TimeUnavailable ¶ added in v0.16.7
func TimeUnavailable(ci gopacket.CaptureInfo) bool
Types ¶
type CaptureInterface ¶ added in v0.16.7
type CaptureInterface int
CaptureInterface is an explicit logical identity; capture refs retain physical ordinals.
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
LinkTransformations []*types.LinkTransformation
}
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 {
DisableIPv4Defrag bool
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 {
Issues []string
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.
type TimestampMissing ¶ added in v0.16.7
type TimestampMissing bool