STRUCT SSAM_CDEV_REQUEST(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct ssam_cdev_request(9) β€” the Kernel API Manual, bestie edition ✨

okay so picture this: it's section 9 of the Kernel API Manual, and the star of the show is struct ssam_cdev_request β€” literally the IOCTL argument for a Controller request πŸŽ€ she's the little envelope you hand the kernel when you want it to go talk to the Surface Aggregator for you. main character energy fr fr.


✨ SYNOPSIS ✨

no cap, here's the whole shape of her β€” copy it exactly, she's picky:

struct ssam_cdev_request {
    __u8 target_category;
    __u8 target_id;
    __u8 command_id;
    __u8 instance_id;
    __u16 flags;
    __s16 status;
    struct {
      __u64 data;
      __u16 length;
      __u8 __pad[6];
    } payload;
    struct {
      __u64 data;
      __u16 length;
      __u8 __pad[6];
    } response;
 };

🌸 MEMBERS 🌸

she's got options, and every single one of them matters. let's do a vibe check on each πŸ‘‘

  • target_category β€” the target category of the SAM request 🎯 like, which hood we're pulling up on.
  • target_id β€” the target ID of the SAM request πŸ’« the specific address inside that hood.
  • command_id β€” the command ID of the SAM request πŸ“¨ what we're actually asking her to do.
  • instance_id β€” the instance ID of the SAM request 🧚 the instance in question, iykyk.
  • flags β€” request flags, and yes she has her own little enum β€” go peek at enum ssam_cdev_request_flags 🚩.
  • status β€” request status, and heads up bestie: this one is an output πŸ“€ it's what she tells you.
  • payload β€” request payload, i.e. the input data you're sending in πŸ“₯πŸ’–

πŸ“ payload sub-members

  • payload.data β€” pointer to the request payload data. just a pointer, she's not carrying the data herself, she's pointing at it 🫡
  • payload.length β€” length of the request payload data, measured in bytes πŸ“ no vibe-based units, actual bytes.

πŸ¦‹ response sub-members

  • response β€” request response, the output data coming back atcha πŸ“¬
  • response.data β€” pointer to the response buffer. again: pointing, not holding πŸ’…
  • response.length β€” and this one is a lil sneaky, she pulls double duty 😭
    • On input: the capacity of the response buffer, in bytes β€” like, how much room she's allowed to fill.
    • On output: the length of the request response β€” the number of bytes in the buffer that are actually used. so she comes back telling you how much of the space she really used. iconic honestly.

🌈 SEE ALSO 🌈

go read these next, they're all linked in the group chat:

  • Kernel file ./include/uapi/linux/surface_aggregator/cdev.h
  • enum ssam_cdev_request_flags(9)
  • struct ssam_cdev_notifier_desc(9)
  • struct ssam_cdev_event_desc(9)
  • struct ssam_cdev_event(9)

⭐ reminder bestie: status is output, payload is input, and response.length is both directions. do NOT get them mixed up or the kernel will simply not be slaying πŸ’€

and that's the whole page 🫢 straight out of ./include/uapi/linux/surface_a..., dated October 2026, struct ssam_cdev_request(9) β€” periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from