2020-08-19 16:56:10 +08:00
|
|
|
#ifndef __TSG_LABEL_H__
|
|
|
|
|
#define __TSG_LABEL_H__
|
|
|
|
|
|
2020-09-28 17:13:39 +08:00
|
|
|
#define MAX_CATEGORY_ID_NUM 8
|
2020-08-19 16:56:10 +08:00
|
|
|
#define MAX_STR_FIELD_LEN 64
|
|
|
|
|
|
2020-12-14 16:25:55 +06:00
|
|
|
#define MAX_RESULT_NUM 8
|
2021-08-07 17:27:55 +08:00
|
|
|
#define MAX_DOMAIN_LEN 2048
|
2020-12-14 16:25:55 +06:00
|
|
|
|
2020-08-19 16:56:10 +08:00
|
|
|
typedef enum _tsg_protocol
|
|
|
|
|
{
|
|
|
|
|
PROTO_UNKONWN=0,
|
|
|
|
|
PROTO_IPv4=1,
|
|
|
|
|
PROTO_IPv6,
|
|
|
|
|
PROTO_TCP,
|
|
|
|
|
PROTO_UDP,
|
|
|
|
|
PROTO_HTTP,
|
|
|
|
|
PROTO_MAIL,
|
|
|
|
|
PROTO_DNS,
|
|
|
|
|
PROTO_FTP,
|
|
|
|
|
PROTO_SSL,
|
|
|
|
|
PROTO_SIP,
|
|
|
|
|
PROTO_BGP,
|
|
|
|
|
PROTO_STREAMING_MEDIA,
|
|
|
|
|
PROTO_QUIC,
|
2020-08-24 16:37:20 +08:00
|
|
|
PROTO_SSH,
|
2020-09-02 19:44:15 +08:00
|
|
|
PROTO_SMTP,
|
|
|
|
|
PROTO_IMAP,
|
|
|
|
|
PROTO_POP3,
|
2021-02-23 15:23:54 +08:00
|
|
|
PROTO_RTP,
|
2021-03-02 10:39:33 +08:00
|
|
|
PROTO_APP,
|
2020-08-19 16:56:10 +08:00
|
|
|
PROTO_MAX
|
|
|
|
|
}tsg_protocol_t;
|
|
|
|
|
|
|
|
|
|
|
2021-08-07 17:27:55 +08:00
|
|
|
struct asn_info
|
2020-08-19 16:56:10 +08:00
|
|
|
{
|
|
|
|
|
int ref_cnt;
|
2021-08-07 17:27:55 +08:00
|
|
|
char *asn_id;
|
|
|
|
|
char *organization;
|
2020-08-19 16:56:10 +08:00
|
|
|
};
|
|
|
|
|
|
2021-08-07 17:27:55 +08:00
|
|
|
struct location_info
|
2020-08-19 16:56:10 +08:00
|
|
|
{
|
|
|
|
|
int ref_cnt;
|
2021-08-07 17:27:55 +08:00
|
|
|
char *country_full;
|
|
|
|
|
char *province_full;
|
|
|
|
|
char *city_full;
|
2020-08-19 16:56:10 +08:00
|
|
|
};
|
|
|
|
|
|
2021-08-07 17:27:55 +08:00
|
|
|
struct subscribe_id_info
|
2020-08-19 16:56:10 +08:00
|
|
|
{
|
|
|
|
|
int ref_cnt;
|
2021-08-07 17:27:55 +08:00
|
|
|
char *subscribe_id;
|
2020-08-19 16:56:10 +08:00
|
|
|
};
|
|
|
|
|
|
2021-05-19 07:10:25 +00:00
|
|
|
struct umts_user_info
|
|
|
|
|
{
|
|
|
|
|
char *apn;
|
|
|
|
|
char *imsi;
|
|
|
|
|
char *imei;
|
|
|
|
|
char *msisdn; //MSISDN: phone number
|
|
|
|
|
};
|
|
|
|
|
|
2021-08-07 17:27:55 +08:00
|
|
|
struct session_attribute_label
|
2020-08-19 16:56:10 +08:00
|
|
|
{
|
2021-08-07 17:27:55 +08:00
|
|
|
int http_action_file_size;
|
2020-09-28 17:13:39 +08:00
|
|
|
int fqdn_category_id_num;
|
2020-08-19 16:56:10 +08:00
|
|
|
tsg_protocol_t proto;
|
|
|
|
|
long establish_latency_ms;
|
2021-08-07 17:27:55 +08:00
|
|
|
struct asn_info *client_asn;
|
|
|
|
|
struct asn_info *server_asn;
|
|
|
|
|
struct location_info *client_location;
|
|
|
|
|
struct location_info *server_location;
|
|
|
|
|
struct subscribe_id_info *client_subscribe_id;
|
|
|
|
|
struct subscribe_id_info *server_subscribe_id;
|
2020-09-11 18:06:09 +08:00
|
|
|
char *ja3_fingerprint;
|
2020-09-28 17:13:39 +08:00
|
|
|
unsigned int fqdn_category_id[MAX_CATEGORY_ID_NUM];
|
2021-05-19 07:10:25 +00:00
|
|
|
struct umts_user_info *user_info;
|
2020-08-19 16:56:10 +08:00
|
|
|
};
|
|
|
|
|
|
2021-08-07 17:27:55 +08:00
|
|
|
struct policy_priority_label
|
2020-12-14 16:25:55 +06:00
|
|
|
{
|
|
|
|
|
tsg_protocol_t proto; //enum _tsg_protocol (tsg_types.h)
|
|
|
|
|
int domain_len;
|
|
|
|
|
int result_type; //enum _PULL_RESULT_TYPE (tsg_rule.h)
|
|
|
|
|
int result_num;
|
2021-08-07 17:27:55 +08:00
|
|
|
char domain[MAX_DOMAIN_LEN];
|
2020-12-14 16:25:55 +06:00
|
|
|
Maat_rule_t result[MAX_RESULT_NUM];
|
2021-08-07 17:27:55 +08:00
|
|
|
};
|
2020-12-14 16:25:55 +06:00
|
|
|
|
2021-09-11 14:08:50 +08:00
|
|
|
|
|
|
|
|
struct tsg_conn_sketch_notify_data
|
|
|
|
|
{
|
|
|
|
|
tsg_protocol_t protocol;
|
|
|
|
|
union
|
|
|
|
|
{
|
|
|
|
|
char *mail_eml_filename;
|
|
|
|
|
void *value;
|
|
|
|
|
}pdata;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2020-08-19 16:56:10 +08:00
|
|
|
#endif
|