libosmovty  1.5.1
Osmocom VTY library
misc.h
Go to the documentation of this file.
1 
3 #pragma once
4 
5 #include <osmocom/vty/vty.h>
8 #include <osmocom/core/utils.h>
9 
10 #define VTY_DO_LOWER 1
11 char *vty_cmd_string_from_valstr(void *ctx, const struct value_string *vals,
12  const char *prefix, const char *sep,
13  const char *end, int do_lower);
14 
15 void vty_out_rate_ctr_group(struct vty *vty, const char *prefix,
16  struct rate_ctr_group *ctrg);
17 void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt,
18  struct rate_ctr_group *ctrg);
19 
20 void vty_out_stat_item_group(struct vty *vty, const char *prefix,
21  struct osmo_stat_item_group *statg);
22 
23 void vty_out_statistics_full(struct vty *vty, const char *prefix);
24 void vty_out_statistics_partial(struct vty *vty, const char *prefix,
25  int max_level);
26 
27 
28 struct osmo_fsm;
29 struct osmo_fsm_inst;
30 void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm);
31 void vty_out_fsm2(struct vty *vty, const char *prefix, struct osmo_fsm *fsm);
32 void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi);
33 void vty_out_fsm_inst2(struct vty *vty, const char *prefix, struct osmo_fsm_inst *fsmi);
34 void osmo_fsm_vty_add_cmds(void);
35 void osmo_talloc_vty_add_cmds(void);
36 
37 
38 int osmo_vty_write_config_file(const char *filename);
int osmo_vty_save_config_file(void)
Save the current state to the config file.
Definition: command.c:4307
int osmo_vty_write_config_file(const char *filename)
Write the current running config to a given file.
Definition: command.c:4289
void vty_out_rate_ctr_group_fmt(struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg)
print a rate counter group to given VTY, formatting the line for each counter according to a format s...
Definition: utils.c:213
void vty_out_rate_ctr_group(struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
print a rate counter group to given VTY
Definition: utils.c:77
void vty_out_stat_item_group(struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
print a stat item group to given VTY
Definition: utils.c:269
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.
Definition: utils.c:339
void vty_out_statistics_full(struct vty *vty, const char *prefix)
Definition: utils.c:333
void vty_out_statistics_partial(struct vty *vty, const char *prefix, int max_level)
Definition: utils.c:322
void vty_out_fsm2(struct vty *vty, const char *prefix, struct osmo_fsm *fsm)
Print information about a FSM [class] to the given VTY.
Definition: fsm_vty.c:57
void osmo_fsm_vty_add_cmds(void)
Install VTY commands for FSM introspection This installs a couple of VTY commands for introspection o...
Definition: fsm_vty.c:206
void vty_out_fsm_inst2(struct vty *vty, const char *prefix, struct osmo_fsm_inst *fsmi)
Print a FSM instance to the given VTY.
Definition: fsm_vty.c:97
void vty_out_fsm(struct vty *vty, struct osmo_fsm *fsm)
Print information about a FSM [class] to the given VTY.
Definition: fsm_vty.c:87
void vty_out_fsm_inst(struct vty *vty, struct osmo_fsm_inst *fsmi)
Print a FSM instance to the given VTY.
Definition: fsm_vty.c:125
void osmo_talloc_vty_add_cmds(void)
Install VTY commands for talloc context introspection.
Definition: talloc_ctx_vty.c:248
struct osmo_fsm * fsm
Internal representation of a single VTY.
Definition: vty.h:73