Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anybody know equivalent for NETLINK Sockets API for MAC OS X?

Does anybody know equivalent for NETLINK Sockets API for MAC OS X ? I am trying to port Linux application to MAC OS X and I couldn’t find anything similar in MACOS.

I need to provide asynchronous access to the network adapter in my application.

Polling network adapter about configuration changes etc every certain amount of seconds is not convenient solution for me. NETLINK Socket API game me way to receive notification only when something interesting happened.

I know that NETLINK is Linux specific thing to communicate between Linux kernel and user space, but maybe there is exist something like NETLINK under MACOS.

I see the the only tool to communicate with kernel – sysctl()

Does anybody have any info?

like image 659
Vlad Avatar asked Dec 21 '10 11:12

Vlad


1 Answers

You can use the kernel control architecture which is documented in the NKE section of their docs that OSX provides for that reason.

like image 126
big ben Avatar answered Oct 24 '22 08:10

big ben