2019-12-09 18:53:40 +08:00
|
|
|
#ifndef __TSG_ENTRY_H__
|
|
|
|
|
#define __TSG_ENTRY_H__
|
|
|
|
|
|
|
|
|
|
#include <MESA/Maat_rule.h>
|
|
|
|
|
#include <MESA/field_stat2.h>
|
2021-08-01 10:48:19 +00:00
|
|
|
#include <ctemplate/template.h>
|
2021-04-27 09:49:15 +00:00
|
|
|
|
|
|
|
|
#include "uthash.h"
|
2019-12-09 18:53:40 +08:00
|
|
|
#include "tsg_rule.h"
|
2021-04-27 09:49:15 +00:00
|
|
|
#include "app_label.h"
|
2020-08-28 10:43:12 +08:00
|
|
|
#include "tsg_label.h"
|
2020-05-15 17:41:26 +08:00
|
|
|
#include "tsg_statistic.h"
|
2021-08-01 10:48:19 +00:00
|
|
|
#include "tsg_traffic_mirror.h"
|
2019-12-09 18:53:40 +08:00
|
|
|
|
2020-05-14 15:52:54 +08:00
|
|
|
#if(__GNUC__ * 100 + __GNUC_MINOR__ * 10 + __GNUC_PATCHLEVEL__ >= 411)
|
|
|
|
|
#define atomic_inc(x) __sync_add_and_fetch((x),1)
|
|
|
|
|
#define atomic_dec(x) __sync_sub_and_fetch((x),1)
|
|
|
|
|
#define atomic_add(x,y) __sync_add_and_fetch((x),(y))
|
|
|
|
|
#define atomic_sub(x,y) __sync_sub_and_fetch((x),(y))
|
|
|
|
|
typedef int atomic_t;
|
|
|
|
|
#define ATOMIC_INIT(i) { (i) }
|
|
|
|
|
#define atomic_read(x) __sync_add_and_fetch((x),0)
|
|
|
|
|
#define atomic_set(x,y) __sync_lock_test_and_set((x),y)
|
|
|
|
|
#else
|
|
|
|
|
#include <alsa/iatomic.h>
|
|
|
|
|
#endif
|
2020-01-10 17:26:33 +08:00
|
|
|
|
|
|
|
|
#ifndef MIN
|
|
|
|
|
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-04-19 20:37:05 +08:00
|
|
|
#ifndef PRINTADDR
|
|
|
|
|
#define PRINTADDR(a, b) ((b)<RLOG_LV_FATAL ? printaddr(&(a->addr), a->threadnum) : "")
|
|
|
|
|
#endif
|
|
|
|
|
|
2021-03-02 10:39:33 +08:00
|
|
|
#define APP_SCAN_FLAG_STOP 0
|
|
|
|
|
#define APP_SCAN_FLAG_CONTINUE 1
|
|
|
|
|
|
2020-01-10 17:26:33 +08:00
|
|
|
enum MASTER_TABLE{
|
2021-03-02 10:39:33 +08:00
|
|
|
TABLE_SECURITY_COMPILE=0,
|
|
|
|
|
TABLE_IP_ADDR,
|
2020-01-10 17:26:33 +08:00
|
|
|
TABLE_SUBSCRIBER_ID,
|
|
|
|
|
TABLE_APP_ID,
|
|
|
|
|
TABLE_HTTP_HOST,
|
|
|
|
|
TABLE_SSL_SNI,
|
2020-04-16 17:12:30 +08:00
|
|
|
TABLE_EXCLUSION_SSL_SNI,
|
2020-05-29 14:40:15 +08:00
|
|
|
TABLE_SRC_ASN,
|
|
|
|
|
TABLE_DST_ASN,
|
|
|
|
|
TABLE_SRC_LOCATION,
|
|
|
|
|
TABLE_DST_LOCATION,
|
2020-05-14 15:52:54 +08:00
|
|
|
TABLE_ASN_USER_DEFINED,
|
|
|
|
|
TABLE_ASN_BUILT_IN,
|
|
|
|
|
TABLE_LOCATION_USER_DEFINED,
|
|
|
|
|
TABLE_LOCATION_BUILT_IN,
|
2020-06-01 19:00:38 +08:00
|
|
|
TABLE_QUIC_SNI,
|
2020-09-28 17:13:39 +08:00
|
|
|
TABLE_FQDN_CAT_ID,
|
|
|
|
|
TABLE_FQDN_CAT_USER_DEFINED,
|
|
|
|
|
TABLE_FQDN_CAT_BUILT_IN,
|
2021-03-02 10:39:33 +08:00
|
|
|
TABLE_APP_ID_DICT,
|
|
|
|
|
TABLE_SELECTOR_ID,
|
|
|
|
|
TABLE_SELECTOR_PROPERTIES,
|
2021-05-19 07:10:25 +00:00
|
|
|
TABLE_GTP_APN,
|
|
|
|
|
TABLE_GTP_IMSI,
|
|
|
|
|
TABLE_GTP_PHONE_NUMBER,
|
2021-08-01 10:48:19 +00:00
|
|
|
TABLE_RESPONSE_PAGES,
|
2020-01-10 17:26:33 +08:00
|
|
|
TABLE_MAX
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2019-12-09 18:53:40 +08:00
|
|
|
enum TSG_FS2_TYPE{
|
2020-09-16 11:09:44 +08:00
|
|
|
TSG_FS2_TCP_LINKS=0,
|
|
|
|
|
TSG_FS2_UDP_LINKS,
|
2019-12-09 18:53:40 +08:00
|
|
|
TSG_FS2_BYPASS,
|
|
|
|
|
TSG_FS2_HIT_ADDR,
|
|
|
|
|
TSG_FS2_HIT_SHARE,
|
|
|
|
|
TSG_FS2_INTERCEPT,
|
2021-03-09 10:36:34 +00:00
|
|
|
TSG_FS2_EXCLUSION,
|
2020-09-01 11:35:49 +08:00
|
|
|
TSG_FS2_SUCCESS_LOG,
|
|
|
|
|
TSG_FS2_FAILED_LOG,
|
|
|
|
|
TSG_FS2_DROP_LOG,
|
2020-11-16 12:30:44 +06:00
|
|
|
TSG_FS2_ABORT_ALLOW,
|
|
|
|
|
TSG_FS2_ABORT_DENY,
|
|
|
|
|
TSG_FS2_ABORT_MONITOR,
|
|
|
|
|
TSG_FS2_ABORT_INTERCEPT,
|
|
|
|
|
TSG_FS2_ABORT_UNKNOWN,
|
2021-06-22 07:01:46 +00:00
|
|
|
TSG_FS2_APP_DPKT_RESULT,
|
|
|
|
|
TSG_FS2_APP_Q_RESULT,
|
|
|
|
|
TSG_FS2_APP_USER_RESULT,
|
2021-07-05 14:22:24 +08:00
|
|
|
TSG_FS2_APP_BUILT_IN_RESULT,
|
2021-08-01 10:48:19 +00:00
|
|
|
TSG_FS2_INJECT_PKT_SUCCESS,
|
|
|
|
|
TSG_FS2_INJECT_PKT_FAILED,
|
|
|
|
|
TSG_FS2_MIRRORED_PKT_SUCCESS,
|
|
|
|
|
TSG_FS2_MIRRORED_PKT_FAILED,
|
|
|
|
|
TSG_FS2_MIRRORED_BYTE_SUCCESS,
|
|
|
|
|
TSG_FS2_MIRRORED_BYTE_FAILED,
|
2019-12-09 18:53:40 +08:00
|
|
|
TSG_FS2_MAX
|
|
|
|
|
};
|
|
|
|
|
|
2021-03-02 10:39:33 +08:00
|
|
|
enum TSG_ATTRIBUTE_TYPE
|
|
|
|
|
{
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_ESTABLISH_LATECY=0,
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_PROTOCOL,
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_JA3_HASH,
|
2021-06-02 12:10:57 +08:00
|
|
|
TSG_ATTRIBUTE_TYPE_MLTS_USER_INFO,
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_LOCATION,
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_ASN,
|
|
|
|
|
TSG_ATTRIBUTE_TYPE_SUBSCRIBER_ID,
|
2021-03-02 10:39:33 +08:00
|
|
|
_MAX_TSG_ATTRIBUTE_TYPE
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-01 10:48:19 +00:00
|
|
|
enum HTTP_RESPONSE_FORMAT
|
|
|
|
|
{
|
|
|
|
|
HTTP_RESPONSE_FORMAT_TEMPLATE=0,
|
|
|
|
|
HTTP_RESPONSE_FORMAT_HTML
|
|
|
|
|
};
|
|
|
|
|
|
2019-12-20 11:15:29 +08:00
|
|
|
struct _str2index
|
|
|
|
|
{
|
|
|
|
|
int index;
|
|
|
|
|
int len;
|
|
|
|
|
char *type;
|
|
|
|
|
};
|
|
|
|
|
|
2021-04-27 09:49:15 +00:00
|
|
|
struct gather_app_result
|
|
|
|
|
{
|
|
|
|
|
struct app_identify_result result[ORIGIN_MAX];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct l7_protocol
|
|
|
|
|
{
|
|
|
|
|
int id; /* first key */
|
|
|
|
|
char name[32]; /* second key */
|
|
|
|
|
UT_hash_handle hh1; /* handle for first hash table */
|
|
|
|
|
UT_hash_handle hh2; /* handle for second hash table */
|
|
|
|
|
};
|
|
|
|
|
|
2020-09-28 17:13:39 +08:00
|
|
|
struct _fqdn_category_t
|
|
|
|
|
{
|
|
|
|
|
int ref_cnt;
|
|
|
|
|
unsigned int category_id;
|
|
|
|
|
int match_method;
|
|
|
|
|
char fqdn[MAX_DOAMIN_LEN/8];
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-01 10:48:19 +00:00
|
|
|
struct http_response_pages
|
|
|
|
|
{
|
|
|
|
|
int profile_id;
|
|
|
|
|
int content_len;
|
|
|
|
|
int ref_cnt;
|
|
|
|
|
enum HTTP_RESPONSE_FORMAT format;
|
|
|
|
|
char *content;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2021-03-02 10:39:33 +08:00
|
|
|
struct master_context
|
2020-01-07 13:04:00 +08:00
|
|
|
{
|
2020-01-17 16:06:21 +08:00
|
|
|
tsg_protocol_t proto;
|
2020-01-07 13:04:00 +08:00
|
|
|
int hit_cnt;
|
2021-04-27 09:49:15 +00:00
|
|
|
int is_esni;
|
2021-07-13 14:54:57 +08:00
|
|
|
int is_proxy;
|
2021-04-27 09:49:15 +00:00
|
|
|
char *domain;
|
|
|
|
|
scan_status_t mid;
|
2021-04-29 14:43:44 +08:00
|
|
|
struct Maat_rule_t *result;
|
2021-04-27 09:49:15 +00:00
|
|
|
struct timespec last_scan_time;
|
2020-01-07 13:04:00 +08:00
|
|
|
};
|
2019-12-09 18:53:40 +08:00
|
|
|
|
2021-08-01 10:48:19 +00:00
|
|
|
struct tcpall_context
|
|
|
|
|
{
|
|
|
|
|
int vlan_id_num;
|
|
|
|
|
int vlan_id[MAX_RESULT_NUM];
|
|
|
|
|
};
|
|
|
|
|
|
2020-01-10 17:26:33 +08:00
|
|
|
#define _MAX_TABLE_NAME_LEN 64
|
2019-12-09 18:53:40 +08:00
|
|
|
typedef struct _tsg_para
|
|
|
|
|
{
|
2021-08-01 10:48:19 +00:00
|
|
|
int level;
|
|
|
|
|
short mirror_switch;
|
2020-01-19 15:53:02 +08:00
|
|
|
unsigned short timeout;
|
2021-06-03 11:48:36 +08:00
|
|
|
int app_dict_field_num;
|
2020-10-19 13:59:35 +08:00
|
|
|
int device_id;
|
|
|
|
|
int entrance_id;
|
2021-05-19 07:10:25 +00:00
|
|
|
int hash_timeout;
|
|
|
|
|
int hash_slot_size;
|
2021-04-27 09:49:15 +00:00
|
|
|
int scan_time_interval;
|
2021-05-24 15:30:46 +08:00
|
|
|
int hit_path_switch;
|
2021-03-15 01:15:23 +00:00
|
|
|
int default_compile_switch;
|
|
|
|
|
int default_compile_id;
|
2020-01-10 17:26:33 +08:00
|
|
|
int table_id[TABLE_MAX];
|
2019-12-11 15:13:27 +08:00
|
|
|
int dyn_subscribe_ip_table_id; //TSG_DYN_SUBSCRIBER_IP
|
2019-12-09 18:53:40 +08:00
|
|
|
int priority_project_id;
|
2020-05-14 15:52:54 +08:00
|
|
|
int internal_project_id;
|
2021-04-27 09:49:15 +00:00
|
|
|
int context_project_id;
|
2021-08-01 10:48:19 +00:00
|
|
|
int tcpall_project_id;
|
2021-07-05 14:22:24 +08:00
|
|
|
int linkinfo_project_id;
|
2021-04-27 09:49:15 +00:00
|
|
|
int gather_app_project_id;
|
|
|
|
|
int app_bridge_id;
|
2020-08-28 10:43:12 +08:00
|
|
|
int proto_flag; //tsg_protocol_t
|
2019-12-09 18:53:40 +08:00
|
|
|
int fs2_field_id[TSG_FS2_MAX];
|
2020-05-22 09:51:28 +08:00
|
|
|
char device_sn[MAX_DOAMIN_LEN/8];
|
2020-09-28 17:13:39 +08:00
|
|
|
char log_path[MAX_DOAMIN_LEN/8];
|
2020-10-19 13:59:35 +08:00
|
|
|
char device_id_command[MAX_DOAMIN_LEN/8];
|
2020-09-23 16:51:25 +08:00
|
|
|
char data_center[_MAX_TABLE_NAME_LEN];
|
2020-01-10 17:26:33 +08:00
|
|
|
char table_name[TABLE_MAX][_MAX_TABLE_NAME_LEN];
|
2019-12-09 18:53:40 +08:00
|
|
|
void *logger;
|
|
|
|
|
screen_stat_handle_t fs2_handle;
|
2021-04-27 09:49:15 +00:00
|
|
|
struct l7_protocol *name_by_id;
|
|
|
|
|
struct l7_protocol *id_by_name;
|
2021-08-01 10:48:19 +00:00
|
|
|
struct traffic_mirror *mirror_handle;
|
|
|
|
|
ctemplate::Template *tpl_403,*tpl_404;
|
|
|
|
|
ctemplate::Template *tpl_200,*tpl_204;
|
|
|
|
|
ctemplate::Template *tpl_303;
|
2019-12-09 18:53:40 +08:00
|
|
|
}g_tsg_para_t;
|
|
|
|
|
|
|
|
|
|
extern g_tsg_para_t g_tsg_para;
|
|
|
|
|
|
2019-12-20 11:15:29 +08:00
|
|
|
typedef enum _tsg_statis_field_id
|
|
|
|
|
{
|
|
|
|
|
STATIS_UNKNOWN=0,
|
|
|
|
|
STATIS_ENTRANCE_ID=1,
|
|
|
|
|
STATIS_TOTAL_CON_NUM,
|
|
|
|
|
STATIS_NEW_CON_NUM,
|
2020-01-07 13:04:00 +08:00
|
|
|
STATIS_ESTABLISHED_CON_NUM,
|
2019-12-20 11:15:29 +08:00
|
|
|
STATIS_CLOSE_CON_NUM,
|
|
|
|
|
STATIS_TOTAL_IN_BYTES,
|
|
|
|
|
STATIS_TOTAL_OUT_BYTES,
|
|
|
|
|
STATIS_TOTAL_IN_PACKETS,
|
|
|
|
|
STATIS_TOTAL_OUT_PACKETS,
|
|
|
|
|
STATIS_DEFAULT_CON_NUM,
|
|
|
|
|
STATIS_DEFAULT_IN_BYTES,
|
|
|
|
|
STATIS_DEFAULT_OUT_BYTES,
|
|
|
|
|
STATIS_DEFAULT_IN_PACKETS,
|
|
|
|
|
STATIS_DEFAULT_OUT_PACKETS,
|
|
|
|
|
STATIS_ALLOW_CON_NUM,
|
|
|
|
|
STATIS_ALLOW_IN_BYTES,
|
|
|
|
|
STATIS_ALLOW_OUT_BYTES,
|
|
|
|
|
STATIS_ALLOW_IN_PACKETS,
|
|
|
|
|
STATIS_ALLOW_OUT_PACKETS,
|
|
|
|
|
STATIS_DENY_CON_NUM,
|
|
|
|
|
STATIS_DENY_IN_BYTES,
|
|
|
|
|
STATIS_DENY_OUT_BYTES,
|
|
|
|
|
STATIS_DENY_IN_PACKETS,
|
|
|
|
|
STATIS_DENY_OUT_PACKETS,
|
|
|
|
|
STATIS_MONITOR_CON_NUM,
|
|
|
|
|
STATIS_MONITOR_IN_BYTES,
|
|
|
|
|
STATIS_MONITOR_OUT_BYTES,
|
|
|
|
|
STATIS_MONITOR_IN_PACKETS,
|
|
|
|
|
STATIS_MONITOR_OUT_PACKETS,
|
|
|
|
|
STATIS_INTERCEPT_CON_NUM,
|
|
|
|
|
STATIS_INTERCEPT_IN_BYTES,
|
|
|
|
|
STATIS_INTERCEPT_OUT_BYTES,
|
|
|
|
|
STATIS_INTERCEPT_IN_PACKETS,
|
|
|
|
|
STATIS_INTERCEPT_OUT_PACKETS,
|
2020-10-14 09:47:02 +08:00
|
|
|
STATIS_IPV4_IN_BYTES,
|
|
|
|
|
STATIS_IPV4_OUT_BYTES,
|
|
|
|
|
STATIS_IPV4_IN_PACKETS,
|
|
|
|
|
STATIS_IPV4_OUT_PACKETS,
|
|
|
|
|
STATIS_IPV6_IN_BYTES,
|
|
|
|
|
STATIS_IPV6_OUT_BYTES,
|
|
|
|
|
STATIS_IPV6_IN_PACKETS,
|
|
|
|
|
STATIS_IPV6_OUT_PACKETS,
|
|
|
|
|
STATIS_TCP_NEW_CON_NUM,
|
|
|
|
|
STATIS_TCP_IN_BYTES,
|
|
|
|
|
STATIS_TCP_OUT_BYTES,
|
|
|
|
|
STATIS_TCP_IN_PACKETS,
|
|
|
|
|
STATIS_TCP_OUT_PACKETS,
|
|
|
|
|
STATIS_UDP_NEW_CON_NUM,
|
|
|
|
|
STATIS_UDP_IN_BYTES,
|
|
|
|
|
STATIS_UDP_OUT_BYTES,
|
|
|
|
|
STATIS_UDP_IN_PACKETS,
|
|
|
|
|
STATIS_UDP_OUT_PACKETS,
|
2020-06-05 16:53:25 +08:00
|
|
|
STATIS_ALERT_BYTES,
|
|
|
|
|
STATIS_BLOCK_BYTES,
|
|
|
|
|
STATIS_PINNING_NUM,
|
|
|
|
|
STATIS_MAYBE_PINNING_NUM,
|
|
|
|
|
STATIS_NOT_PINNING_NUM,
|
2019-12-20 11:15:29 +08:00
|
|
|
STATIS_MAX
|
|
|
|
|
}tsg_statis_field_id_t;
|
|
|
|
|
|
|
|
|
|
enum TRAFFIC_INFO_IDX
|
|
|
|
|
{
|
|
|
|
|
TRAFFIC_INFO_ALLOW=0,
|
|
|
|
|
TRAFFIC_INFO_DENY,
|
|
|
|
|
TRAFFIC_INFO_MONITOR,
|
|
|
|
|
TRAFFIC_INFO_INTERCEPT,
|
|
|
|
|
TRAFFIC_INFO_MAX
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
typedef struct _tsg_statistic
|
|
|
|
|
{
|
|
|
|
|
int cycle;
|
2020-01-07 13:04:00 +08:00
|
|
|
int fs_line_id;
|
2019-12-20 11:15:29 +08:00
|
|
|
int fs_field_id[STATIS_MAX];
|
2020-06-05 16:53:25 +08:00
|
|
|
long long statistic_opt[_OPT_TYPE_MAX];
|
2020-01-07 13:04:00 +08:00
|
|
|
struct _traffic_info *traffic_info[TSG_ACTION_MAX+1];
|
2020-03-30 16:20:02 +08:00
|
|
|
struct _traffic_info default_total_info;
|
2019-12-20 11:15:29 +08:00
|
|
|
screen_stat_handle_t fs2_handle;
|
|
|
|
|
}tsg_statis_para_t;
|
|
|
|
|
|
|
|
|
|
int tsg_statistic_init(const char *conffile, void *logger);
|
2021-05-19 07:10:25 +00:00
|
|
|
int tsg_gtp_signaling_hash_init(const char* conffile, void *logger);
|
2021-08-01 10:48:19 +00:00
|
|
|
int tsg_send_raw_packet_init(const char* conffile, void *logger);
|
2019-12-20 11:15:29 +08:00
|
|
|
|
2021-05-11 17:19:41 +08:00
|
|
|
//parent_app_name.app_name
|
|
|
|
|
int tsg_app_id2name(int app_id, char *app_name, int app_name_len, int is_joint_parent);
|
|
|
|
|
|
2020-05-14 15:52:54 +08:00
|
|
|
void location_free_data(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp);
|
|
|
|
|
void ASN_free_data(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp);
|
2020-05-19 10:02:31 +08:00
|
|
|
void subscribe_id_free_data(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp);
|
2021-04-29 14:43:44 +08:00
|
|
|
void app_id_dict_free_data(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp);
|
2021-08-01 10:48:19 +00:00
|
|
|
void http_response_pages_free(int table_id, MAAT_PLUGIN_EX_DATA* ad, long argl, void* argp);
|
|
|
|
|
int set_vlan_id_to_project(const struct streaminfo *a_stream, struct tcpall_context *context, int *vlan_id, int vlan_id_num, int thread_seq);
|
2021-03-15 01:15:23 +00:00
|
|
|
void security_compile_free(int idx, const struct Maat_rule_t* rule, const char* srv_def_large, MAAT_RULE_EX_DATA* ad, long argl, void *argp);
|
2021-08-01 10:48:19 +00:00
|
|
|
|
2021-04-27 09:49:15 +00:00
|
|
|
struct Maat_rule_t *tsg_policy_decision_criteria(struct streaminfo *a_stream, Maat_rule_t *result, int result_num, int thread_seq);
|
2021-04-28 09:23:05 +00:00
|
|
|
int tsg_scan_addr(Maat_feather_t maat_feather, const struct streaminfo *a_stream, tsg_protocol_t proto, scan_status_t *mid, Maat_rule_t*result, int result_num);
|
2021-04-27 09:49:15 +00:00
|
|
|
int tsg_scan_shared_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, char *domain, Maat_rule_t *result, int result_num, scan_status_t *mid, int table_id, int thread_seq);
|
|
|
|
|
int tsg_scan_app_properties_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, struct Maat_rule_t *result, int result_num, scan_status_t *mid, char *property, char *district, int thread_seq);
|
2021-04-21 13:46:45 +08:00
|
|
|
int tsg_scan_subscribe_id_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, struct Maat_rule_t *result, int result_num, scan_status_t *mid, struct _subscribe_id_info_t *user_info, int thread_seq);
|
2021-05-19 07:10:25 +00:00
|
|
|
int tsg_get_umts_user_info(const struct streaminfo *a_stream, struct umts_user_info **user_info);
|
|
|
|
|
int tsg_scan_gtp_apn_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, struct Maat_rule_t *result, int result_num, scan_status_t *mid, char *apn, int thread_seq);
|
|
|
|
|
int tsg_scan_gtp_imsi_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, struct Maat_rule_t *result, int result_num, scan_status_t *mid, char *imsi, int thread_seq);
|
|
|
|
|
int tsg_scan_gtp_phone_number_policy(Maat_feather_t maat_feather, const struct streaminfo *a_stream, struct Maat_rule_t *result, int result_num, scan_status_t *mid, char *phone_number, int thread_seq);
|
2021-06-02 12:10:57 +08:00
|
|
|
int tsg_get_ip_location(const struct streaminfo *a_stream, int table_id, MAAT_PLUGIN_EX_DATA *client_location, MAAT_PLUGIN_EX_DATA *server_location);
|
|
|
|
|
int tsg_get_ip_asn(const struct streaminfo *a_stream, int table_id, MAAT_PLUGIN_EX_DATA* client_asn, MAAT_PLUGIN_EX_DATA* server_asn);
|
|
|
|
|
int tsg_get_subscribe_id(const struct streaminfo *a_stream, struct _subscribe_id_info_t **source_subscribe_id, struct _subscribe_id_info_t **dest_subscribe_id);
|
2021-08-01 10:48:19 +00:00
|
|
|
int tsg_send_raw_packet(const struct streaminfo *a_stream, int *vlan_id, int vlan_id_num, int thread_seq);
|
|
|
|
|
int tsg_get_vlan_id_by_monitor_rule(Maat_feather_t maat_feather, struct Maat_rule_t *result, int result_num, int *vlan_id, int vlan_id_num);
|
2020-05-14 15:52:54 +08:00
|
|
|
|
2019-12-20 11:15:29 +08:00
|
|
|
#endif
|