mirror of https://gerrit.osmocom.org/libosmocore
vty: use install_lib_element() and install_lib_element_ve()
See https://lists.osmocom.org/pipermail/openbsc/2020-October/013278.html. Change-Id: Ic541126ffd4975daf87199abfafb465e2055e44f Related: SYS#4937
This commit is contained in:
parent
99d5c2d721
commit
8e7c49649e
|
@ -82,10 +82,10 @@ static int config_write_ctrl(struct vty *vty)
|
|||
int ctrl_vty_init(void *ctx)
|
||||
{
|
||||
ctrl_vty_ctx = ctx;
|
||||
install_element(CONFIG_NODE, &cfg_ctrl_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_ctrl_cmd);
|
||||
install_node(&ctrl_node, config_write_ctrl);
|
||||
|
||||
install_element(L_CTRL_NODE, &cfg_ctrl_bind_addr_cmd);
|
||||
install_lib_element(L_CTRL_NODE, &cfg_ctrl_bind_addr_cmd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -207,15 +207,15 @@ DEFUN(logging_fltr_bvc,
|
|||
|
||||
int bssgp_vty_init(void)
|
||||
{
|
||||
install_element_ve(&show_bssgp_cmd);
|
||||
install_element_ve(&show_bssgp_stats_cmd);
|
||||
install_element_ve(&show_bvc_cmd);
|
||||
install_element_ve(&logging_fltr_bvc_cmd);
|
||||
install_element_ve(&bvc_reset_cmd);
|
||||
install_lib_element_ve(&show_bssgp_cmd);
|
||||
install_lib_element_ve(&show_bssgp_stats_cmd);
|
||||
install_lib_element_ve(&show_bvc_cmd);
|
||||
install_lib_element_ve(&logging_fltr_bvc_cmd);
|
||||
install_lib_element_ve(&bvc_reset_cmd);
|
||||
|
||||
install_element(CFG_LOG_NODE, &logging_fltr_bvc_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_fltr_bvc_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_bssgp_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_bssgp_cmd);
|
||||
install_node(&bssgp_node, config_write_bssgp);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -724,30 +724,30 @@ int gprs_ns2_vty_init(struct gprs_ns2_inst *nsi, struct osmo_sockaddr_str *defau
|
|||
return 0;
|
||||
vty_elements_installed = true;
|
||||
|
||||
install_element_ve(&show_ns_cmd);
|
||||
install_element_ve(&show_ns_stats_cmd);
|
||||
install_element_ve(&show_ns_pers_cmd);
|
||||
install_element_ve(&show_nse_cmd);
|
||||
install_element_ve(&logging_fltr_nsvc_cmd);
|
||||
install_lib_element_ve(&show_ns_cmd);
|
||||
install_lib_element_ve(&show_ns_stats_cmd);
|
||||
install_lib_element_ve(&show_ns_pers_cmd);
|
||||
install_lib_element_ve(&show_nse_cmd);
|
||||
install_lib_element_ve(&logging_fltr_nsvc_cmd);
|
||||
|
||||
install_element(CFG_LOG_NODE, &logging_fltr_nsvc_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_fltr_nsvc_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_ns_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_ns_cmd);
|
||||
install_node(&ns_node, config_write_ns);
|
||||
install_element(L_NS_NODE, &cfg_nse_nsvci_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoteip_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoteport_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_fr_dlci_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_encaps_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoterole_cmd);
|
||||
install_element(L_NS_NODE, &cfg_no_nse_cmd);
|
||||
install_element(L_NS_NODE, &cfg_ns_timer_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_local_ip_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_local_port_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_dscp_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_res_block_unblock_cmd);
|
||||
install_element(L_NS_NODE, &cfg_frgre_enable_cmd);
|
||||
install_element(L_NS_NODE, &cfg_frgre_local_ip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_nsvci_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoteip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoteport_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_fr_dlci_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_encaps_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoterole_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_no_nse_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_ns_timer_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_local_ip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_local_port_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_dscp_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_res_block_unblock_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_frgre_enable_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_frgre_local_ip_cmd);
|
||||
|
||||
/* TODO: nsvc/nsei command to reset states or reset/block/unblock nsei/nsvcs */
|
||||
|
||||
|
|
|
@ -644,32 +644,32 @@ int gprs_ns_vty_init(struct gprs_ns_inst *nsi)
|
|||
return 0;
|
||||
vty_elements_installed = true;
|
||||
|
||||
install_element_ve(&show_ns_cmd);
|
||||
install_element_ve(&show_ns_stats_cmd);
|
||||
install_element_ve(&show_ns_pers_cmd);
|
||||
install_element_ve(&show_nse_cmd);
|
||||
install_element_ve(&logging_fltr_nsvc_cmd);
|
||||
install_lib_element_ve(&show_ns_cmd);
|
||||
install_lib_element_ve(&show_ns_stats_cmd);
|
||||
install_lib_element_ve(&show_ns_pers_cmd);
|
||||
install_lib_element_ve(&show_nse_cmd);
|
||||
install_lib_element_ve(&logging_fltr_nsvc_cmd);
|
||||
|
||||
install_element(CFG_LOG_NODE, &logging_fltr_nsvc_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_fltr_nsvc_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_ns_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_ns_cmd);
|
||||
install_node(&ns_node, config_write_ns);
|
||||
install_element(L_NS_NODE, &cfg_nse_nsvci_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoteip_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoteport_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_fr_dlci_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_encaps_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nse_remoterole_cmd);
|
||||
install_element(L_NS_NODE, &cfg_no_nse_cmd);
|
||||
install_element(L_NS_NODE, &cfg_ns_timer_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_local_ip_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_local_port_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_dscp_cmd);
|
||||
install_element(L_NS_NODE, &cfg_nsip_res_block_unblock_cmd);
|
||||
install_element(L_NS_NODE, &cfg_frgre_enable_cmd);
|
||||
install_element(L_NS_NODE, &cfg_frgre_local_ip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_nsvci_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoteip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoteport_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_fr_dlci_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_encaps_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nse_remoterole_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_no_nse_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_ns_timer_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_local_ip_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_local_port_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_dscp_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_nsip_res_block_unblock_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_frgre_enable_cmd);
|
||||
install_lib_element(L_NS_NODE, &cfg_frgre_local_ip_cmd);
|
||||
|
||||
install_element(ENABLE_NODE, &nsvc_nsei_cmd);
|
||||
install_lib_element(ENABLE_NODE, &nsvc_nsei_cmd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -3903,20 +3903,20 @@ void vty_install_default(int node)
|
|||
/*! Install common commands like 'exit' and 'list'. */
|
||||
static void install_basic_node_commands(int node)
|
||||
{
|
||||
install_element(node, &config_help_cmd);
|
||||
install_element(node, &config_list_cmd);
|
||||
install_lib_element(node, &config_help_cmd);
|
||||
install_lib_element(node, &config_list_cmd);
|
||||
|
||||
install_element(node, &config_write_terminal_cmd);
|
||||
install_element(node, &config_write_file_cmd);
|
||||
install_element(node, &config_write_memory_cmd);
|
||||
install_element(node, &config_write_cmd);
|
||||
install_element(node, &show_running_config_cmd);
|
||||
install_lib_element(node, &config_write_terminal_cmd);
|
||||
install_lib_element(node, &config_write_file_cmd);
|
||||
install_lib_element(node, &config_write_memory_cmd);
|
||||
install_lib_element(node, &config_write_cmd);
|
||||
install_lib_element(node, &show_running_config_cmd);
|
||||
|
||||
install_element(node, &config_exit_cmd);
|
||||
install_lib_element(node, &config_exit_cmd);
|
||||
|
||||
if (node >= CONFIG_NODE) {
|
||||
/* It's not a top node. */
|
||||
install_element(node, &config_end_cmd);
|
||||
install_lib_element(node, &config_end_cmd);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4003,52 +4003,52 @@ void cmd_init(int terminal)
|
|||
install_node(&config_node, config_write_host);
|
||||
|
||||
/* Each node's basic commands. */
|
||||
install_element(VIEW_NODE, &show_version_cmd);
|
||||
install_element(VIEW_NODE, &show_online_help_cmd);
|
||||
install_lib_element(VIEW_NODE, &show_version_cmd);
|
||||
install_lib_element(VIEW_NODE, &show_online_help_cmd);
|
||||
if (terminal) {
|
||||
install_element(VIEW_NODE, &config_list_cmd);
|
||||
install_element(VIEW_NODE, &config_exit_cmd);
|
||||
install_element(VIEW_NODE, &config_help_cmd);
|
||||
install_element(VIEW_NODE, &config_enable_cmd);
|
||||
install_element(VIEW_NODE, &config_terminal_length_cmd);
|
||||
install_element(VIEW_NODE, &config_terminal_no_length_cmd);
|
||||
install_element(VIEW_NODE, &echo_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_list_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_exit_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_help_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_enable_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_terminal_length_cmd);
|
||||
install_lib_element(VIEW_NODE, &config_terminal_no_length_cmd);
|
||||
install_lib_element(VIEW_NODE, &echo_cmd);
|
||||
}
|
||||
|
||||
if (terminal) {
|
||||
install_element(ENABLE_NODE, &config_disable_cmd);
|
||||
install_element(ENABLE_NODE, &config_terminal_cmd);
|
||||
install_element (ENABLE_NODE, ©_runningconfig_startupconfig_cmd);
|
||||
install_lib_element(ENABLE_NODE, &config_disable_cmd);
|
||||
install_lib_element(ENABLE_NODE, &config_terminal_cmd);
|
||||
install_lib_element(ENABLE_NODE, ©_runningconfig_startupconfig_cmd);
|
||||
}
|
||||
install_element (ENABLE_NODE, &show_startup_config_cmd);
|
||||
install_element(ENABLE_NODE, &show_version_cmd);
|
||||
install_element(ENABLE_NODE, &show_online_help_cmd);
|
||||
install_lib_element(ENABLE_NODE, &show_startup_config_cmd);
|
||||
install_lib_element(ENABLE_NODE, &show_version_cmd);
|
||||
install_lib_element(ENABLE_NODE, &show_online_help_cmd);
|
||||
|
||||
if (terminal) {
|
||||
install_element(ENABLE_NODE, &config_terminal_length_cmd);
|
||||
install_element(ENABLE_NODE, &config_terminal_no_length_cmd);
|
||||
install_element(ENABLE_NODE, &echo_cmd);
|
||||
install_lib_element(ENABLE_NODE, &config_terminal_length_cmd);
|
||||
install_lib_element(ENABLE_NODE, &config_terminal_no_length_cmd);
|
||||
install_lib_element(ENABLE_NODE, &echo_cmd);
|
||||
}
|
||||
|
||||
install_element(CONFIG_NODE, &hostname_cmd);
|
||||
install_element(CONFIG_NODE, &no_hostname_cmd);
|
||||
install_lib_element(CONFIG_NODE, &hostname_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_hostname_cmd);
|
||||
|
||||
if (terminal) {
|
||||
install_element(CONFIG_NODE, &password_cmd);
|
||||
install_element(CONFIG_NODE, &password_text_cmd);
|
||||
install_element(CONFIG_NODE, &enable_password_cmd);
|
||||
install_element(CONFIG_NODE, &enable_password_text_cmd);
|
||||
install_element(CONFIG_NODE, &no_enable_password_cmd);
|
||||
install_lib_element(CONFIG_NODE, &password_cmd);
|
||||
install_lib_element(CONFIG_NODE, &password_text_cmd);
|
||||
install_lib_element(CONFIG_NODE, &enable_password_cmd);
|
||||
install_lib_element(CONFIG_NODE, &enable_password_text_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_enable_password_cmd);
|
||||
|
||||
#ifdef VTY_CRYPT_PW
|
||||
install_element(CONFIG_NODE, &service_password_encrypt_cmd);
|
||||
install_element(CONFIG_NODE, &no_service_password_encrypt_cmd);
|
||||
install_lib_element(CONFIG_NODE, &service_password_encrypt_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_service_password_encrypt_cmd);
|
||||
#endif
|
||||
install_element(CONFIG_NODE, &banner_motd_default_cmd);
|
||||
install_element(CONFIG_NODE, &banner_motd_file_cmd);
|
||||
install_element(CONFIG_NODE, &no_banner_motd_cmd);
|
||||
install_element(CONFIG_NODE, &service_terminal_length_cmd);
|
||||
install_element(CONFIG_NODE, &no_service_terminal_length_cmd);
|
||||
install_lib_element(CONFIG_NODE, &banner_motd_default_cmd);
|
||||
install_lib_element(CONFIG_NODE, &banner_motd_file_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_banner_motd_cmd);
|
||||
install_lib_element(CONFIG_NODE, &service_terminal_length_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_service_terminal_length_cmd);
|
||||
|
||||
}
|
||||
srand(time(NULL));
|
||||
|
|
|
@ -604,13 +604,13 @@ int osmo_cpu_sched_vty_init(void *tall_ctx)
|
|||
INIT_LLIST_HEAD(&sched_vty_opts->cpu_affinity_li);
|
||||
pthread_mutex_init(&sched_vty_opts->cpu_affinity_li_mutex, NULL);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_sched_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_sched_cmd);
|
||||
install_node(&sched_node, config_write_sched);
|
||||
|
||||
install_element(L_CPU_SCHED_NODE, &cfg_sched_policy_cmd);
|
||||
install_element(L_CPU_SCHED_NODE, &cfg_sched_cpu_affinity_cmd);
|
||||
install_lib_element(L_CPU_SCHED_NODE, &cfg_sched_policy_cmd);
|
||||
install_lib_element(L_CPU_SCHED_NODE, &cfg_sched_cpu_affinity_cmd);
|
||||
|
||||
install_element_ve(&show_sched_threads_cmd);
|
||||
install_lib_element_ve(&show_sched_threads_cmd);
|
||||
|
||||
/* Initialize amount of cpus now */
|
||||
if (get_num_cpus() < 0)
|
||||
|
|
|
@ -196,9 +196,9 @@ void osmo_fsm_vty_add_cmds(void)
|
|||
if (osmo_fsm_vty_cmds_installed)
|
||||
return;
|
||||
|
||||
install_element_ve(&show_fsm_cmd);
|
||||
install_element_ve(&show_fsms_cmd);
|
||||
install_element_ve(&show_fsm_inst_cmd);
|
||||
install_element_ve(&show_fsm_insts_cmd);
|
||||
install_lib_element_ve(&show_fsm_cmd);
|
||||
install_lib_element_ve(&show_fsms_cmd);
|
||||
install_lib_element_ve(&show_fsm_inst_cmd);
|
||||
install_lib_element_ve(&show_fsm_insts_cmd);
|
||||
osmo_fsm_vty_cmds_installed = true;
|
||||
}
|
||||
|
|
|
@ -1016,7 +1016,7 @@ void logging_vty_add_deprecated_subsys(void *ctx, const char *name)
|
|||
"Deprecated Category\n";
|
||||
cmd->attr = CMD_ATTR_DEPRECATED;
|
||||
|
||||
install_element(CFG_LOG_NODE, cmd);
|
||||
install_lib_element(CFG_LOG_NODE, cmd);
|
||||
}
|
||||
|
||||
/* logp (<categories>) (debug|...|fatal) .LOGMESSAGE*/
|
||||
|
@ -1064,18 +1064,18 @@ static void gen_vty_logp_cmd_strs(struct cmd_element *cmd)
|
|||
* your application if you want to support those commands. */
|
||||
void logging_vty_add_cmds()
|
||||
{
|
||||
install_element_ve(&enable_logging_cmd);
|
||||
install_element_ve(&disable_logging_cmd);
|
||||
install_element_ve(&logging_fltr_all_cmd);
|
||||
install_element_ve(&logging_use_clr_cmd);
|
||||
install_element_ve(&logging_prnt_timestamp_cmd);
|
||||
install_element_ve(&logging_prnt_ext_timestamp_cmd);
|
||||
install_element_ve(&logging_prnt_cat_cmd);
|
||||
install_element_ve(&logging_prnt_cat_hex_cmd);
|
||||
install_element_ve(&logging_prnt_level_cmd);
|
||||
install_element_ve(&logging_prnt_file_cmd);
|
||||
install_element_ve(&logging_set_category_mask_cmd);
|
||||
install_element_ve(&logging_set_category_mask_old_cmd);
|
||||
install_lib_element_ve(&enable_logging_cmd);
|
||||
install_lib_element_ve(&disable_logging_cmd);
|
||||
install_lib_element_ve(&logging_fltr_all_cmd);
|
||||
install_lib_element_ve(&logging_use_clr_cmd);
|
||||
install_lib_element_ve(&logging_prnt_timestamp_cmd);
|
||||
install_lib_element_ve(&logging_prnt_ext_timestamp_cmd);
|
||||
install_lib_element_ve(&logging_prnt_cat_cmd);
|
||||
install_lib_element_ve(&logging_prnt_cat_hex_cmd);
|
||||
install_lib_element_ve(&logging_prnt_level_cmd);
|
||||
install_lib_element_ve(&logging_prnt_file_cmd);
|
||||
install_lib_element_ve(&logging_set_category_mask_cmd);
|
||||
install_lib_element_ve(&logging_set_category_mask_old_cmd);
|
||||
|
||||
/* logging level (<categories>) (debug|...|fatal) */
|
||||
gen_logging_level_cmd_strs(&logging_level_cmd,
|
||||
|
@ -1085,47 +1085,47 @@ void logging_vty_add_cmds()
|
|||
gen_logging_level_cmd_strs(&deprecated_logging_level_everything_cmd,
|
||||
"everything", EVERYTHING_STR);
|
||||
|
||||
install_element_ve(&logging_level_cmd);
|
||||
install_element_ve(&logging_level_set_all_cmd);
|
||||
install_element_ve(&logging_level_force_all_cmd);
|
||||
install_element_ve(&no_logging_level_force_all_cmd);
|
||||
install_element_ve(&deprecated_logging_level_everything_cmd);
|
||||
install_element_ve(&deprecated_logging_level_all_cmd);
|
||||
install_element_ve(&deprecated_logging_level_all_everything_cmd);
|
||||
install_lib_element_ve(&logging_level_cmd);
|
||||
install_lib_element_ve(&logging_level_set_all_cmd);
|
||||
install_lib_element_ve(&logging_level_force_all_cmd);
|
||||
install_lib_element_ve(&no_logging_level_force_all_cmd);
|
||||
install_lib_element_ve(&deprecated_logging_level_everything_cmd);
|
||||
install_lib_element_ve(&deprecated_logging_level_all_cmd);
|
||||
install_lib_element_ve(&deprecated_logging_level_all_everything_cmd);
|
||||
|
||||
gen_vty_logp_cmd_strs(&vty_logp_cmd);
|
||||
install_element_ve(&vty_logp_cmd);
|
||||
install_lib_element_ve(&vty_logp_cmd);
|
||||
|
||||
install_element_ve(&show_logging_vty_cmd);
|
||||
install_element_ve(&show_alarms_cmd);
|
||||
install_lib_element_ve(&show_logging_vty_cmd);
|
||||
install_lib_element_ve(&show_alarms_cmd);
|
||||
|
||||
install_node(&cfg_log_node, config_write_log);
|
||||
install_element(CFG_LOG_NODE, &logging_fltr_all_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_use_clr_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_timestamp_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_ext_timestamp_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_cat_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_cat_hex_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_level_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_prnt_file_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_level_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_level_set_all_cmd);
|
||||
install_element(CFG_LOG_NODE, &logging_level_force_all_cmd);
|
||||
install_element(CFG_LOG_NODE, &no_logging_level_force_all_cmd);
|
||||
install_element(CFG_LOG_NODE, &deprecated_logging_level_everything_cmd);
|
||||
install_element(CFG_LOG_NODE, &deprecated_logging_level_all_cmd);
|
||||
install_element(CFG_LOG_NODE, &deprecated_logging_level_all_everything_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_fltr_all_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_use_clr_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_timestamp_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_ext_timestamp_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_cat_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_cat_hex_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_level_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_prnt_file_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_level_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_level_set_all_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &logging_level_force_all_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &no_logging_level_force_all_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &deprecated_logging_level_everything_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &deprecated_logging_level_all_cmd);
|
||||
install_lib_element(CFG_LOG_NODE, &deprecated_logging_level_all_everything_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_log_stderr_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_log_stderr_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_log_file_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_log_file_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_log_alarms_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_log_alarms_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_stderr_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_log_stderr_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_file_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_log_file_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_alarms_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_log_alarms_cmd);
|
||||
#ifdef HAVE_SYSLOG_H
|
||||
install_element(CONFIG_NODE, &cfg_log_syslog_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_log_syslog_local_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_log_syslog_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_syslog_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_syslog_local_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_log_syslog_cmd);
|
||||
#endif
|
||||
install_element(CONFIG_NODE, &cfg_log_gsmtap_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_log_gsmtap_cmd);
|
||||
}
|
||||
|
|
|
@ -673,33 +673,33 @@ static int config_write_stats(struct vty *vty)
|
|||
*/
|
||||
void osmo_stats_vty_add_cmds()
|
||||
{
|
||||
install_element_ve(&show_stats_cmd);
|
||||
install_element_ve(&show_stats_level_cmd);
|
||||
install_lib_element_ve(&show_stats_cmd);
|
||||
install_lib_element_ve(&show_stats_level_cmd);
|
||||
|
||||
install_element(CONFIG_NODE, &cfg_stats_reporter_statsd_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_stats_reporter_statsd_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_stats_reporter_log_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_no_stats_reporter_log_cmd);
|
||||
install_element(CONFIG_NODE, &cfg_stats_interval_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_stats_reporter_statsd_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_stats_reporter_statsd_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_stats_reporter_log_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_no_stats_reporter_log_cmd);
|
||||
install_lib_element(CONFIG_NODE, &cfg_stats_interval_cmd);
|
||||
|
||||
install_node(&cfg_stats_node, config_write_stats);
|
||||
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_local_ip_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_local_ip_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_ip_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_port_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_mtu_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_mtu_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_prefix_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_no_stats_reporter_prefix_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_level_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_enable_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_disable_cmd);
|
||||
install_element(CFG_STATS_NODE, &cfg_stats_reporter_flush_period_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_local_ip_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_no_stats_reporter_local_ip_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_ip_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_remote_port_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_mtu_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_no_stats_reporter_mtu_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_prefix_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_no_stats_reporter_prefix_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_level_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_enable_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_disable_cmd);
|
||||
install_lib_element(CFG_STATS_NODE, &cfg_stats_reporter_flush_period_cmd);
|
||||
|
||||
install_element_ve(&show_stats_asciidoc_table_cmd);
|
||||
install_element_ve(&show_rate_counters_cmd);
|
||||
install_lib_element_ve(&show_stats_asciidoc_table_cmd);
|
||||
install_lib_element_ve(&show_rate_counters_cmd);
|
||||
|
||||
install_element(ENABLE_NODE, &stats_report_cmd);
|
||||
install_element(ENABLE_NODE, &stats_reset_cmd);
|
||||
install_lib_element(ENABLE_NODE, &stats_report_cmd);
|
||||
install_lib_element(ENABLE_NODE, &stats_reset_cmd);
|
||||
}
|
||||
|
|
|
@ -247,7 +247,7 @@ DEFUN(show_talloc_ctx_tree, show_talloc_ctx_tree_cmd,
|
|||
*/
|
||||
void osmo_talloc_vty_add_cmds(void)
|
||||
{
|
||||
install_element_ve(&show_talloc_ctx_cmd);
|
||||
install_element_ve(&show_talloc_ctx_tree_cmd);
|
||||
install_element_ve(&show_talloc_ctx_filter_cmd);
|
||||
install_lib_element_ve(&show_talloc_ctx_cmd);
|
||||
install_lib_element_ve(&show_talloc_ctx_tree_cmd);
|
||||
install_lib_element_ve(&show_talloc_ctx_filter_cmd);
|
||||
}
|
||||
|
|
|
@ -379,8 +379,8 @@ void osmo_tdef_vty_groups_init(unsigned int parent_cfg_node, struct osmo_tdef_gr
|
|||
cfg_timer_cmd.string = timer_command_string("timer", OSMO_TDEF_VTY_ARG_SET_OPTIONAL);
|
||||
cfg_timer_cmd.doc = timer_doc_string("Configure or show timers\n", OSMO_TDEF_VTY_DOC_SET);
|
||||
|
||||
install_element_ve(&show_timer_cmd);
|
||||
install_element(parent_cfg_node, &cfg_timer_cmd);
|
||||
install_lib_element_ve(&show_timer_cmd);
|
||||
install_lib_element(parent_cfg_node, &cfg_timer_cmd);
|
||||
}
|
||||
|
||||
/*! Write the global osmo_tdef_group configuration to VTY, as previously passed to osmo_tdef_vty_groups_init().
|
||||
|
|
|
@ -1834,18 +1834,18 @@ void vty_init(struct vty_app_info *app_info)
|
|||
/* Install bgp top node. */
|
||||
install_node(&vty_node, vty_config_write);
|
||||
|
||||
install_element_ve(&config_who_cmd);
|
||||
install_element_ve(&show_history_cmd);
|
||||
install_element(CONFIG_NODE, &line_vty_cmd);
|
||||
install_element(CONFIG_NODE, &service_advanced_vty_cmd);
|
||||
install_element(CONFIG_NODE, &no_service_advanced_vty_cmd);
|
||||
install_element(CONFIG_NODE, &show_history_cmd);
|
||||
install_element(ENABLE_NODE, &terminal_monitor_cmd);
|
||||
install_element(ENABLE_NODE, &terminal_no_monitor_cmd);
|
||||
install_lib_element_ve(&config_who_cmd);
|
||||
install_lib_element_ve(&show_history_cmd);
|
||||
install_lib_element(CONFIG_NODE, &line_vty_cmd);
|
||||
install_lib_element(CONFIG_NODE, &service_advanced_vty_cmd);
|
||||
install_lib_element(CONFIG_NODE, &no_service_advanced_vty_cmd);
|
||||
install_lib_element(CONFIG_NODE, &show_history_cmd);
|
||||
install_lib_element(ENABLE_NODE, &terminal_monitor_cmd);
|
||||
install_lib_element(ENABLE_NODE, &terminal_no_monitor_cmd);
|
||||
|
||||
install_element(VTY_NODE, &vty_login_cmd);
|
||||
install_element(VTY_NODE, &no_vty_login_cmd);
|
||||
install_element(VTY_NODE, &vty_bind_cmd);
|
||||
install_lib_element(VTY_NODE, &vty_login_cmd);
|
||||
install_lib_element(VTY_NODE, &no_vty_login_cmd);
|
||||
install_lib_element(VTY_NODE, &vty_bind_cmd);
|
||||
}
|
||||
|
||||
/*! Read the configuration file using the VTY code
|
||||
|
|
Loading…
Reference in New Issue