This file describes the API between suspend_userui kernel module and userui_core. userui communicates with the kernel over a netlink socket. The sequence of events when suspending with userui activated goes something like: 1. suspend_userui creates a netlink socket over which processes can communicate with it. 2. suspend_userui forks off the userui process (pointed to by /proc/software_suspend/userui_program) and waits until it sends a USERUI_MSG_READY message or a timeout expires (10 seconds). 3. userui runs, and sends a USERUI_MSG_NOFREEZE_ME packet. 4. suspend_userui sets the PF_NOFREEZE flag on the userui process, so that this may be inherited by any children it spawns. It the sends an ack back to the processing telling it to proceed. 5. suspend_userui does the necessary preparation, and sends a USERUI_MSG_READY when it's done its preparation. It then simply waits for events to occur and process them. 6. suspend_userui and the kernel code send messages to each other to inform about the progress of suspending and events. 7. When the kernel code is finished with its work, it sends USERUI_MSG_CLEANUP and the userui program exits. Life goes on...