summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/rate_ctr.h2
-rw-r--r--include/osmocom/core/stat_item.h2
-rw-r--r--include/osmocom/core/stats.h10
3 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h
index f3c03de3..03b1bfbe 100644
--- a/include/osmocom/core/rate_ctr.h
+++ b/include/osmocom/core/rate_ctr.h
@@ -47,6 +47,8 @@ struct rate_ctr_group_desc {
const char *group_name_prefix;
/*! \brief The human-readable description of the group */
const char *group_description;
+ /*! \brief The class to which this group belongs */
+ int class_id;
/*! \brief The number of counters in this group */
const unsigned int num_ctr;
/*! \brief Pointer to array of counter names */
diff --git a/include/osmocom/core/stat_item.h b/include/osmocom/core/stat_item.h
index 40474958..c2ad8cfd 100644
--- a/include/osmocom/core/stat_item.h
+++ b/include/osmocom/core/stat_item.h
@@ -45,6 +45,8 @@ struct osmo_stat_item_group_desc {
const char *group_name_prefix;
/*! \brief The human-readable description of the group */
const char *group_description;
+ /*! \brief The class to which this group belongs */
+ int class_id;
/*! \brief The number of values in this group */
const unsigned int num_items;
/*! \brief Pointer to array of value names */
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h
index 7b3d0211..731fdb9b 100644
--- a/include/osmocom/core/stats.h
+++ b/include/osmocom/core/stats.h
@@ -28,6 +28,13 @@ struct osmo_stat_item_desc;
struct rate_ctr_group;
struct rate_ctr_desc;
+enum osmo_stats_class {
+ OSMO_STATS_CLASS_UNKNOWN,
+ OSMO_STATS_CLASS_GLOBAL,
+ OSMO_STATS_CLASS_PEER,
+ OSMO_STATS_CLASS_SUBSCRIBER,
+};
+
enum osmo_stats_reporter_type {
OSMO_STATS_REPORTER_STATSD,
OSMO_STATS_REPORTER_LOG,
@@ -46,6 +53,7 @@ struct osmo_stats_reporter {
char *bind_addr_str;
int dest_port;
int mtu;
+ enum osmo_stats_class max_class;
/* state */
int running;
@@ -95,6 +103,8 @@ int osmo_stats_reporter_set_remote_addr(struct osmo_stats_reporter *srep, const
int osmo_stats_reporter_set_remote_port(struct osmo_stats_reporter *srep, int port);
int osmo_stats_reporter_set_local_addr(struct osmo_stats_reporter *srep, const char *addr);
int osmo_stats_reporter_set_mtu(struct osmo_stats_reporter *srep, int mtu);
+int osmo_stats_reporter_set_max_class(struct osmo_stats_reporter *srep,
+ enum osmo_stats_class class_id);
int osmo_stats_reporter_set_name_prefix(struct osmo_stats_reporter *srep, const char *prefix);
int osmo_stats_reporter_enable(struct osmo_stats_reporter *srep);
int osmo_stats_reporter_disable(struct osmo_stats_reporter *srep);