Jun 16th update

This commit is contained in:
noam
2023-01-17 11:34:09 +02:00
parent 90bcc544a2
commit ad04b8d063
168 changed files with 64034 additions and 932 deletions

View File

@@ -18,13 +18,11 @@
#include <string.h>
#include <string>
#include <iostream>
#include "sasal.h"
using namespace std;
USE_DEBUG_FLAG(D_PM);
SASAL_START // Multiple Pattern Matcher
// Helper class for printing C format string
class CFmtPrinter
{
@@ -60,4 +58,3 @@ debugPrtCFmt(const char *func, uint line, const char *fmt, ...)
Debug("PM", func, line, Debug::DebugLevel::TRACE, D_PM).getStreamAggr() << CFmtPrinter(fmt, va);
va_end(va);
}
SASAL_END

View File

@@ -13,9 +13,7 @@
#include "general_adaptor.h"
#include <stdlib.h>
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
void fw_kfree(void *addr, CP_MAYBE_UNUSED size_t size, CP_MAYBE_UNUSED const char *caller)
{
free(addr);
@@ -62,4 +60,3 @@ void kiss_pmglob_memory_kfree(void *addr, CP_MAYBE_UNUSED size_t size, CP_MAYBE_
free(addr);
return;
}
SASAL_END

View File

@@ -12,9 +12,7 @@
// limitations under the License.
#include "general_adaptor.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
#ifndef KERNEL
#if defined(VXWORKS) || defined(freebsd) || defined (solaris2)
@@ -1780,4 +1778,3 @@ kiss_hash_intcmp(const void* vv1, const void* vv2, CP_MAYBE_UNUSED void *info)
#ifdef KERNEL
#undef herror
#endif
SASAL_END

View File

@@ -16,9 +16,7 @@
#include <ctype.h>
#include "general_adaptor.h"
#include "pm_adaptor.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
// Add a character's printable representation to a buffer.
// Returns the number of bytes written.
static u_int
@@ -131,4 +129,3 @@ kiss_pmglob_string_get_flags(const kiss_pmglob_string_s *pm_string)
KISS_ASSERT(pm_string != nullptr, "Illegal arguments");
return pm_string->flags;
}
SASAL_END

View File

@@ -12,12 +12,10 @@
// limitations under the License.
#include "general_adaptor.h"
#include "sasal.h"
// ********************* INCLUDES **************************
#include "kiss_pm_stats.h"
// ********************* INCLUDES **************************
SASAL_START // Multiple Pattern Matcher
// ********************* FUNCTIONS **************************
@@ -426,4 +424,3 @@ kiss_pm_stats_common_deserialize(
}
// ******************** FUNCTIONS *************************
SASAL_END

View File

@@ -32,9 +32,7 @@
// ********************* INCLUDES **************************
#include "kiss_thin_nfa_impl.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
// Internal execution flags passed to kiss_dfa_exec_one_buf:
#define KISS_PM_EXEC_LAST_BUFF 0x00000001 // This is the last buffer (preset buffer or the last buffer in vbuf)
@@ -459,4 +457,3 @@ kiss_thin_nfa_exec(KissThinNFA *nfa_h, const Buffer& buf, std::vector<std::pair<
return;
}
SASAL_END

View File

@@ -15,9 +15,7 @@
#include "pm_adaptor.h"
#include "kiss_thin_nfa_impl.h"
#include "kiss_hash.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
#define hash_t kiss_hash_t
#define hash_intcreate_ex(sz, kmem_flags) \
kiss_hash_create(sz, (hkeyfunc_t)kiss_hash_intvalue, (hcmpfunc_t)kiss_hash_intcmp, NULL)
@@ -1496,4 +1494,3 @@ kiss_thin_nfa_dump(const KissThinNFA *nfa, enum kiss_pm_dump_format_e format)
return thin_nfa_dump(nfa, format_cbs);
}
SASAL_END

View File

@@ -18,9 +18,7 @@
// The code allows allocating and releasing the Thin NFA structure, as well as serializing and deserializing it.
#include "kiss_thin_nfa_impl.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
// Allocate and fill in a pattern ID structure
kiss_ret_val
kiss_thin_nfa_add_pattern_id(kiss_thin_nfa_pattern_list_t **pat_list_p, const kiss_thin_nfa_pattern_t *new_pat)
@@ -239,4 +237,3 @@ kiss_thin_nfa_create(u_int match_state_num, kiss_bnfa_offset_t min_offset, kiss_
return nfa;
}
SASAL_END

View File

@@ -16,9 +16,7 @@
#include "kiss_hash.h"
#include "kiss_thin_nfa_impl.h"
#include "kiss_patterns.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
// Flag for a Thin NFA state
typedef enum {
THIN_NFA_STATE_FULL = 0x01, // We want a full state table for this state
@@ -2229,4 +2227,3 @@ finish:
}
return nfa;
}
SASAL_END

View File

@@ -12,9 +12,7 @@
// limitations under the License.
#include "pm_adaptor.h"
#include "sasal.h"
SASAL_START // Multiple Pattern Matcher
int kiss_debug_err_flag = 0;
void
@@ -100,4 +98,3 @@ kiss_pm_error_set_details(KissPMError *error,
error->error_string = error_string;
return;
}
SASAL_END

View File

@@ -18,11 +18,9 @@
#include <algorithm>
#include "kiss_patterns.h"
#include "kiss_thin_nfa_impl.h"
#include "sasal.h"
using namespace std;
SASAL_START // Multiple Pattern Matcher
USE_DEBUG_FLAG(D_PM_COMP);
USE_DEBUG_FLAG(D_PM_EXEC);
USE_DEBUG_FLAG(D_PM);
@@ -162,4 +160,3 @@ PMPattern::operator==(const PMPattern &other) const
match_start == other.match_start &&
match_end == other.match_end;
}
SASAL_END