libosmovty 1.9.0.196-9975
Osmocom VTY library
misc.h File Reference

Go to the source code of this file.

Macros

#define VTY_DO_LOWER   1
 

Functions

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...
 
void vty_out_rate_ctr_group (struct vty *vty, const char *prefix, struct rate_ctr_group *ctrg)
 
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_fmt (struct vty *vty, const char *fmt, struct rate_ctr_group *ctrg)
 
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_stat_item_group (struct vty *vty, const char *prefix, struct osmo_stat_item_group *statg)
 
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_statistics_full (struct vty *vty, const char *prefix)
 
void vty_out_statistics_full2 (struct vty *vty, const char *prefix, bool skip_zero)
 
void vty_out_statistics_partial (struct vty *vty, const char *prefix, int max_level)
 
void vty_out_statistics_partial2 (struct vty *vty, const char *prefix, int max_level, bool skip_zero)
 
void vty_out_fsm (struct vty *vty, struct osmo_fsm *fsm)
 Print information about a FSM [class] to the given VTY. More...
 
void vty_out_fsm2 (struct vty *vty, const char *prefix, struct osmo_fsm *fsm)
 Print information about a FSM [class] to the given VTY. More...
 
void vty_out_fsm_inst (struct vty *vty, struct osmo_fsm_inst *fsmi)
 Print a FSM instance to the given VTY. More...
 
void vty_out_fsm_inst2 (struct vty *vty, const char *prefix, struct osmo_fsm_inst *fsmi)
 Print a FSM instance to the given VTY. More...
 
void osmo_fsm_vty_add_cmds (void)
 Install VTY commands for FSM introspection This installs a couple of VTY commands for introspection of FSM classes as well as FSM instances. More...
 
void osmo_talloc_vty_add_cmds (void)
 Install VTY commands for talloc context introspection. More...
 
int osmo_vty_write_config_file (const char *filename)
 Write the current running config to a given file. More...
 
int osmo_vty_save_config_file (void)
 Save the current state to the config file. More...
 

Macro Definition Documentation

◆ VTY_DO_LOWER

#define VTY_DO_LOWER   1

Function Documentation

◆ osmo_fsm_vty_add_cmds()

void osmo_fsm_vty_add_cmds ( void  )

Install VTY commands for FSM introspection This installs a couple of VTY commands for introspection of FSM classes as well as FSM instances.

Call this once from your application if you want to support those commands.

References install_lib_element_ve().

◆ osmo_talloc_vty_add_cmds()

void osmo_talloc_vty_add_cmds ( void  )

Install VTY commands for talloc context introspection.

This installs a set of VTY commands for introspection of a talloc context. Call this once from your application if you want to support those commands.

References install_lib_element_ve().

◆ vty_out_fsm()

void vty_out_fsm ( struct vty vty,
struct osmo_fsm fsm 
)

Print information about a FSM [class] to the given VTY.

Parameters
vtyThe VTY to which to print
[in]fsmThe FSM class to print

References vty_out_fsm2().

Referenced by DEFUN().

◆ vty_out_fsm2()

void vty_out_fsm2 ( struct vty vty,
const char *  prefix,
struct osmo_fsm fsm 
)

Print information about a FSM [class] to the given VTY.

Parameters
vtyThe VTY to which to print
[in]prefixprefix to print at start of each line (typically indenting)
[in]fsmThe FSM class to print

References osmo_fsm::event_names, osmo_fsm_state::in_event_mask, log_category_name(), osmo_fsm::log_subsys, osmo_fsm::name, osmo_fsm_state::name, osmo_fsm::num_states, osmo_fsm_state::out_state_mask, osmo_fsm::states, value_string::str, value_string::value, VTY_NEWLINE, and vty_out().

Referenced by vty_out_fsm().

◆ vty_out_fsm_inst()

void vty_out_fsm_inst ( struct vty vty,
struct osmo_fsm_inst fsmi 
)

Print a FSM instance to the given VTY.

Parameters
vtyThe VTY to which to print
[in]fsmiThe FSM instance to print

References vty_out_fsm_inst2().

Referenced by DEFUN().

◆ vty_out_fsm_inst2()

void vty_out_fsm_inst2 ( struct vty vty,
const char *  prefix,
struct osmo_fsm_inst fsmi 
)

Print a FSM instance to the given VTY.

Parameters
vtyThe VTY to which to print
[in]prefixprefix to print at start of each line (typically indenting)
[in]fsmiThe FSM instance to print

References osmo_fsm_inst::child, osmo_fsm_inst::children, osmo_fsm_inst::fsm, osmo_fsm_inst::id, llist_for_each_entry, osmo_fsm_inst::log_level, log_level_str(), osmo_fsm_inst::name, osmo_fsm_event_name(), osmo_fsm_state_name(), osmo_fsm_inst::parent, osmo_fsm_inst::parent_term_event, osmo_fsm_inst::proc, osmo_fsm_inst::state, osmo_fsm_inst::T, VTY_NEWLINE, and vty_out().

Referenced by vty_out_fsm_inst().