]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
more comments on hwlm/fdr's start parameter
authorAlex Coyte <a.coyte@intel.com>
Fri, 28 Jul 2017 04:32:55 +0000 (14:32 +1000)
committerMatthew Barr <matthew.barr@intel.com>
Mon, 21 Aug 2017 01:23:41 +0000 (11:23 +1000)
src/fdr/fdr.h
src/hwlm/hwlm.h

index 77157a1045dbc5b0dd78d9b25930c6c3c4a57ec8..4dcef851d62dec8c9188325d3ea31f92fc0fd50e 100644 (file)
@@ -50,7 +50,7 @@ struct hs_scratch;
  * \param fdr FDR matcher engine.
  * \param buf Buffer to scan.
  * \param len Length of buffer to scan.
- * \param start First offset in buf at which a match may end.
+ * \param start First offset in buf at which a match may start.
  * \param cb Callback to call when a match is found.
  * \param scratch Scratch supplied to callback on match.
  * \param groups Initial groups mask.
@@ -67,7 +67,7 @@ hwlm_error_t fdrExec(const struct FDR *fdr, const u8 *buf, size_t len,
  * \param hlen Length of history buffer (hbuf).
  * \param buf Buffer to scan.
  * \param len Length of buffer to scan (buf).
- * \param start First offset in buf at which a match may end.
+ * \param start First offset in buf at which a match may start.
  * \param cb Callback to call when a match is found.
  * \param scratch Scratch supplied to callback on match.
  * \param groups Initial groups mask.
index 9262e80c10b76056d18e24aebac51350657502ff..224ecf6bf9f13352b535e77c468dc37f072e41b6 100644 (file)
@@ -107,7 +107,8 @@ typedef hwlmcb_rv_t (*HWLMCallback)(size_t end, u32 id,
  * Returns \ref HWLM_TERMINATED if scanning is cancelled due to the callback
  * returning \ref HWLM_TERMINATE_MATCHING.
  *
- * \p start is the first offset at which a match may start.
+ * \p start is the first offset at which a match may start. Note: match
+ * starts may include masks overhanging the main literal.
  *
  * The underlying engine may choose not to report any match which starts before
  * the first possible match of a literal which is in the initial group mask.
@@ -121,7 +122,8 @@ hwlm_error_t hwlmExec(const struct HWLM *tab, const u8 *buf, size_t len,
  * \p len is the length of the main buffer to be scanned.
  *
  * \p start is an advisory hint representing the first offset at which a match
- * may start. Some underlying literal matches may not respect it.
+ * may start. Some underlying literal matches may not respect it. Note: match
+ * starts may include masks overhanging the main literal.
  *
  * \p scratch is used to access the history buffer, history length and
  * the main buffer.