STRUCT SSAM_CDEV_REQUEST(9)
π 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 atenum 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:statusis output,payloadis input, andresponse.lengthis 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms