使用前置声明结构体,修改接口函数原型

This commit is contained in:
liuxueli
2019-11-27 11:27:06 +08:00
parent 27f0cfc91a
commit 2d1a530165
6 changed files with 82 additions and 75 deletions

View File

@@ -56,6 +56,6 @@ int tsg_shared_table_init(const char *conffile, Maat_feather_t maat_feather, voi
int tsg_scan_shared_policy(Maat_feather_t maat_feather, void *pkt, int pkt_len, Maat_rule_t *result, int result_num, struct _identify_info *identify_info, scan_status_t *mid, void *logger, int thread_seq);
//return NULL if none exists, otherwise return one deny rule;
Maat_rule_t *tsg_fetch_deny_rule(Maat_rule_t *result, int result_num);
struct Maat_rule_t *tsg_fetch_deny_rule(Maat_rule_t *result, int result_num);
#endif

View File

@@ -21,17 +21,17 @@ typedef enum _tld_type
}TLD_TYPE;
typedef void* TLD_handle_t;
typedef void* tsg_log_instance_t;
struct TLD_handle_t;
struct tsg_log_instance_t;
extern tsg_log_instance_t g_tsg_log_instance;
extern struct tsg_log_instance_t *g_tsg_log_instance;
TLD_handle_t TLD_create(int thread_id);
int TLD_append(TLD_handle_t handle, char *key, void *value, TLD_TYPE type);
int TLD_append_streaminfo(struct _tsg_log_instance *_instance, struct _tld_handle *_handle, struct streaminfo *a_stream);
int TLD_cancel(TLD_handle_t handle);
struct TLD_handle_t *TLD_create(int thread_id);
int TLD_append(struct TLD_handle_t *handle, char *key, void *value, TLD_TYPE type);
int TLD_append_streaminfo(struct tsg_log_instance_t *instance, struct TLD_handle_t *handle, struct streaminfo *a_stream);
int TLD_cancel(struct TLD_handle_t *handle);
int tsg_send_log(tsg_log_instance_t instance, TLD_handle_t handle, tsg_log_t *log_msg, int thread_id);
int tsg_send_log(struct tsg_log_instance_t *instance, struct TLD_handle_t *handle, tsg_log_t *log_msg, int thread_id);
unsigned long long tsg_get_stream_id(struct streaminfo *a_stream);