aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2017-09-15 11:13:25 +0200
committerLuca Deri <deri@ntop.org>2017-09-15 11:13:25 +0200
commit83b1b34c18408f969da6689972e2394aa06efc2c (patch)
treef6c68b817c506cd9404876459bfebc5a87cdfce5 /src/include
parentb4d535e184c91bc0d14292d7db2ec23a253b5fae (diff)
Added custom 5 protocol categories to be used by applications. They are currently empty
Added ndpi_is_custom_category() to check if a defined category is custom
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h9
-rw-r--r--src/include/ndpi_typedefs.h11
2 files changed, 17 insertions, 3 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 76285cb70..325ee0564 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -411,6 +411,15 @@ extern "C" {
char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto, char *buf, u_int buf_len);
/**
+ * Find out if a given category is custom/user-defined
+ *
+ * @par category = the category associated to the protocol
+ * @return 1 if this is a custom user category, 0 otherwise
+ *
+ */
+ int ndpi_is_custom_category(ndpi_protocol_category_t category);
+
+ /**
* Get protocol category as string
*
* @par category = the category associated to the protocol
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index e5e9053e8..51c0df449 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -748,10 +748,10 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_MEDIA, /* Multimedia and streaming */
NDPI_PROTOCOL_CATEGORY_VPN, /* Virtual Private Networks */
NDPI_PROTOCOL_CATEGORY_MAIL, /* Protocols to send/receive/sync emails */
- NDPI_PROTOCOL_CATEGORY_FILE_TRANSFER, /* FTP and similar protocols */
+ NDPI_PROTOCOL_CATEGORY_DATA_TRANSFER, /* AFS/NFS and similar protocols */
NDPI_PROTOCOL_CATEGORY_WEB, /* Web protocols and services */
NDPI_PROTOCOL_CATEGORY_SOCIAL_NETWORK, /* Social networks */
- NDPI_PROTOCOL_CATEGORY_P2P, /* File sharing and P2P */
+ NDPI_PROTOCOL_CATEGORY_P2P_DOWNLOAD_FT, /* Download, FTP, file transfer/sharing and P2P */
NDPI_PROTOCOL_CATEGORY_GAME, /* Online games */
NDPI_PROTOCOL_CATEGORY_CHAT, /* Instant messaging */
NDPI_PROTOCOL_CATEGORY_VOIP, /* Real-time communications and conferencing */
@@ -762,8 +762,13 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_COLLABORATIVE, /* Software for collaborative development, including Webmail */
NDPI_PROTOCOL_CATEGORY_RPC, /* High level network communication protocols */
NDPI_PROTOCOL_CATEGORY_NETWORK_TOOL, /* Network administration and monitor protocols */
- NDPI_PROTOCOL_CATEGORY_SYSTEM, /* System level applications */
+ NDPI_PROTOCOL_CATEGORY_SYSTEM_OS, /* System/Operating System level applications */
NDPI_PROTOCOL_CATEGORY_SW_UPDATE, /* Software update */
+ NDPI_PROTOCOL_CATEGORY_CUSTOM_1, /* User custom category 1 */
+ NDPI_PROTOCOL_CATEGORY_CUSTOM_2, /* User custom category 2 */
+ NDPI_PROTOCOL_CATEGORY_CUSTOM_3, /* User custom category 3 */
+ NDPI_PROTOCOL_CATEGORY_CUSTOM_4, /* User custom category 4 */
+ NDPI_PROTOCOL_CATEGORY_CUSTOM_5, /* User custom category 5 */
NDPI_PROTOCOL_NUM_CATEGORIES /*
NOTE: Keep this as last member