Does anyone use netlink for IPC?

I plan to use netlink to communicate between the two userland processes. One of the reasons that such mobility is associated with the network is that most of the processing for one of the processes will ultimately take place in the kernel space, and network-based communication can be used as is (I hope).

The approach I take is to define a new Generic Netlink family (I will need to write a kernel module to support this family - as it seems at the moment). This is normal, I looked at the sample code where the core was essentially only a routing message between different processes and did not do any work - the actual set of these messages is processed by the processes.

My question is: does anyone use netlink in the same way in any of the projects? Also - does this approach make sense?

I read about the proposal for netlink based DBUS. But this could not be realized. This is closest to my requirements.

Thanks.

+9
linux netlink ipc
source share
1 answer

What you are looking for is NETLINK_USERSOCK if you want to communicate between user space processes.

Unfortunately, the Netlink documentation is terribly poor. This might help a little: Who can give me the latest netlink programming samples?

Just make sure that nl_pid is non-zero and matches the one to which the user's access point is attached, and that you are sending unicast.

+6
source share

All Articles