I have been working on an older version of Linux on which I wanted to use netlink as a way to post events from kernelspace to userspace. I wanted to avoid using Netlink Protocol Library Suite (libnl) so that I could delve deeper into netlink and have better control of what I am doing. I was already successful in using Generic Netlink Sockets to perform two way request-response communication between kernelspace and userspace. This time I referred ACPI daemon 1.0.10's source and used genlmsg_multicast() to post events from the kernel side. The implementation of netlink has evolved over time and the following code ought to work only on kernels versioned around 2.6.35 (I tested my code on Ubuntu 10.10) Source Code Organization: kern/genl_event.c: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 ...