diff options
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r-- | include/osmocom/vty/command.h | 10 | ||||
-rw-r--r-- | include/osmocom/vty/misc.h | 8 | ||||
-rw-r--r-- | include/osmocom/vty/stats.h | 3 |
3 files changed, 20 insertions, 1 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 4eb519f6..2ef4109e 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -75,6 +75,7 @@ enum node_type { SERVICE_NODE, /*!< \brief Service node. */ DEBUG_NODE, /*!< \brief Debug node. */ CFG_LOG_NODE, /*!< \brief Configure the logging */ + CFG_STATS_NODE, /*!< \brief Configure the statistics */ VTY_NODE, /*!< \brief Vty node. */ @@ -83,6 +84,15 @@ enum node_type { L_NS_NODE, /*!< \brief NS node in libosmo-gb. */ L_BSSGP_NODE, /*!< \brief BSSGP node in libosmo-gb. */ + /* + * When adding new nodes to the libosmocore project, these nodes can be + * used to avoid ABI changes for unrelated projects. + */ + RESERVED1_NODE, /*!< \brief Reserved for later extensions */ + RESERVED2_NODE, /*!< \brief Reserved for later extensions */ + RESERVED3_NODE, /*!< \brief Reserved for later extensions */ + RESERVED4_NODE, /*!< \brief Reserved for later extensions */ + _LAST_OSMOVTY_NODE }; diff --git a/include/osmocom/vty/misc.h b/include/osmocom/vty/misc.h index db552e77..f3b46dbd 100644 --- a/include/osmocom/vty/misc.h +++ b/include/osmocom/vty/misc.h @@ -2,6 +2,7 @@ #include <osmocom/vty/vty.h> #include <osmocom/core/rate_ctr.h> +#include <osmocom/core/stat_item.h> #include <osmocom/core/utils.h> #define VTY_DO_LOWER 1 @@ -10,7 +11,12 @@ char *vty_cmd_string_from_valstr(void *ctx, const struct value_string *vals, const char *end, int do_lower); void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, - struct rate_ctr_group *ctrg); + struct rate_ctr_group *ctrg); + +void vty_out_stat_item_group(struct vty *vty, const char *prefix, + struct osmo_stat_item_group *statg); + +void vty_out_statistics_full(struct vty *vty, const char *prefix); int osmo_vty_write_config_file(const char *filename); int osmo_vty_save_config_file(void); diff --git a/include/osmocom/vty/stats.h b/include/osmocom/vty/stats.h new file mode 100644 index 00000000..3851b4df --- /dev/null +++ b/include/osmocom/vty/stats.h @@ -0,0 +1,3 @@ +#pragma once + +void osmo_stats_vty_add_cmds(); |