]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
Docs for Rose callback types
authorJustin Viiret <justin.viiret@intel.com>
Thu, 14 Jan 2016 02:45:44 +0000 (13:45 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 1 Mar 2016 00:29:04 +0000 (11:29 +1100)
src/rose/rose.h
src/rose/rose_types.h

index 16cfa435359447bfab0408306da09468de07a2b2..95750363c266b0195ec8a698ec3cabf9fc87eef0 100644 (file)
@@ -124,6 +124,4 @@ void roseEodExec(const struct RoseEngine *t, u64a offset,
                  struct hs_scratch *scratch, RoseCallback callback,
                  RoseCallbackSom som_callback);
 
-#define ROSE_CONTINUE_MATCHING_NO_EXHAUST 2
-
 #endif // ROSE_H
index b70328d258543d9302b9f6f5f70d361f4c4bdf90..9dcef1cef0689e82362b8badb864340a36954373 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+/** \file
+ * \brief Rose runtime types (callbacks, etc).
+ */
+
 #ifndef ROSE_TYPES_H
 #define ROSE_TYPES_H
 
 
 struct hs_scratch;
 
+/**
+ * \brief Continue without checking for exhaustion.
+ *
+ * \ref RoseCallback return value indicating that execution should continue and
+ * that it is not necessary to check if all reports have been exhausted.
+ */
+#define ROSE_CONTINUE_MATCHING_NO_EXHAUST 2
+
+/**
+ * \brief The type for a Rose callback.
+ *
+ * \return
+ *  - \ref MO_HALT_MATCHING if matching should terminate;
+ *  - \ref MO_CONTINUE_MATCHING if matching should continue;
+ *  - \ref ROSE_CONTINUE_MATCHING_NO_EXHAUST if matching should continue and no
+ *    exhaustion is possible.
+ */
 typedef int (*RoseCallback)(u64a offset, ReportID id,
                             struct hs_scratch *scratch);
 
+/**
+ * \brief The type for a Rose callback which also tracks start of match.
+ *
+ * Behaves just like \ref RoseCallback except that it is provided with both a
+ * start and an end offset.
+ *
+ * \see RoseCallback
+ */
 typedef int (*RoseCallbackSom)(u64a from_offset, u64a to_offset, ReportID id,
                                struct hs_scratch *scratch);