kernel user space communication
Hi
I need to know how to communicate between kernel module and userspace application I found that it is possible to communicate * using devices /dev/xxx ( open , read, write, clode , ioctl) * using /proc filesystem * using netlink is there another mean of communication especially to notify userspace about event as signal or inotify ? |
The kernel documentation talks a lot about this in various places, and the best way to consider this sort of issue is to browse through the drivers and so-on to see how they do it. (For example, notice how udev communicates with its helper daemon.)
Also consider what might be most useful for your programs. It's very nice when a program can simply do a blocking-read or blocking-write to a "device," because any ol' program can do that. And it's also very easy, on the kernel side of things, to "write something." The entire notion of the "/proc" and "/sys" filesystems is brilliant, because it lets "any ol' program" retrieve, and set, all sorts of funky information just by reading and writing to "a file." |
All times are GMT -5. The time now is 06:20 AM. |