libosmovty 1.9.0.196-9975
Osmocom VTY library
utils.c File Reference

Utility routines for printing common objects in the Osmocom world. More...

#include <stdint.h>
#include <stdbool.h>
#include <inttypes.h>
#include <string.h>
#include <ctype.h>
#include <limits.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/talloc.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/rate_ctr.h>
#include <osmocom/core/stat_item.h>
#include <osmocom/core/utils.h>
#include <osmocom/core/counter.h>
#include <osmocom/vty/vty.h>

Data Structures

struct  vty_out_context
 

Functions

static int rate_ctr_handler (struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_)
 
void vty_out_rate_ctr_group2 (struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg, bool skip_zero)
 print a rate counter group to given VTY More...
 
void vty_out_rate_ctr_group (struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
 
static char * pad_append_str (char *s, const char *a, int minwidth)
 
static char * pad_append_ctr (char *s, uint64_t ctr, int minwidth)
 
static int rate_ctr_handler_fmt (struct rate_ctr_group *ctrg, struct rate_ctr *ctr, const struct rate_ctr_desc *desc, void *vctx_)
 
void vty_out_rate_ctr_group_fmt2 (struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg, bool skip_zero)
 print a rate counter group to given VTY, formatting the line for each counter according to a format string. More...
 
void vty_out_rate_ctr_group_fmt (struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg)
 
static int rate_ctr_group_handler (struct rate_ctr_group *ctrg, void *vctx_)
 
static int osmo_stat_item_handler (struct osmo_stat_item_group *statg, struct osmo_stat_item *item, void *vctx_)
 
void vty_out_stat_item_group2 (struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg, bool skip_zero)
 print a stat item group to given VTY More...
 
void vty_out_stat_item_group (struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
 
static int osmo_stat_item_group_handler (struct osmo_stat_item_group *statg, void *vctx_)
 
static int handle_counter (struct osmo_counter *counter, void *vctx_)
 
void vty_out_statistics_partial2 (struct vty *vty, const char *prefix, int max_level, bool skip_zero)
 
void vty_out_statistics_partial (struct vty *vty, const char *prefix, int max_level)
 
void vty_out_statistics_full2 (struct vty *vty, const char *prefix, bool skip_zero)
 
void vty_out_statistics_full (struct vty *vty, const char *prefix)
 
char * vty_cmd_string_from_valstr (void *ctx, const struct value_string *vals, const char *prefix, const char *sep, const char *end, int do_lower)
 Generate a VTY command string from value_string. More...
 

Detailed Description

Utility routines for printing common objects in the Osmocom world.

Function Documentation

◆ osmo_stat_item_group_handler()

◆ osmo_stat_item_handler()