delete useless code
This commit is contained in:
@@ -78,12 +78,12 @@ struct maat_item {
|
||||
struct compile_rule {
|
||||
long long magic_num;
|
||||
long long compile_id;
|
||||
char table_name[NAME_MAX];
|
||||
char *table_line;
|
||||
size_t table_line_len;
|
||||
int declared_clause_num;
|
||||
struct compile_schema *ref_schema;
|
||||
void **ex_data;
|
||||
int declared_clause_num;
|
||||
char table_name[NAME_MAX];
|
||||
};
|
||||
|
||||
struct group2group_rule {
|
||||
|
||||
@@ -27,9 +27,6 @@ struct bool_plugin_schema {
|
||||
int table_id;
|
||||
struct table_manager *ref_tbl_mgr;
|
||||
struct log_handle *logger;
|
||||
|
||||
unsigned long long update_err_cnt;
|
||||
unsigned long long unmatch_tag_cnt;
|
||||
};
|
||||
|
||||
struct bool_plugin_runtime {
|
||||
@@ -270,7 +267,6 @@ int bool_plugin_accept_tag_match(struct bool_plugin_schema *schema, const char *
|
||||
log_error(logger, MODULE_BOOL_PLUGIN,
|
||||
"[%s:%d] bool_plugin table(table_id:%d) has no rule_tag, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
@@ -283,12 +279,10 @@ int bool_plugin_accept_tag_match(struct bool_plugin_schema *schema, const char *
|
||||
log_error(logger, MODULE_BOOL_PLUGIN,
|
||||
"[%s:%d] bool_plugin table(table_id:%d) has invalid tag format, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
if (TAG_MATCH_UNMATCHED == ret) {
|
||||
schema->unmatch_tag_cnt++;
|
||||
return TAG_MATCH_UNMATCHED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,15 +31,12 @@ struct compile_schema {
|
||||
int compile_id_column;
|
||||
int rule_tag_column;
|
||||
int declared_clause_num_column;
|
||||
int table_id; //ugly
|
||||
char table_name[NAME_MAX];
|
||||
int set_flag;
|
||||
struct ex_data_schema ex_schema;
|
||||
struct table_manager *ref_tbl_mgr;
|
||||
struct log_handle *logger;
|
||||
|
||||
unsigned long long update_err_cnt;
|
||||
unsigned long long unmatch_tag_cnt;
|
||||
int table_id; //ugly
|
||||
char table_name[NAME_MAX];
|
||||
};
|
||||
|
||||
struct group2compile_schema {
|
||||
@@ -475,7 +472,6 @@ int compile_accept_tag_match(struct compile_schema *schema, const char *line,
|
||||
log_error(logger, MODULE_COMPILE,
|
||||
"[%s:%d] compile table:%s has no rule_tag in line:%s",
|
||||
__FUNCTION__, __LINE__, table_name, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
@@ -488,12 +484,10 @@ int compile_accept_tag_match(struct compile_schema *schema, const char *line,
|
||||
log_error(logger, MODULE_COMPILE,
|
||||
"[%s:%d] compile table:%s has invalid tag format in line:%s",
|
||||
__FUNCTION__, __LINE__, table_name, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
if (TAG_MATCH_UNMATCHED == ret) {
|
||||
schema->unmatch_tag_cnt++;
|
||||
return TAG_MATCH_UNMATCHED;
|
||||
}
|
||||
}
|
||||
@@ -988,7 +982,8 @@ size_t maat_compile_bool_matcher_match(struct compile_runtime *compile_rt, int i
|
||||
{
|
||||
size_t ud_result_cnt = 0;
|
||||
struct maat_compile *compile = NULL;
|
||||
struct bool_expr_match *expr_match = compile_rt->expr_match_buff + compile_state->thread_id * MAX_SCANNER_HIT_COMPILE_NUM;
|
||||
struct bool_expr_match *expr_match = compile_rt->expr_match_buff +
|
||||
(compile_state->thread_id * MAX_SCANNER_HIT_COMPILE_NUM);
|
||||
assert(compile_state->thread_id >= 0);
|
||||
|
||||
if (0 == compile_state->compile_rt_version) {
|
||||
@@ -1004,13 +999,14 @@ size_t maat_compile_bool_matcher_match(struct compile_runtime *compile_rt, int i
|
||||
//TODO:mytest need to delete
|
||||
#if 0
|
||||
unsigned long long *p = utarray_eltptr(compile_state->all_hit_clauses, 0);
|
||||
for (p = (unsigned long long *)utarray_front(compile_state->all_hit_clauses); p != NULL; p = (unsigned long long *)utarray_next(compile_state->all_hit_clauses, p))
|
||||
{
|
||||
for (p = (unsigned long long *)utarray_front(compile_state->all_hit_clauses); p != NULL;
|
||||
p = (unsigned long long *)utarray_next(compile_state->all_hit_clauses, p)) {
|
||||
printf("before bool_matcher_match compile_rt:%p compile_state clause_id:%llu\n", compile_rt, *p);
|
||||
}
|
||||
#endif
|
||||
|
||||
int bool_match_ret = bool_matcher_match(compile_rt->bm, (unsigned long long *)utarray_eltptr(compile_state->all_hit_clauses, 0),
|
||||
int bool_match_ret = bool_matcher_match(compile_rt->bm,
|
||||
(unsigned long long *)utarray_eltptr(compile_state->all_hit_clauses, 0),
|
||||
utarray_len(compile_state->all_hit_clauses),
|
||||
expr_match, MAX_SCANNER_HIT_COMPILE_NUM);
|
||||
for (int i = 0; i < bool_match_ret && ud_result_cnt < ud_array_size; i++) {
|
||||
|
||||
@@ -286,4 +286,4 @@ size_t ex_data_runtime_list_ex_container(struct ex_data_runtime *ex_data_rt,
|
||||
struct ex_container ***ex_container)
|
||||
{
|
||||
return rcu_hash_list(ex_data_rt->htable, (void ***)ex_container);
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,6 @@ struct fqdn_plugin_schema {
|
||||
int table_id;
|
||||
struct table_manager *ref_tbl_mgr;
|
||||
struct log_handle *logger;
|
||||
|
||||
unsigned long long update_err_cnt;
|
||||
unsigned long long unmatch_tag_cnt;
|
||||
};
|
||||
|
||||
struct fqdn_plugin_runtime {
|
||||
@@ -236,7 +233,6 @@ int fqdn_plugin_accept_tag_match(struct fqdn_plugin_schema *schema, const char *
|
||||
log_error(logger, MODULE_FQDN_PLUGIN,
|
||||
"[%s:%d] fqdn_plugin table(table_id:%d) has no rule_tag, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
@@ -249,12 +245,10 @@ int fqdn_plugin_accept_tag_match(struct fqdn_plugin_schema *schema, const char *
|
||||
log_error(logger, MODULE_FQDN_PLUGIN,
|
||||
"[%s:%d] fqdn_plugin table(table_id:%d) has invalid tag format, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
if (TAG_MATCH_UNMATCHED == ret) {
|
||||
schema->unmatch_tag_cnt++;
|
||||
return TAG_MATCH_UNMATCHED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,9 +32,6 @@ struct ip_plugin_schema {
|
||||
int table_id; //ugly
|
||||
struct table_manager *ref_tbl_mgr;
|
||||
struct log_handle *logger;
|
||||
|
||||
unsigned long long update_err_cnt;
|
||||
unsigned long long unmatch_tag_cnt;
|
||||
};
|
||||
|
||||
struct ip_plugin_runtime {
|
||||
@@ -145,7 +142,6 @@ int ip_plugin_accept_tag_match(struct ip_plugin_schema *schema, const char *line
|
||||
log_error(logger, MODULE_IP_PLUGIN,
|
||||
"[%s:%d] ip_plugin table(table_id:%d) has no rule_tag, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
@@ -158,12 +154,10 @@ int ip_plugin_accept_tag_match(struct ip_plugin_schema *schema, const char *line
|
||||
log_error(logger, MODULE_IP_PLUGIN,
|
||||
"[%s:%d] ip_plugin table(table_id:%d) has invalid tag format, line:%s",
|
||||
__FUNCTION__, __LINE__, schema->table_id, line);
|
||||
schema->update_err_cnt++;
|
||||
return TAG_MATCH_ERR;
|
||||
}
|
||||
|
||||
if (TAG_MATCH_UNMATCHED == ret) {
|
||||
schema->unmatch_tag_cnt++;
|
||||
return TAG_MATCH_UNMATCHED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user