File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,13 +54,20 @@ impl ProcessLookup for NoOpProcessLookup {
5454
5555/// Create a platform-specific process lookup with PKTAP status awareness
5656pub fn create_process_lookup_with_pktap_status (
57- _pktap_active : bool ,
57+ pktap_active : bool ,
5858) -> Result < Box < dyn ProcessLookup > > {
5959 #[ cfg( target_os = "macos" ) ]
60- if _pktap_active {
61- log:: info!( "Using no-op process lookup - PKTAP provides process metadata" ) ;
62- return Ok ( Box :: new ( NoOpProcessLookup ) ) ;
60+ {
61+ use crate :: network:: platform:: macos:: MacOSProcessLookup ;
62+
63+ if pktap_active {
64+ log:: info!( "Using no-op process lookup - PKTAP provides process metadata" ) ;
65+ Ok ( Box :: new ( NoOpProcessLookup ) )
66+ } else {
67+ Ok ( Box :: new ( MacOSProcessLookup :: new ( ) ?) )
68+ }
6369 }
70+
6471 #[ cfg( target_os = "linux" ) ]
6572 {
6673 #[ cfg( feature = "ebpf" ) ]
@@ -88,11 +95,6 @@ pub fn create_process_lookup_with_pktap_status(
8895 Ok ( Box :: new ( WindowsProcessLookup :: new ( ) ?) )
8996 }
9097
91- #[ cfg( target_os = "macos" ) ]
92- {
93- Ok ( Box :: new ( MacOSProcessLookup :: new ( ) ?) )
94- }
95-
9698 #[ cfg( not( any( target_os = "linux" , target_os = "windows" , target_os = "macos" ) ) ) ]
9799 {
98100 Err ( anyhow:: anyhow!( "Unsupported platform" ) )
You can’t perform that action at this time.
0 commit comments