fix hit repeated compile_id bug & unify compile+plugin table register API

This commit is contained in:
liuwentan
2023-03-01 13:12:22 +08:00
parent 1566a30002
commit 2c6cca6f56
8 changed files with 236 additions and 142 deletions

View File

@@ -95,15 +95,6 @@ int maat_table_callback_register(struct maat *instance, int table_id,
maat_finish_callback_t *finish,
void *u_para);
/* maat compile table API */
int maat_compile_table_ex_schema_register(struct maat *instance, int table_id,
maat_ex_new_func_t *new_func,
maat_ex_free_func_t *free_func,
maat_ex_dup_func_t *dup_func,
long argl, void *argp);
void *maat_compile_table_get_ex_data(struct maat *instance, int compile_table_id,
long long compile_id);
/* maat plugin table API */
int maat_plugin_table_ex_schema_register(struct maat *instance, int table_id,
maat_ex_new_func_t *new_func,
@@ -112,7 +103,8 @@ int maat_plugin_table_ex_schema_register(struct maat *instance, int table_id,
long argl, void *argp);
/* returned data is duplicated by dup_func of maat_plugin_table_ex_schema_register,
caller is responsible to free the data. */
void *maat_plugin_table_get_ex_data(struct maat *instance, int table_id, const char *key);
void *maat_plugin_table_get_ex_data(struct maat *instance, int table_id,
const char *key, size_t key_len);
int maat_ip_plugin_table_get_ex_data(struct maat *instance, int table_id,
const struct ip_addr *ip, void **ex_data_array,