aboutsummaryrefslogtreecommitdiffstats
path: root/include/afb/afb-req-itf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/afb/afb-req-itf.h')
-rw-r--r--include/afb/afb-req-itf.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/afb/afb-req-itf.h b/include/afb/afb-req-itf.h
index bc4b618c..153887b0 100644
--- a/include/afb/afb-req-itf.h
+++ b/include/afb/afb-req-itf.h
@@ -83,6 +83,16 @@ struct afb_req {
};
/*
+ * Checks wether the request 'req' is valid or not.
+ *
+ * Returns 0 if not valid or 1 if valid.
+ */
+static inline int afb_req_is_valid(struct afb_req req)
+{
+ return req.itf != NULL;
+}
+
+/*
* Gets from the request 'req' the argument of 'name'.
* Returns a PLAIN structure of type 'struct afb_arg'.
* When the argument of 'name' is not found, all fields of result are set to NULL.