Re: ifnet_attach/detach notifications in kext
Re: ifnet_attach/detach notifications in kext
- Subject: Re: ifnet_attach/detach notifications in kext
- From: Josh Graessley <email@hidden>
- Date: Wed, 18 Jan 2012 14:21:01 -0800
On Jan 18, 2012, at 12:48 PM, Gary Kratkin wrote:
> Hello,
>
> How can I get notifications in my kext of network interfaces attaching and detaching? I'm specifically interesting in utun interfaces, which aren't picked up by listening on IONetworkInterface matching notifications. It seems I should be able to listen on the associated kernel event, but I don't see any examples of doing that from kernel space.
I believe you can do that in the kernel using a kernel event socket. You'll need to use the socket kpis to create the in-kernel kernel event socket to listen for notifications (sock_socket, etc... from sys/kpi_socket.h). See:
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/KernelIOKitFramework/kpi_socket_h/
I'm not aware of a good example.
-josh
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden