Hello,
I am not aware of a mechanism or API that's built into builtDriverKit which can be used by a dext to search for and open a connection with an arbitrary kext.
What I recommend you look into is creating a helper app/process that opens a user client connection with the dext, as well as opens a connection with the kext, and acts as bridge between the kext and the dext.
See the "NewUserClient" description for
details on how an app can open a user client connection with a dext:
"Override this method if your service supports communication though an external user client.
When an app calls IOServiceOpen to start a new service, the system calls this method on the
service passed to that function. In your implementation, call the Create method to create a new
IOUserClient object for your service and return that object in the userClient parameter."
You mentioned a "virtual networking KEXT" so I thought it'd be worthwhile to mention that a number of networking KPIs are deprecated in macOS 10.15.4. See the "Deprecated Kernel Extensions and System Extension Alternatives"
article for details on which of the networking KPIs have been deprecated. Note also the statement in this article that "Kernel programming interfaces (KPIs) will be deprecated as alternatives become available, and future OS releases will no longer load kernel extensions that use deprecated KPIs by default."
If your virtual networking kext uses any of the KPIs described in the networking section of this article then you should expect that your kext will trigger a notification to the user that software (your kext) uses a deprecated KPI and that they (the user) should contact the developer for an alternative. In short, if your virtual networking kext uses any of the deprecated KPIs then I strongly recommend that you migrate to a non-kext solution as quickly as possible.
Best regards,
C.