fix stream scan core https://jira.geedge.net/browse/TSG-14701
This commit is contained in:
@@ -38,13 +38,14 @@ struct ex_container_schema *bool_plugin_table_get_ex_container_schema(void *bool
|
||||
|
||||
/* ip plugin runtime API */
|
||||
void *bool_plugin_runtime_new(void *bool_plugin_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void bool_plugin_runtime_free(void *bool_plugin_runtime);
|
||||
|
||||
int bool_plugin_runtime_update(void *bool_plugin_runtime, void *bool_plugin_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int bool_plugin_runtime_commit(void *bool_plugin_runtime, const char *table_name);
|
||||
|
||||
int bool_plugin_runtime_commit(void *bool_plugin_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long bool_plugin_runtime_rule_count(void *bool_plugin_runtime);
|
||||
|
||||
|
||||
@@ -45,15 +45,16 @@ int compile_table_set_ex_data_schema(struct compile_schema *compile_schema, int
|
||||
|
||||
/* compile runtime API */
|
||||
void *compile_runtime_new(void *compile_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void compile_runtime_free(void *compile_runtime);
|
||||
|
||||
void compile_runtime_init(void *compile_runtime, struct maat_runtime *maat_rt);
|
||||
|
||||
int compile_runtime_update(void *compile_runtime, void *compile_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int compile_runtime_commit(void *compile_runtime, const char *table_name);
|
||||
int compile_runtime_update(void *compile_runtime, void *compile_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int compile_runtime_commit(void *compile_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long compile_runtime_rule_count(void *compile_runtime);
|
||||
|
||||
@@ -73,14 +74,14 @@ void compile_runtime_ex_data_iterate(struct compile_runtime *compile_rt,
|
||||
|
||||
/* group2compile runtime API */
|
||||
void *group2compile_runtime_new(void *g2c_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void group2compile_runtime_init(void *g2c_runtime, void *compile_runtime, void *g2g_runtime);
|
||||
void group2compile_runtime_free(void *g2c_runtime);
|
||||
|
||||
int group2compile_runtime_update(void *g2c_runtime, void *g2c_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int group2compile_runtime_update(void *g2c_runtime, void *g2c_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
long long group2compile_runtime_rule_count(void *g2c_runtime);
|
||||
|
||||
/* maat compile state API */
|
||||
|
||||
@@ -28,17 +28,19 @@ void expr_schema_free(void *expr_schema);
|
||||
|
||||
/* expr runtime API */
|
||||
void *expr_runtime_new(void *expr_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void expr_runtime_free(void *expr_runtime);
|
||||
|
||||
int expr_runtime_update(void *expr_runtime, void *expr_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int expr_runtime_commit(void *expr_runtime, const char *table_name);
|
||||
int expr_runtime_update(void *expr_runtime, void *expr_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int expr_runtime_commit(void *expr_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long expr_runtime_rule_count(void *expr_runtime);
|
||||
|
||||
long long expr_runtime_get_version(void *expr_runtime);
|
||||
|
||||
/* expr runtime scan API */
|
||||
/**
|
||||
* @brief scan string to get hit group_ids
|
||||
|
||||
@@ -29,15 +29,15 @@ void *flag_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void flag_schema_free(void *flag_schema);
|
||||
|
||||
/* flag runtime API */
|
||||
void *flag_runtime_new(void *flag_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
void *flag_runtime_new(void *flag_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void flag_runtime_free(void *flag_runtime);
|
||||
|
||||
int flag_runtime_update(void *flag_runtime, void *flag_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int flag_runtime_commit(void *flag_runtime, const char *table_name);
|
||||
int flag_runtime_update(void *flag_runtime, void *flag_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int flag_runtime_commit(void *flag_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long flag_runtime_rule_count(void *flag_runtime);
|
||||
|
||||
|
||||
@@ -40,13 +40,14 @@ struct ex_container_schema *fqdn_plugin_table_get_ex_container_schema(void *fqdn
|
||||
|
||||
/* fqdn plugin runtime API */
|
||||
void *fqdn_plugin_runtime_new(void *fqdn_plugin_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void fqdn_plugin_runtime_free(void *fqdn_plugin_runtime);
|
||||
|
||||
int fqdn_plugin_runtime_update(void *fqdn_plugin_runtime, void *fqdn_plugin_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int fqdn_plugin_runtime_commit(void *fqdn_plugin_runtime, const char *table_name);
|
||||
|
||||
int fqdn_plugin_runtime_commit(void *fqdn_plugin_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long fqdn_plugin_runtime_rule_count(void *fqdn_plugin_runtime);
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ void *group2group_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void group2group_schema_free(void *g2g_schema);
|
||||
|
||||
/* group2group runtime API */
|
||||
void *group2group_runtime_new(void *g2g_schema, int max_thread_num,
|
||||
void *group2group_runtime_new(void *g2g_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
struct log_handle *logger);
|
||||
void group2group_runtime_free(void *g2g_runtime);
|
||||
|
||||
void maat_group_ref_inc(struct maat_group *group);
|
||||
@@ -42,14 +42,13 @@ struct maat_group *group2group_runtime_add_group(void *g2g_runtime, long long gr
|
||||
void group2group_runtime_remove_group(void *g2g_runtime, struct maat_group *group);
|
||||
struct maat_group *group2group_runtime_find_group(void *g2g_runtime, long long group_id);
|
||||
|
||||
int group2group_runtime_build_top_groups(void *g2g_runtime);
|
||||
int group2group_runtime_get_top_groups(void *g2g_runtime, long long *group_ids,
|
||||
size_t n_group_ids, long long *top_group_ids);
|
||||
|
||||
int group2group_runtime_update(void *g2g_runtime, void *g2g_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int group2group_runtime_commit(void *g2g_runtime, const char *table_name);
|
||||
int group2group_runtime_update(void *g2g_runtime, void *g2g_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int group2group_runtime_commit(void *g2g_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long group2group_runtime_rule_count(void *g2g_runtime);
|
||||
|
||||
|
||||
@@ -28,14 +28,15 @@ void *interval_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void interval_schema_free(void *interval_schema);
|
||||
|
||||
/* interval runtime API */
|
||||
void *interval_runtime_new(void *interval_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
void *interval_runtime_new(void *interval_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void interval_runtime_free(void *interval_runtime);
|
||||
|
||||
int interval_runtime_update(void *interval_runtime, void *interval_schema,
|
||||
const char *table_name,const char *line, int valid_column);
|
||||
int interval_runtime_commit(void *interval_runtime, const char *table_name);
|
||||
int interval_runtime_update(void *interval_runtime, void *interval_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int interval_runtime_commit(void *interval_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long interval_runtime_rule_count(void *interval_runtime);
|
||||
|
||||
|
||||
@@ -26,15 +26,15 @@ void *ip_schema_new(cJSON *json, struct table_manager *tbl_mgr,
|
||||
void ip_schema_free(void *ip_schema);
|
||||
|
||||
/* ip runtime API */
|
||||
void *ip_runtime_new(void *ip_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
void *ip_runtime_new(void *ip_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void ip_runtime_free(void *ip_runtime);
|
||||
|
||||
int ip_runtime_update(void *ip_runtime, void *ip_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int ip_runtime_commit(void *ip_runtime, const char *table_name);
|
||||
int ip_runtime_update(void *ip_runtime, void *ip_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int ip_runtime_commit(void *ip_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long ip_runtime_rule_count(void *ip_runtime);
|
||||
|
||||
|
||||
@@ -39,13 +39,14 @@ struct ex_container_schema *ip_plugin_table_get_ex_container_schema(void *ip_plu
|
||||
|
||||
/* ip plugin runtime API */
|
||||
void *ip_plugin_runtime_new(void *ip_plugin_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void ip_plugin_runtime_free(void *ip_plugin_runtime);
|
||||
|
||||
int ip_plugin_runtime_update(void *ip_plugin_runtime, void *ip_plugin_schema,
|
||||
const char *table_name, const char *line, int valid_column);
|
||||
int ip_plugin_runtime_commit(void *ip_plugin_runtime, const char *table_name);
|
||||
|
||||
int ip_plugin_runtime_commit(void *ip_plugin_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long ip_plugin_runtime_rule_count(void *ip_plugin_runtime);
|
||||
|
||||
|
||||
@@ -50,15 +50,15 @@ int plugin_table_set_ex_container_schema(void *plugin_schema, int table_id,
|
||||
struct ex_container_schema *plugin_table_get_ex_container_schema(void *plugin_schema);
|
||||
|
||||
/* plugin runtime API */
|
||||
void *plugin_runtime_new(void *plugin_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
void *plugin_runtime_new(void *plugin_schema, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin,
|
||||
struct log_handle *logger);
|
||||
void plugin_runtime_free(void *plugin_runtime);
|
||||
|
||||
int plugin_runtime_update(void *plugin_runtime, void *plugin_schema,
|
||||
const char *table_name, const char *line,
|
||||
int valid_column);
|
||||
int plugin_runtime_commit(void *plugin_runtime, const char *table_name);
|
||||
int plugin_runtime_update(void *plugin_runtime, void *plugin_schema, const char *table_name,
|
||||
const char *line, int valid_column);
|
||||
|
||||
int plugin_runtime_commit(void *plugin_runtime, const char *table_name, long long maat_rt_version);
|
||||
|
||||
long long plugin_runtime_rule_count(void *plugin_runtime);
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ table_manager_create(const char *table_info_path, const char *accept_tags,
|
||||
struct maat_garbage_bin *garbage_bin, struct log_handle *logger);
|
||||
int table_manager_runtime_create(struct table_manager *tbl_mgr, int max_thread_num,
|
||||
struct maat_garbage_bin *garbage_bin);
|
||||
|
||||
void table_manager_runtime_destroy(struct table_manager *tbl_mgr);
|
||||
void table_manager_destroy(struct table_manager *tbl_mgr);
|
||||
|
||||
@@ -72,7 +73,9 @@ void *table_manager_get_updating_runtime(struct table_manager *tbl_mgr, int tabl
|
||||
|
||||
int table_manager_update_runtime(struct table_manager *tbl_mgr, const char *table_name,
|
||||
int table_id, const char *line, int update_type);
|
||||
void table_manager_commit_runtime(struct table_manager *tbl_mgr, int table_id, int update_type);
|
||||
|
||||
void table_manager_commit_runtime(struct table_manager *tbl_mgr, int table_id,
|
||||
int update_type, long long maat_rt_version);
|
||||
|
||||
long long table_manager_runtime_rule_count(struct table_manager *tbl_mgr, int table_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user