diff --git a/inc/Maat_command.h b/inc/Maat_command.h index c5f4324..f22215e 100644 --- a/inc/Maat_command.h +++ b/inc/Maat_command.h @@ -109,9 +109,9 @@ struct Maat_group_t }; struct Maat_cmd_t { - struct Maat_rule_t compile;// for MAAT_OP_DEL, only compile.config_id is necessary. + struct Maat_rule_t compile; // for MAAT_OP_DEL, only compile.config_id is necessary. int group_num; // for MAAT_OP_DEL, set to 0. - int expire_after; //expired after $timeout$ seconds, set to 0 for never timeout. + int expire_after; //expired after $expire_after$ seconds, set to 0 for never timeout. int label_id; //>0, for Maat_cmd_select struct Maat_group_t* groups;// Add regions with Maat_add_region2cmd }; @@ -119,11 +119,13 @@ struct Maat_line_t { const char* table_name; const char* table_line; - int rule_id; + int rule_id; // for MAAT_OP_DEL, only rule_id is necessary. int label_id; int expire_after; //expired after $timeout$ seconds, set to 0 for never timeout. }; struct Maat_cmd_t* Maat_create_cmd(const struct Maat_rule_t* rule, int group_num); +//input: which_group 0~group_num +//input: region can be freed after added. void Maat_add_region2cmd(struct Maat_cmd_t* cmd,int which_group,const struct Maat_region_t* region); void Maat_free_cmd(struct Maat_cmd_t* cmd); diff --git a/inc/Maat_rule.h b/inc/Maat_rule.h index 2227528..fc9d0c5 100644 --- a/inc/Maat_rule.h +++ b/inc/Maat_rule.h @@ -51,9 +51,9 @@ typedef void* Maat_feather_t; #define MAX_SERVICE_DEFINE_LEN 128 struct Maat_rule_t { - int config_id; + int config_id; int service_id; - char do_log; + char do_log; char do_blacklist; char action; char resevered; diff --git a/src/entry/sfh_internal.h b/src/entry/sfh_internal.h index a259826..58fd214 100644 --- a/src/entry/sfh_internal.h +++ b/src/entry/sfh_internal.h @@ -29,7 +29,6 @@ #define DEBUG (0) -int hash_length; //int count = 0; struct roll_state_t {