summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorliuxueli <[email protected]>2024-11-01 02:43:38 +0000
committerliuxueli <[email protected]>2024-11-27 06:36:26 +0000
commitd0193035811c8bc26bc28214edfc7bfaf839bab0 (patch)
treeab5c96d0f34aabc7d8ea9f20fe0ecc7dcb27e9ad
parentd614eee2343e4899797ed4b9f8982ff489397074 (diff)
scanner header review
-rw-r--r--include/stellar/scanner.h50
1 files changed, 6 insertions, 44 deletions
diff --git a/include/stellar/scanner.h b/include/stellar/scanner.h
index 442f632..62a4eac 100644
--- a/include/stellar/scanner.h
+++ b/include/stellar/scanner.h
@@ -8,6 +8,8 @@ extern "C"
#include "maat.h"
#include <stddef.h>
+#include "stellar/kv.h"
+
struct scanner;
struct scanner *stellar_module_get_scanner(struct stellar_module_manager *mod_mgr);
@@ -78,19 +80,6 @@ size_t scanner_state_get_current_packet_hit_objects(struct scanner_state *exdata
void scanner_session_record_enable_brief(struct scanner *scanner, struct session *session);
void scanner_session_record_enable_elaborate(struct scanner *scanner, struct session *session);
-/*
- Session JSON:
- Application / Application Category / Application Transition / Application Content
- Server FQDN / Server Domain / Sever FQDN tag rule_uuids (string)
- IMEI/IMSI/Phone Number/APN
- Client Subscriber ID
- Client/Server ASN
- Client/Server Country
- Decode Path / Decode AS
-*/
-
-#include "stellar/kv.h"
-
enum attribute_index
{
ATTRIBUTE_APPLICATION=0,
@@ -108,6 +97,9 @@ enum attribute_index
ATTRIBUTE_SERVER_ASN,
ATTRIBUTE_CLIENT_COUNTRY_CODE,
ATTRIBUTE_SERVER_COUNTRY_CODE,
+ ATTRIBUTE_CLIENT_IP_TAG_UUIDS,
+ ATTRIBUTE_SERVER_IP_TAG_UUIDS,
+ ATTRIBUTE_SERVER_FQDN_TAG_UUIDS,
ATTRIBUTE_DECODE_PATH,
ATTRIBUTE_DECODE_AS,
ATTRIBUTE_MAX
@@ -116,36 +108,6 @@ enum attribute_index
const struct kv *scanner_get_attribute_on_session(struct scanner *scanner, struct session *sess, enum attribute_index index);
const struct kv *scanner_get_attribute_on_packet(struct scanner *scanner, struct packet *pkt, enum attribute_index index);
-
-
#ifdef __cplusplus
}
-#endif
-
-
-
-
-// void attribute_exdata_get0_application(struct attribute_exdata *exdata, char **application, size_t *application_sz);
-// void attribute_exdata_get0_application_category(struct attribute_exdata *exdata, char **application_category, size_t *application_category_sz);
-// void attribute_exdata_get0_application_transition(struct attribute_exdata *exdata, char **application_transition, size_t *application_transition_sz);
-// void attribute_exdata_get0_application_content(struct attribute_exdata *exdata, char **application_content, size_t *application_content_sz);
-// void attribute_exdata_get0_server_fqdn(struct attribute_exdata *exdata, char **server_fqdn, size_t *server_fqdn_sz);
-// void attribute_exdata_get0_server_domain(struct attribute_exdata *exdata, char **server_domain, size_t *server_domain_sz);
-// void attribute_exdata_get0_imei(struct attribute_exdata *exdata, char **imei, size_t *imei_sz);
-// void attribute_exdata_get0_imsi(struct attribute_exdata *exdata, char **imsi, size_t *imsi_sz);
-// void attribute_exdata_get0_phone_number(struct attribute_exdata *exdata, char **phone_number, size_t *phone_number_sz);
-// void attribute_exdata_get0_apn(struct attribute_exdata *exdata, char **apn, size_t *apn_sz);
-// void attribute_exdata_get0_client_subscriber_id(struct attribute_exdata *exdata, char **client_subscriber_id, size_t *client_subscriber_id_sz);
-// void attribute_exdata_get0_client_asn(struct attribute_exdata *exdata, char **client_asn, size_t *client_asn_sz); // for dos enforcer
-// void attribute_exdata_get0_server_asn(struct attribute_exdata *exdata, char **server_asn, size_t *server_asn_sz);
-// void attribute_exdata_get0_client_country_code(struct attribute_exdata *exdata, char **country_code, size_t *country_code_sz);
-// void attribute_exdata_get0_server_country_code(struct attribute_exdata *exdata, char **country_code, size_t *country_code_sz);
-// void attribute_exdata_get0_decode_path(struct attribute_exdata *exdata, char **decode_path, size_t *decode_path_sz);
-// void attribute_exdata_get0_decode_as(struct attribute_exdata *exdata, char **decode_as, size_t *decode_as_sz);
-
-// long long attribute_exdata_get0_client_asn_id(struct attribute_exdata *exdata); // for statistics enforcer and recorder
-// long long attribute_exdata_get0_server_asn_id(struct attribute_exdata *exdata);
-
-// size_t attribute_exdata_get0_client_ip_tag_rule_uuids(struct attribute_exdata *exdata, uuid_t tag_uuids[], size_t n_tag_uuids);
-// size_t attribute_exdata_get0_server_ip_tag_rule_uuids(struct attribute_exdata *exdata, uuid_t tag_uuids[], size_t n_tag_uuids);
-// size_t attribute_exdata_get0_server_fqdn_tag_rule_uuids(struct attribute_exdata *exdata, uuid_t tag_uuids[], size_t n_tag_uuids);
+#endif \ No newline at end of file