Some code to implement the char device that will communicate with the daemon.