diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2015-10-29 00:55:58 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-11-02 15:39:01 +0100 |
commit | fc9533d6c4bde795dc0e18f02f91f54ab92888a2 (patch) | |
tree | 4ef9968929667894b99a42992d0a5c63d65ae011 /include/osmocom/core/stats.h | |
parent | bc4f7ae512b32fa4b569dfc5242d0b7a5da3f81b (diff) |
stats: Add osmo_ name prefix to identifiers
Since the the stat_item and stats functions and data types are meant
to be exported, they get an osmo_ prefix.
Sponsored-by: On-Waves ehf
[hfreyther: Prepended the enum values too. This was requested by
Jacob]
Diffstat (limited to 'include/osmocom/core/stats.h')
-rw-r--r-- | include/osmocom/core/stats.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/include/osmocom/core/stats.h b/include/osmocom/core/stats.h index 68c2e016..7b3d0211 100644 --- a/include/osmocom/core/stats.h +++ b/include/osmocom/core/stats.h @@ -23,18 +23,18 @@ #include <osmocom/core/linuxlist.h> struct msgb; -struct stat_item_group; -struct stat_item_desc; +struct osmo_stat_item_group; +struct osmo_stat_item_desc; struct rate_ctr_group; struct rate_ctr_desc; -enum stats_reporter_type { - STATS_REPORTER_STATSD, - STATS_REPORTER_LOG, +enum osmo_stats_reporter_type { + OSMO_STATS_REPORTER_STATSD, + OSMO_STATS_REPORTER_LOG, }; -struct stats_reporter { - enum stats_reporter_type type; +struct osmo_stats_reporter { + enum osmo_stats_reporter_type type; char *name; unsigned int have_net_config : 1; @@ -58,43 +58,43 @@ struct stats_reporter { int agg_enabled; struct llist_head list; - int (*open)(struct stats_reporter *srep); - int (*close)(struct stats_reporter *srep); - int (*send_counter)(struct stats_reporter *srep, + int (*open)(struct osmo_stats_reporter *srep); + int (*close)(struct osmo_stats_reporter *srep); + int (*send_counter)(struct osmo_stats_reporter *srep, const struct rate_ctr_group *ctrg, const struct rate_ctr_desc *desc, int64_t value, int64_t delta); - int (*send_item)(struct stats_reporter *srep, - const struct stat_item_group *statg, - const struct stat_item_desc *desc, + int (*send_item)(struct osmo_stats_reporter *srep, + const struct osmo_stat_item_group *statg, + const struct osmo_stat_item_desc *desc, int32_t value); }; -struct stats_config { +struct osmo_stats_config { int interval; }; -extern struct stats_config *stats_config; +extern struct osmo_stats_config *osmo_stats_config; -void stats_init(void *ctx); -int stats_report(); +void osmo_stats_init(void *ctx); +int osmo_stats_report(); -int stats_set_interval(int interval); +int osmo_stats_set_interval(int interval); -struct stats_reporter *stats_reporter_alloc(enum stats_reporter_type type, +struct osmo_stats_reporter *osmo_stats_reporter_alloc(enum osmo_stats_reporter_type type, const char *name); -void stats_reporter_free(struct stats_reporter *srep); +void osmo_stats_reporter_free(struct osmo_stats_reporter *srep); -struct stats_reporter *stats_reporter_create_statsd(const char *name); -struct stats_reporter *stats_reporter_create_log(const char *name); +struct osmo_stats_reporter *osmo_stats_reporter_create_statsd(const char *name); +struct osmo_stats_reporter *osmo_stats_reporter_create_log(const char *name); -struct stats_reporter *stats_reporter_find(enum stats_reporter_type type, +struct osmo_stats_reporter *osmo_stats_reporter_find(enum osmo_stats_reporter_type type, const char *name); -int stats_reporter_set_remote_addr(struct stats_reporter *srep, const char *addr); -int stats_reporter_set_remote_port(struct stats_reporter *srep, int port); -int stats_reporter_set_local_addr(struct stats_reporter *srep, const char *addr); -int stats_reporter_set_mtu(struct stats_reporter *srep, int mtu); -int stats_reporter_set_name_prefix(struct stats_reporter *srep, const char *prefix); -int stats_reporter_enable(struct stats_reporter *srep); -int stats_reporter_disable(struct stats_reporter *srep); +int osmo_stats_reporter_set_remote_addr(struct osmo_stats_reporter *srep, const char *addr); +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_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); |