af_alg_get_rsgl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– af_alg_get_rsgl β€” bestie, let's build the RX SGL for the output data from the crypto operation

okay so this is the page for af_alg_get_rsgl(9) from the Kernel API Manual, and it is literally the function that creates the RX SGL for the output data from the crypto operation. that's the whole vibe. it's giving "scatterlist glow-up" and i'm obsessed πŸŽ€


✨ SYNOPSIS ✨

int af_alg_get_rsgl (struct sock *sk , struct msghdr *msg , int flags ,
       struct af_alg_async_req *areq , size_t maxsize , size_t *outlen );

no cap, that's the signature, copied exactly, don't come for me 🫢


🌸 ARGUMENTS 🌸

okay so here's who's who at the function party β€” every single one of them:

  • sk β€” socket of connection to user space. that's the link to the userland side of things, the bridge bestie πŸ’…
  • msg β€” user space message. the actual message, living its life over in user space ✨
  • flags β€” flags used to invoke recvmsg with. yes, those flags. the recvmsg ones. πŸ”₯
  • areq β€” instance of the cryptographic request that will hold the RX SGL. it's the main character that's gonna carry the SGL for us πŸ‘‘
  • maxsize β€” maximum number of bytes to be pulled from user space. a hard cap, a limit, a boundary β€” respect it 🧚
  • outlen β€” number of bytes in the RX SGL. this is where the count gets reported back, iykyk πŸ¦‹

⭐ RETURN ⭐

  • 0 on success πŸ’–
  • < 0 upon error 😭 (yes, less than zero β€” negative numbers mean something went wrong, fr fr)

🌈 SEE ALSO 🌈

Kernel file ./crypto/af_alg.c, plus the whole af_alg friend group β€” every single one, no gatekeeping:


bestie reminder: 0 means slay, anything < 0 means something went sideways. don't ignore a negative return, that's not cute πŸ™ˆ

and that's the page, periodt πŸ’œ β€” brought to you by the ./crypto corner of the kernel, dated October 2026, and filed under af_alg_get_rsgl(9) in the Kernel API Manual. mwah, go read the source, ily 🫢✨

πŸ“¦ where this page comes from