Capture Network Events using System Extension

Hello,

My app captures network events such as TCP/UDP/ICMP/HTTP/DNS. As kext is being deprecated, I am looking for ways to implement the same functionality via system extensions. Should I write a NEFilterDataProvider and inspect each flow to determine its nature? What is the recommended approach?




NEFilterDataProvider is the right solution.
Thank you. In that case, I should use the NEFilterSocketFlow properties to identify each flow.

Is there a deadline before which the NEFilterNewFlowVerdict should be returned for the handleNewflow?
Correct, NEFilterSocketFlow is the one to use. The verdict must be return at the end of handleNewFlow. But there is also a verdict to pause and an API to resume out of band in case your provider wants to explicitly pause a flow.

Capture Network Events using System Extension
 
 
Q