Hello everyone, This week I've studied how to implement a virtual driver that will be used for communication between the userspace daemon and clients. After a talk on irc with Markus and Swildner, it was decided to write the code in sys/dev/misc.
One of the driver's purpose is to initiate the communication between daemon and clients. I have studied a similar scenario in Android, where a driver called Binder is used for IPC purposes. Using it, two unrelated processes can communicate using unnamed pipes. The server makes pipe() call and announces the driver that it want to establish a connection with a client using that pipe. The driver installs for the client a file descriptor which points to the specified pipe. The daemon use poll in order to accept requestes from new clients (data from driver) and messages from old clients (data from pipes). Here [1] is my repo where I have created a new branch. [1] http://gitweb.dragonflybsd.org/~larisagrigore/dragonfly.git Larisa
