summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-01-30 13:05:12 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-30 13:12:03 +0100
commit4da09e3a9d2cd10faff27df158192d2a7917b6ed (patch)
tree6e371616107791bf4f8e4f8c833b83461232c183
parentc14fe691c549c6dfa8c79b032abbdd6d7e563b06 (diff)
src: fix documentation regarding nfct_catch() and nfexp_catch()
Stefan reported that the *_catch() functions documentation was imprecise on some aspects. Reported-by: Stefan Nicolae Stancu <Stefan.Stancu@cern.ch> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/conntrack/api.c10
-rw-r--r--src/expect/api.c10
2 files changed, 16 insertions, 4 deletions
diff --git a/src/conntrack/api.c b/src/conntrack/api.c
index cad860e..09270ee 100644
--- a/src/conntrack/api.c
+++ b/src/conntrack/api.c
@@ -1006,9 +1006,15 @@ int nfct_send(struct nfct_handle *h,
* nfct_catch - catch events
* \param h library handler
*
- * On error, -1 is returned and errno is set appropiately. On success,
+ * This function receives the event from the kernel and it invokes the
+ * callback that was registered to this handle.
+ *
+ * On error, -1 is returned and errno is set appropiately. On success,
* a value greater or equal to 0 is returned indicating the callback
- * verdict: NFCT_CB_STOP, NFCT_CB_CONTINUE or NFCT_CB_STOLEN
+ * verdict: NFCT_CB_STOP, NFCT_CB_CONTINUE or NFCT_CB_STOLEN.
+ *
+ * Beware that this function also handles expectation events, in case they are
+ * received through this handle.
*/
int nfct_catch(struct nfct_handle *h)
{
diff --git a/src/expect/api.c b/src/expect/api.c
index a101042..a1dbbff 100644
--- a/src/expect/api.c
+++ b/src/expect/api.c
@@ -720,9 +720,15 @@ int nfexp_send(struct nfct_handle *h,
* nfexp_catch - catch events
* \param h library handler
*
- * On error, -1 is returned and errno is set appropiately. On success,
+ * This function receives the event from the kernel and it invokes the
+ * callback that was registered to this handle.
+ *
+ * On error, -1 is returned and errno is set appropiately. On success,
* a value greater or equal to 0 is returned indicating the callback
- * verdiexp: NFEXP_CB_STOP, NFEXP_CB_CONTINUE or NFEXP_CB_STOLEN
+ * verdict: NFCT_CB_STOP, NFCT_CB_CONTINUE or NFCT_CB_STOLEN.
+ *
+ * Beware that this function is equivalent to nfct_catch(), so it handles both
+ * conntrack and expectation events.
*/
int nfexp_catch(struct nfct_handle *h)
{