1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>aead_request_set_callback</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Kernel Crypto API"><link rel="up" href="ch05s06.html" title="Asynchronous AEAD Request Handle"><link rel="prev" href="API-aead-request-free.html" title="aead_request_free"><link rel="next" href="API-aead-request-set-crypt.html" title="aead_request_set_crypt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">aead_request_set_callback</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-aead-request-free.html">Prev</a>&#160;</td><th width="60%" align="center">Asynchronous AEAD Request Handle</th><td width="20%" align="right">&#160;<a accesskey="n" href="API-aead-request-set-crypt.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-aead-request-set-callback"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>aead_request_set_callback &#8212; 
2  set asynchronous callback function
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">void <b class="fsfunc">aead_request_set_callback </b>(</code></td><td>struct aead_request * <var class="pdparam">req</var>, </td></tr><tr><td>&#160;</td><td>u32 <var class="pdparam">flags</var>, </td></tr><tr><td>&#160;</td><td>crypto_completion_t <var class="pdparam">compl</var>, </td></tr><tr><td>&#160;</td><td>void * <var class="pdparam">data</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1097734948"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>req</code></em></span></dt><dd><p>
4     request handle
5    </p></dd><dt><span class="term"><em class="parameter"><code>flags</code></em></span></dt><dd><p>
6     specify zero or an ORing of the flags
7     CRYPTO_TFM_REQ_MAY_BACKLOG the request queue may back log and
8     increase the wait queue beyond the initial maximum size;
9     CRYPTO_TFM_REQ_MAY_SLEEP the request processing may sleep
10    </p></dd><dt><span class="term"><em class="parameter"><code>compl</code></em></span></dt><dd><p>
11     callback function pointer to be registered with the request handle
12    </p></dd><dt><span class="term"><em class="parameter"><code>data</code></em></span></dt><dd><p>
13     The data pointer refers to memory that is not used by the kernel
14     crypto API, but provided to the callback function for it to use. Here,
15     the caller can provide a reference to memory the callback function can
16     operate on. As the callback function is invoked asynchronously to the
17     related functionality, it may need to access data structures of the
18     related functionality which can be referenced using this pointer. The
19     callback function can access the memory via the <span class="quote">&#8220;<span class="quote">data</span>&#8221;</span> field in the
20     crypto_async_request data structure provided to the callback function.
21    </p></dd></dl></div></div><div class="refsect1"><a name="idp1097740468"></a><h2>Description</h2><p>
22   Setting the callback function that is triggered once the cipher operation
23   completes
24   </p><p>
25
26   The callback function is registered with the aead_request handle and
27   must comply with the following template
28   </p><p>
29
30   void callback_function(struct crypto_async_request *req, int error)
31</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-aead-request-free.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch05s06.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="API-aead-request-set-crypt.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">aead_request_free</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<span class="phrase">aead_request_set_crypt</span></td></tr></table></div></body></html>
32