aead_request_set_callback(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… aead_request_set_callback(9) πŸ’…

Straight outta the Kernel API Manual, bestie β€” and it’s giving β€œwire up that async callback” energy. ✨

πŸŽ€ NAME πŸŽ€

aead_request_set_callback β€” set asynchronous callback function πŸ’–

πŸ’– SYNOPSIS πŸ’–

void aead_request_set_callback (struct aead_request *req , u32 flags ,
       crypto_completion_t compl , void *data );

πŸ”₯ ARGUMENTS πŸ”₯

  • req β€” request handle, periodt. 🫢
  • flags β€” specify zero or an ORing of the flags:
    • CRYPTO_TFM_REQ_MAY_BACKLOG β€” the request queue may back log and increase the wait queue beyond the initial maximum size;
    • CRYPTO_TFM_REQ_MAY_SLEEP β€” the request processing may sleep.
  • compl β€” callback function pointer to be registered with the request handle. ✨
  • data β€” The data pointer refers to memory that is not used by the kernel crypto API, but provided to the callback function for it to use. Here, the caller can provide a reference to memory the callback function can operate on. As the callback function is invoked asynchronously to the related functionality, it may need to access data structures of the related functionality which can be referenced using this pointer. The callback function can access the memory via the "data" field in the crypto_async_request data structure provided to the callback function. πŸ’…

🌸 DESCRIPTION 🌸

Okay so this is literally setting the callback function that is triggered once the cipher operation completes. πŸ˜­πŸ’–

The callback function is registered with the aead_request handle and must comply with the following template, no cap:

void callback_function(struct crypto_async_request *req, int error)

πŸ¦‹ SEE ALSO πŸ¦‹


Source/version vibe: ./include/crypto Β· dated: October 2026 Β· aead_request_set_callback(9) β€” bye bestie, ily πŸ’‹βœ¨

πŸ“¦ where this page comes from