summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
author刘文坛 <[email protected]>2023-10-10 11:23:44 +0000
committer刘文坛 <[email protected]>2023-10-10 11:23:44 +0000
commit461d43c6b76d3cd25705ed3ff054019f5e6404a6 (patch)
treebabe187425d41f4d36ea73c229b5bc7da18e74a3 /include
parent1d106cd4c27b5a8231357aa07814c2ab99ec54a4 (diff)
[OPTIMIZE]replace ipport plugin engine(ip_matcher -> ipport_matcher)v4.0.46
Diffstat (limited to 'include')
-rw-r--r--include/maat.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/maat.h b/include/maat.h
index 7ac6d24..76bdbf0 100644
--- a/include/maat.h
+++ b/include/maat.h
@@ -56,7 +56,7 @@ enum maat_update_type {
};
enum maat_expr_engine {
- MAAT_EXPR_ENGINE_HS = 0, //default engine(hyperscan)
+ MAAT_EXPR_ENGINE_HS = 0, //hyperscan(default engine)
MAAT_EXPR_ENGINE_RS //rulescan
};
@@ -66,10 +66,10 @@ enum maat_list_type {
};
struct ip_addr {
- int ip_type; //4: IPv4, 6: IPv6
+ int ip_type; //4:IPV4, 6:IPV6
union {
unsigned int ipv4; //network order
- unsigned int ipv6[4];
+ unsigned int ipv6[4];//network order
};
};
@@ -208,6 +208,10 @@ int maat_ip_plugin_table_get_ex_data(struct maat *instance, int table_id,
const struct ip_addr *ip_addr,
void **ex_data_array, size_t array_size);
+/**
+ * NOTE: @retval -1(ERROR) 0(no ex_data) 1(only one ex_data)
+ * this function return only one ex_data if matched
+ */
int maat_ipport_plugin_table_get_ex_data(struct maat *instance, int table_id,
const struct ip_addr *ip_addr, uint16_t port,
void **ex_data_array, size_t array_size);