Syndicated actor for publishing Linux device events
Go to file
Emery Hemingway 9906654543 Initial commit 2023-07-02 15:23:12 +01:00
src Initial commit 2023-07-02 15:23:12 +01:00
.envrc Initial commit 2023-07-02 15:23:12 +01:00
README.md Initial commit 2023-07-02 15:23:12 +01:00
Tuprules.tup Initial commit 2023-07-02 15:23:12 +01:00
shell.nix Initial commit 2023-07-02 15:23:12 +01:00
syndev.nimble Initial commit 2023-07-02 15:23:12 +01:00
uevent.prs Initial commit 2023-07-02 15:23:12 +01:00

README.md

Syndicated Device Event Broadcaster

An actor for broadcasting Linux Kernel uevents.

Intended as part of native a device manager for Synit. This is not a replacement for udev/eudev or mdev/mdevd.

Message Schema is at ./uevent.prs.

If you are looking for documentation on how to parse and handle Linux uevents, please let me know when you find it.

Example Syndicate server configuration:

? <machine-dataspace ?machine> [

  <require-service <daemon syndev>>

  <daemon syndev {
    argv: ["/bin/syndev"]
    protocol: application/syndicate
  }>

  ? <service-object <daemon syndev> ?cap> [
    $cap { machine: $machine }
  ]
]

Example message stream:

<uevent 32663 add {DEVNAME: "input/event23", DEVPATH: "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.4/0003:1D50:6122.0026/input/input47/event23", MAJOR: "13", MINOR: "87", SUBSYSTEM: "input"}>
<uevent 32664 add {DEVNAME: "input/mouse5", DEVPATH: "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.4/0003:1D50:6122.0026/input/input47/mouse5", MAJOR: "13", MINOR: "37", SUBSYSTEM: "input"}>
<uevent 32665 add {DEVNAME: "hidraw10", DEVPATH: "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.4/0003:1D50:6122.0026/hidraw/hidraw10", MAJOR: "247", MINOR: "10", SUBSYSTEM: "hidraw"}>
<uevent 32666 bind {DEVPATH: "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.4/0003:1D50:6122.0026", DRIVER: "hid-generic", HID_ID: "0003:00001D50:00006122", HID_NAME: "Ultimate Gadget Laboratories Ultimate Hacking Keyboard", HID_PHYS: "usb-0000:00:14.0-3/input4", HID_UNIQ: "", MODALIAS: "hid:b0003g0001v00001D50p00006122", SUBSYSTEM: "hid"}>
<uevent 32667 bind {DEVPATH: "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.4", DEVTYPE: "usb_interface", DRIVER: "usbhid", INTERFACE: "3/1/2", MODALIAS: "usb:v1D50p6122d0101dc00dsc00dp00ic03isc01ip02in04", PRODUCT: "1d50/6122/101", SUBSYSTEM: "usb", TYPE: "0/0/0"}>