[FEATURE]expr_matcher support dual engine(hyperscan & rulescan) & benchmark

This commit is contained in:
liuwentan
2023-08-10 16:10:50 +08:00
parent fb0cb5405d
commit 42f4480271
30 changed files with 4598 additions and 1284 deletions

View File

@@ -37,6 +37,7 @@ struct maat_hit_path {
};
struct maat_hit_group {
long long item_id;
long long group_id;
int vtable_id;
};
@@ -59,6 +60,11 @@ enum maat_list_type {
MAAT_LIST_TYPE_INC
};
enum maat_expr_engine {
MAAT_EXPR_ENGINE_HS = 0, //default engine(hyperscan)
MAAT_EXPR_ENGINE_RS //rulescan
};
struct ip_addr {
int ip_type; //4: IPv4, 6: IPv6
union {
@@ -144,6 +150,8 @@ int maat_options_set_redis(struct maat_options *opts, const char *redis_ip,
int maat_options_set_stat_file(struct maat_options *opts, const char *stat_filename);
int maat_options_set_expr_engine(struct maat_options *opts, enum maat_expr_engine engine);
/* maat_instance API */
struct maat *maat_new(struct maat_options *opts, const char *table_info_path);
void maat_free(struct maat *instance);