Skip to main content

Module netlink

Module netlink 

Source
Expand description

Netlink socket helpers.

Provides a non-blocking NETLINK_KOBJECT_UEVENT socket for receiving kernel uevents (power supply changes, hotplug events, etc.).

Functionsยง

uevent_drain_battery
Drain all pending uevent messages; return the last battery (level_pct, status) seen.
uevent_open
Open a non-blocking NETLINK_KOBJECT_UEVENT socket bound to all kernel groups.