Post #766012
2026-03-01 03:27 UTC
I just documented the protocol that udev uses to broadcast messages to clients: https://arcanenibble.github.io/hardware-hotplug-events-on-linux-the-gory-details.html
Comes with bonus free sample code <strike>on the included CD-ROM</strike>!
This is how programs on Linux listen for events such as "you plugged in a USB device" in order to.... do something useful with that information (such as opening the files on it). Normally, this "just works", but the low-level details of _how_ it works doesn't seem to be that well known.
boosts ok!
Replies (1)
-
@khleedril@cyberplace.social 2026-03-01 06:11
@r That's a great write-up. I always laugh at the thought of netlink. I stumbled across it when I was trying to get notice when the machine woke from suspension (the power module does this). It is one of those examples where somebody has the brainwave to re-use some functionality which is already there, and then the idea gets taken up by half a dozen random modules and used in half a dozen random ways.