STRUCT LEAPRAID_IOCTL_COMMAND(9)
π struct leapraid_ioctl_command β the Kernel API Manual glow-up β¨
okay bestie, buckle up π this is struct leapraid_ioctl_command from the Kernel API Manual, aka the IOCTL command structure. yes it's a struct, yes it has a flexible array at the end, yes it's iconic. let's get into it π
β¨ NAME β¨
struct leapraid_ioctl_command β the IOCTL command structure. that's it, that's the vibe π¦
πΈ SYNOPSIS πΈ
here's the whole shape of her, literally verbatim, don't touch a single character:
struct leapraid_ioctl_command {
struct leapraid_ioctl_header hdr;
u32 timeout;
void __user *rep_msg_buf_ptr;
void __user *c2h_buf_ptr;
void __user *h2c_buf_ptr;
void __user *sense_data_ptr;
u32 max_rep_bytes;
u32 c2h_size;
u32 h2c_size;
u32 max_sense_bytes;
u32 data_sge_offset;
u8 mf[];
};
likeβ¦ she's structured, she's organized, she ate π₯
π¦ Members π¦
bestie these are the fields, and no we are not skipping any of them, every single one gets her moment π
hdrβ the IOCTL header. the little intro before the main character arrives π«timeoutβ command timeout. the "how long are we waiting around for this" number β³rep_msg_buf_ptrβ a user pointer to the reply message buffer. yes, user pointer, keep that in mind π«Άc2h_buf_ptrβ a user pointer to the card-to-host data buffer. card β‘οΈ host, get it? π₯h2c_buf_ptrβ a user pointer to the host-to-card data buffer. host β‘οΈ card, the other direction, we love a symmetrical queen πsense_data_ptrβ a user pointer to the sense data buffer. she's got sense, obviously πmax_rep_bytesβ maximum reply bytes. the ceiling on how much reply you can get πc2h_sizeβ the card-to-host data size. π¦h2c_sizeβ the host-to-card data size. π¦max_sense_bytesβ maximum sense data bytes. again, boundaries, we respect them β¨data_sge_offsetβ the data SGE offset. offsets are lowkey underrated ngl πmfβ the message frame data, and she's a flexible array. flexible, like your plans on a friday night π
fr fr, four of these are __user pointers pointing at user buffers β that's literally in the types, i'm not making it up π
π SEE ALSO π
go read these next, i'm obsessed with a cross-reference moment:
- Kernel file
./drivers/scsi/leapraid/leapraid_app.c struct leapraid_ioctl_header(9)struct leapraid_ioctl_diag_reset(9)struct leapraid_ioctl_pci_info(9)struct leapraid_ioctl_adapter_info(9)
and that's the page!! π this whole thing lives at ./drivers/scsi/leapraid, it's dated October 2026, and the page title is literally struct leap...octl_command(9) (yes, truncated with the dots, that's the actual string, she's mysterious like that π). mwah, study hard, ily, bye ππ§ββοΈ
π¦ 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