diff options
Diffstat (limited to 'lib/if.c')
| -rw-r--r-- | lib/if.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1349,10 +1349,20 @@ static const struct cmd_variable_handler if_var_handlers[] = { {.tokenname = "INTERFACE", .completions = if_autocomplete}, {.completions = NULL}}; -void if_cmd_init(void) +static struct cmd_node interface_node = { + .name = "interface", + .node = INTERFACE_NODE, + .parent_node = CONFIG_NODE, + .prompt = "%s(config-if)# ", +}; + +void if_cmd_init(int (*config_write)(struct vty *)) { cmd_variable_handler_register(if_var_handlers); + interface_node.config_write = config_write; + install_node(&interface_node); + install_element(CONFIG_NODE, &interface_cmd); install_element(CONFIG_NODE, &no_interface_cmd); |
