Re: Interface for communicating from kernel to user mode

Peter Skvarka <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel
Organization Soft in Engines
Message-ID <[email protected]>
> - Userland creates an AF_LOCAL SOCK_STREAM socketpair and passes one of
>     the resulting socket fds to the kernel, which takes over the
>     referenced socket and uses it, with userland reading from and
>     writing to the other socket.

I need this for notifying about some event in kernel module with 
transferring small data (i.e. uint64_t)
and for confirming from user mode that notification was processed.

Does exist any sample for this kind of above communication ?
It is clean what must be setup on user mode side, question is kernel side.

when fds is passed to kernel with ioctl to kernel module,
then fsd can be used only with these two functions for sending to user 
mode and receiving from user mode ?

int     sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int);
int     recvmmsg(int, struct mmsghdr *, unsigned int, unsigned int, 
struct timespec *);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.