1

I am new to IPC and am trying to implement a common buffer between kernel and user space processes. My design will be in such a way,

I will have a library(in user space) where my client socket tries to connect to a user space daemon(having the buffer) waiting for a connection. The processes trying to access the buffer has to link the library and post messages to the socket. Thus the messages are posted to buffer. This will be very easy to implement for only user space processes

socket(AF_UNIX, SOCK_STREAM, 0);

But my ask is how to use the same library in the kernel space to communicate with the user space daemon(having the buffer). As we know the below API will be used from user space for netlink sockets

socket(PF_NETLINK, SOCK_RAW,NETLINK_TEST);

Is there any ways to combine the both in the same library, so that both kernel and user space processes can make use of the library?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.