summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorliuwentan <[email protected]>2023-07-11 11:30:57 +0800
committerliuwentan <[email protected]>2023-07-11 11:30:57 +0800
commit6911420ebfb1610b07adb0b257e26c46e141a665 (patch)
tree9c29921cd24c586c3736214a11b70e95b7f94367 /include
parentf8a0b406fa00f2a257763395151ab1abc4a8c830 (diff)
[PATCH]add get_hit_groups inc/full API
Diffstat (limited to 'include')
-rw-r--r--include/maat.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/maat.h b/include/maat.h
index e149d8a..f6587d5 100644
--- a/include/maat.h
+++ b/include/maat.h
@@ -54,6 +54,11 @@ enum maat_update_type {
MAAT_UPDATE_TYPE_INC
};
+enum maat_list_type {
+ MAAT_LIST_TYPE_FULL = 1,
+ MAAT_LIST_TYPE_INC
+};
+
struct ip_addr {
int ip_type; //4: IPv4, 6: IPv6
union {
@@ -269,10 +274,20 @@ int maat_state_set_scan_compile_table(struct maat_state *state, int compile_tabl
int maat_state_get_hit_paths(struct maat_state *state, struct maat_hit_path *paths,
size_t n_path);
+/**
+ * @brief get the total number of scans after maat_state_new
+*/
size_t maat_state_get_scan_count(struct maat_state *state);
-int maat_state_get_hit_groups(struct maat_state *state, struct maat_hit_group *groups,
- size_t n_group);
+/**
+ * @brief get hit groups(full or incremental)
+ *
+ * @param type:
+ * MAAT_LIST_TYPE_FULL => get all hit groups after maat_state_new
+ * MAAT_LIST_TYPE_INC => get hit groups for this scan
+*/
+int maat_state_get_hit_groups(struct maat_state *state, enum maat_list_type type,
+ struct maat_hit_group *groups, size_t n_group);
/* return hit object compile_id */
int maat_hit_group_compile_id(struct maat *instance, struct maat_hit_group *group);