FQDN Plugin加载、扫描、更新测试通过,遗留FQDN_engine后缀匹配不命中的Bug待修复。
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
struct EX_data_rt;
|
||||
|
||||
struct EX_data_rt* EX_data_rt_new(int table_id, long long estimate_size, Maat_plugin_EX_key2index_func_t * key2index, void (* user_data_free)(void *user_data));
|
||||
struct EX_data_rt* EX_data_rt_new(int table_id, Maat_plugin_EX_key2index_func_t * key2index, void (* user_data_free)(void *user_data));
|
||||
void EX_data_rt_free(struct EX_data_rt* p);
|
||||
void EX_data_rt_set_schema(struct EX_data_rt* p, const struct EX_data_schema* schema);
|
||||
void EX_data_rt_cache_row_put(struct EX_data_rt* p, const char* row);
|
||||
@@ -23,4 +23,5 @@ MAAT_RULE_EX_DATA EX_data_rt_get_EX_data_by_key(struct EX_data_rt* ex_rt, const
|
||||
MAAT_RULE_EX_DATA EX_data_rt_get_EX_data_by_container(struct EX_data_rt* ex_rt, struct EX_data_container* container);
|
||||
size_t EX_data_rt_list_all_ex_container(struct EX_data_rt* ex_rt, struct EX_data_container*** ex_container_array);
|
||||
void* EX_data_container_get_user_data(struct EX_data_container* ex_container);
|
||||
size_t EX_data_rt_get_ex_container_count(struct EX_data_rt* ex_rt);
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ struct Maat_scanner
|
||||
mcore_long_t ref_cnt;
|
||||
rule_scanner_t region;
|
||||
size_t gie_update_q_size;
|
||||
size_t ip_plugin_update_q_size;
|
||||
size_t xx_plugin_update_q_size;
|
||||
size_t to_update_group_cnt;
|
||||
size_t to_update_compile_cnt;
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ enum MAAT_TABLE_TYPE
|
||||
TABLE_TYPE_PLUGIN,
|
||||
TABLE_TYPE_IP_PLUGIN,
|
||||
TABLE_TYPE_INTERVAL_PLUS,
|
||||
TABLE_TYPE_FQDN,
|
||||
TABLE_TYPE_FQDN_PLUGIN
|
||||
};
|
||||
|
||||
@@ -102,7 +101,6 @@ struct plugin_table_schema
|
||||
int foreign_columns[MAX_FOREIGN_CLMN_NUM];
|
||||
int cb_plug_cnt;
|
||||
int have_exdata;
|
||||
long long estimate_size;
|
||||
struct plugin_table_callback_schema cb_plug[MAX_PLUGIN_PER_TABLE];
|
||||
struct EX_data_schema ex_schema;
|
||||
};
|
||||
@@ -114,7 +112,17 @@ struct ip_plugin_table_schema
|
||||
int end_ip_column;
|
||||
int valid_flag_column;
|
||||
int rule_tag_column;
|
||||
long long estimate_size;
|
||||
int have_exdata;
|
||||
struct EX_data_schema ex_schema;
|
||||
};
|
||||
struct fqdn_plugin_table_schema
|
||||
{
|
||||
|
||||
int row_id_column;
|
||||
int is_suffix_flag_column;
|
||||
int fqdn_column;
|
||||
int valid_flag_column;
|
||||
int rule_tag_column;
|
||||
int have_exdata;
|
||||
struct EX_data_schema ex_schema;
|
||||
};
|
||||
@@ -131,6 +139,7 @@ struct Maat_table_schema
|
||||
struct expr_table_schema expr;
|
||||
struct plugin_table_schema plugin;
|
||||
struct ip_plugin_table_schema ip_plugin;
|
||||
struct fqdn_plugin_table_schema fqdn_plugin;
|
||||
struct virtual_table_schema virtual_table;
|
||||
struct composition_table_schema composition;
|
||||
void* others;//group, ip, interval and digest don't have any special schema.
|
||||
@@ -183,6 +192,13 @@ int Maat_table_ip_plugin_EX_data_schema_set(struct Maat_table_schema *table_sche
|
||||
Maat_plugin_EX_key2index_func_t* key2index_func,
|
||||
long argl, void *argp,
|
||||
void* logger);
|
||||
int Maat_table_fqdn_plugin_EX_data_schema_set(struct Maat_table_schema *table_schema,
|
||||
Maat_plugin_EX_new_func_t* new_func,
|
||||
Maat_plugin_EX_free_func_t* free_func,
|
||||
Maat_plugin_EX_dup_func_t* dup_func,
|
||||
Maat_plugin_EX_key2index_func_t* key2index_func,
|
||||
long argl, void *argp,
|
||||
void* logger);
|
||||
|
||||
void Maat_table_manager_all_plugin_cb_start(struct Maat_table_manager* table_mgr, int update_type);
|
||||
void Maat_table_manager_all_plugin_cb_finish(struct Maat_table_manager* table_mgr);
|
||||
@@ -198,4 +214,5 @@ enum MAAT_TABLE_CHILD_TYPE
|
||||
CHILD_TABLE_TYPE_SESSION
|
||||
};
|
||||
int Maat_table_get_child_id(struct Maat_table_schema* p_table, enum MAAT_TABLE_CHILD_TYPE type);
|
||||
int Maat_table_xx_plugin_table_get_valid_flag_column(struct Maat_table_schema* p_table);
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ struct similar_runtime
|
||||
GIE_handle_t* gie_handle;
|
||||
MESA_lqueue_head update_q;
|
||||
};
|
||||
struct fqdn_runtime
|
||||
struct fqdn_plugin_runtime
|
||||
{
|
||||
struct FQDN_engine* fqdn_engine;
|
||||
struct FQDN_engine* old_fqdn_engine;
|
||||
struct FQDN_engine* new_fqdn_engine;
|
||||
struct EX_data_rt* ex_data_rt; //for fqdn_plugin ONLY
|
||||
struct Maat_garbage_bin* bin;
|
||||
int changed_flag;
|
||||
@@ -59,7 +59,7 @@ struct Maat_table_runtime
|
||||
union
|
||||
{
|
||||
struct similar_runtime similar; //for digest and similarity
|
||||
struct fqdn_runtime fqdn;//for fqdn and fqdn_plugin
|
||||
struct fqdn_plugin_runtime fqdn_plugin;//for fqdn_plugin and fqdn_plugin
|
||||
struct plugin_runtime plugin;
|
||||
struct ip_plugin_runtime ip_plugin;
|
||||
struct expr_runtime expr;
|
||||
@@ -95,4 +95,12 @@ int Maat_table_runtime_ip_plugin_get_N_ex_data(struct Maat_table_runtime* table_
|
||||
int Maat_table_runtime_ip_plugin_build_new_ip_matcher(struct Maat_table_runtime* table_rt);
|
||||
struct ip_matcher* Maat_table_runtime_apply_new_ip_matcher(struct Maat_table_runtime* table_rt);
|
||||
|
||||
int Maat_table_runtime_fqdn_plugin_build_new_fqdn_engine(struct Maat_table_runtime* table_rt);
|
||||
|
||||
void Maat_table_runtime_fqdn_plugin_new_row(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, const char* row, void *logger);
|
||||
int Maat_table_runtime_fqdn_plugin_build_new_fqdn_engine(struct Maat_table_runtime* table_rt);
|
||||
struct FQDN_engine* Maat_table_runtime_apply_new_fqdn_engine(struct Maat_table_runtime* table_rt);
|
||||
int Maat_table_runtime_fqdn_plugin_commit_ex_schema(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, void* logger);
|
||||
int Maat_table_runtime_fqdn_plugin_get_N_ex_data(struct Maat_table_runtime* table_rt, struct Maat_table_schema* table_schema, const char* query_fqdn, MAAT_PLUGIN_EX_DATA* ex_data_array, size_t size);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user