diff --git a/probe/endpoint/connection_tracker.go b/probe/endpoint/connection_tracker.go index c7bd029b9..511bb280d 100644 --- a/probe/endpoint/connection_tracker.go +++ b/probe/endpoint/connection_tracker.go @@ -27,7 +27,7 @@ type connectionTrackerConfig struct { type connectionTracker struct { conf connectionTrackerConfig flowWalker flowWalker // Interface - ebpfTracker eventTracker + ebpfTracker *EbpfTracker reverseResolver *reverseResolver } diff --git a/probe/endpoint/ebpf.go b/probe/endpoint/ebpf.go index 0b619901f..895c468de 100644 --- a/probe/endpoint/ebpf.go +++ b/probe/endpoint/ebpf.go @@ -24,15 +24,6 @@ type ebpfConnection struct { pid int } -type eventTracker interface { - handleConnection(ev tracer.EventType, tuple fourTuple, pid int, networkNamespace string) - walkConnections(f func(ebpfConnection)) - feedInitialConnections(ci procspy.ConnIter, seenTuples map[string]fourTuple, processesWaitingInAccept []int, hostNodeID string) - isReadyToHandleConnections() bool - isDead() bool - stop() -} - // EbpfTracker contains the sets of open and closed TCP connections. // Closed connections are kept in the `closedConnections` slice for one iteration of `walkConnections`. type EbpfTracker struct { @@ -80,7 +71,7 @@ func isKernelSupported() error { return nil } -func newEbpfTracker() (eventTracker, error) { +func newEbpfTracker() (*EbpfTracker, error) { if err := isKernelSupported(); err != nil { return nil, fmt.Errorf("kernel not supported: %v", err) }