mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-10-10 00:02:24 +03:00
fdr: move long literal handling into Rose
Move the hash table used for long literal support in streaming mode from FDR to Rose, and introduce new instructions CHECK_LONG_LIT and CHECK_LONG_LIT_NOCASE for doing literal confirm for long literals. This simplifies FDR confirm, and guarantees that HWLM matchers will only be used for literals < 256 bytes long.
This commit is contained in:
committed by
Matthew Barr
parent
6ed30194ce
commit
68bf473e2e
@@ -122,6 +122,26 @@ struct RoseContext {
|
||||
u32 filledDelayedSlots;
|
||||
u32 curr_qi; /**< currently executing main queue index during
|
||||
* \ref nfaQueueExec */
|
||||
|
||||
/**
|
||||
* \brief Buffer for caseful long literal support, used in streaming mode
|
||||
* only.
|
||||
*
|
||||
* If a long literal prefix was at the end of the buffer at the end of a
|
||||
* stream write, then the long lit table hashes it and stores the result in
|
||||
* stream state. At the start of the next write, this value is used to set
|
||||
* this buffer to the matching prefix string (stored in the bytecode.
|
||||
*/
|
||||
const u8 *ll_buf;
|
||||
|
||||
/** \brief Length in bytes of the string pointed to by ll_buf. */
|
||||
size_t ll_len;
|
||||
|
||||
/** \brief Caseless version of ll_buf. */
|
||||
const u8 *ll_buf_nocase;
|
||||
|
||||
/** \brief Length in bytes of the string pointed to by ll_buf_nocase. */
|
||||
size_t ll_len_nocase;
|
||||
};
|
||||
|
||||
struct match_deduper {
|
||||
|
Reference in New Issue
Block a user