aboutsummaryrefslogtreecommitdiff
path: root/examples/c-influxd
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2025-01-25 09:14:02 +0100
committerToni Uhlig <matzeton@googlemail.com>2025-01-25 10:07:25 +0100
commit471ea834933dd089b49777d595cef9f612bdb709 (patch)
tree85a8600d268ede6bc705a3ba1aec109cc959f5b9 /examples/c-influxd
parent064bd3aefa7a4f98b4c3c079e03df37c1b0b5125 (diff)
bump libnDPI to e946f49aca13e4447a7d7b2acae6323a4531fb55
* incorporated upstream changes Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-influxd')
-rw-r--r--examples/c-influxd/c-influxd.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/examples/c-influxd/c-influxd.c b/examples/c-influxd/c-influxd.c
index 3eab9a514..b147fa24b 100644
--- a/examples/c-influxd/c-influxd.c
+++ b/examples/c-influxd/c-influxd.c
@@ -170,6 +170,7 @@ static struct
uint64_t flow_category_antimalware_count;
uint64_t flow_category_crypto_currency_count;
uint64_t flow_category_gambling_count;
+ uint64_t flow_category_health_count;
uint64_t flow_category_unknown_count;
uint64_t flow_confidence_by_port;
@@ -220,15 +221,10 @@ struct global_map
};
};
-#define INFLUXD_STATS_COUNTER_PTR(member) \
- { \
- .global_stat_inc = &(influxd_statistics.counters.member), NULL \
- }
+#define INFLUXD_STATS_COUNTER_PTR(member) {.global_stat_inc = &(influxd_statistics.counters.member), NULL}
#define INFLUXD_STATS_GAUGE_PTR(member) \
- { \
- .global_stat_inc = &(influxd_statistics.gauges[0].member), \
- .global_stat_dec = &(influxd_statistics.gauges[1].member) \
- }
+ {.global_stat_inc = &(influxd_statistics.gauges[0].member), \
+ .global_stat_dec = &(influxd_statistics.gauges[1].member)}
#define INFLUXD_STATS_COUNTER_INC(member) (influxd_statistics.counters.member++)
#define INFLUXD_STATS_GAUGE_RES(member) (influxd_statistics.gauges[0].member--)
#define INFLUXD_STATS_GAUGE_INC(member) (influxd_statistics.gauges[0].member++)
@@ -328,6 +324,7 @@ static struct global_map const categories_map[] = {
{"Antimalware", INFLUXD_STATS_GAUGE_PTR(flow_category_antimalware_count)},
{"Crypto_Currency", INFLUXD_STATS_GAUGE_PTR(flow_category_crypto_currency_count)},
{"Gambling", INFLUXD_STATS_GAUGE_PTR(flow_category_gambling_count)},
+ {"Health", INFLUXD_STATS_GAUGE_PTR(flow_category_health_count)},
{NULL, INFLUXD_STATS_GAUGE_PTR(flow_category_unknown_count)}};
static struct global_map const confidence_map[] = {
@@ -486,7 +483,7 @@ static int serialize_influx_line(char * buf, size_t siz)
INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT()
INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT()
INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT()
- INFLUXDB_FORMAT() INFLUXDB_FORMAT_END(),
+ INFLUXDB_FORMAT() INFLUXDB_FORMAT() INFLUXDB_FORMAT_END(),
"category",
INFLUXDB_VALUE_GAUGE(flow_category_unspecified_count),
@@ -528,6 +525,7 @@ static int serialize_influx_line(char * buf, size_t siz)
INFLUXDB_VALUE_GAUGE(flow_category_antimalware_count),
INFLUXDB_VALUE_GAUGE(flow_category_crypto_currency_count),
INFLUXDB_VALUE_GAUGE(flow_category_gambling_count),
+ INFLUXDB_VALUE_GAUGE(flow_category_health_count),
INFLUXDB_VALUE_GAUGE(flow_category_unknown_count));
CHECK_SNPRINTF_RET(bytes);
@@ -656,6 +654,7 @@ failure:
INFLUXD_STATS_GAUGE_SUB(flow_category_antimalware_count);
INFLUXD_STATS_GAUGE_SUB(flow_category_crypto_currency_count);
INFLUXD_STATS_GAUGE_SUB(flow_category_gambling_count);
+ INFLUXD_STATS_GAUGE_SUB(flow_category_health_count);
INFLUXD_STATS_GAUGE_SUB(flow_category_unknown_count);
INFLUXD_STATS_GAUGE_SUB(flow_confidence_by_port);