]> git.proxmox.com Git - mirror_frr.git/blobdiff - isisd/isis_vty_isisd.c
isisd: retrofit the 'isis hello-padding' command
[mirror_frr.git] / isisd / isis_vty_isisd.c
index fe7e72ba579647465f30ce0138790aa249940c6a..13ae164cc7d024df5dbf2aeaa6a9443d889f1d2a 100644 (file)
@@ -219,174 +219,6 @@ DEFUN (no_isis_priority_level,
        return CMD_SUCCESS;
 }
 
-DEFUN (isis_metric_level,
-       isis_metric_level_cmd,
-       "isis metric (0-16777215) <level-1|level-2>",
-       "IS-IS routing protocol\n"
-       "Set default metric for circuit\n"
-       "Default metric value\n"
-       "Specify metric for level-1 routing\n"
-       "Specify metric for level-2 routing\n")
-{
-       uint32_t met = atoi(argv[2]->arg);
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       CMD_FERR_RETURN(isis_circuit_metric_set(circuit,
-                                               level_for_arg(argv[3]->text),
-                                               met),
-                       "Failed to set metric: $ERR");
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_isis_metric_level,
-       no_isis_metric_level_cmd,
-       "no isis metric [(0-16777215)] <level-1|level-2>",
-       NO_STR
-       "IS-IS routing protocol\n"
-       "Set default metric for circuit\n"
-       "Default metric value\n"
-       "Specify metric for level-1 routing\n"
-       "Specify metric for level-2 routing\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       int level = level_for_arg(argv[argc - 1]->text);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       CMD_FERR_RETURN(isis_circuit_metric_set(circuit, level,
-                                               DEFAULT_CIRCUIT_METRIC),
-                       "Failed to set L1 metric: $ERR");
-       return CMD_SUCCESS;
-}
-
-DEFUN (isis_hello_interval_level,
-       isis_hello_interval_level_cmd,
-       "isis hello-interval (1-600) <level-1|level-2>",
-       "IS-IS routing protocol\n"
-       "Set Hello interval\n"
-       "Holdtime 1 second, interval depends on multiplier\n"
-       "Specify hello-interval for level-1 IIHs\n"
-       "Specify hello-interval for level-2 IIHs\n")
-{
-       uint32_t interval = atoi(argv[2]->arg);
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->hello_interval[level_for_arg(argv[3]->text)] = interval;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_isis_hello_interval_level,
-       no_isis_hello_interval_level_cmd,
-       "no isis hello-interval [(1-600)] <level-1|level-2>",
-       NO_STR
-       "IS-IS routing protocol\n"
-       "Set Hello interval\n"
-       "Holdtime 1 second, interval depends on multiplier\n"
-       "Specify hello-interval for level-1 IIHs\n"
-       "Specify hello-interval for level-2 IIHs\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       int level = level_for_arg(argv[argc - 1]->text);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->hello_interval[level] = DEFAULT_HELLO_INTERVAL;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (isis_hello_multiplier_level,
-       isis_hello_multiplier_level_cmd,
-       "isis hello-multiplier (2-100) <level-1|level-2>",
-       "IS-IS routing protocol\n"
-       "Set multiplier for Hello holding time\n"
-       "Hello multiplier value\n"
-       "Specify hello multiplier for level-1 IIHs\n"
-       "Specify hello multiplier for level-2 IIHs\n")
-{
-       uint16_t mult = atoi(argv[2]->arg);
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->hello_multiplier[level_for_arg(argv[3]->text)] = mult;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_isis_hello_multiplier_level,
-       no_isis_hello_multiplier_level_cmd,
-       "no isis hello-multiplier [(2-100)] <level-1|level-2>",
-       NO_STR
-       "IS-IS routing protocol\n"
-       "Set multiplier for Hello holding time\n"
-       "Hello multiplier value\n"
-       "Specify hello multiplier for level-1 IIHs\n"
-       "Specify hello multiplier for level-2 IIHs\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       int level = level_for_arg(argv[argc - 1]->text);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->hello_multiplier[level] = DEFAULT_HELLO_MULTIPLIER;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (isis_threeway_adj,
-       isis_threeway_adj_cmd,
-       "[no] isis three-way-handshake",
-       NO_STR
-       "IS-IS commands\n"
-       "Enable/Disable three-way handshake\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->disable_threeway_adj = !strcmp(argv[0]->text, "no");
-       return CMD_SUCCESS;
-}
-
-DEFUN (isis_hello_padding,
-       isis_hello_padding_cmd,
-       "isis hello padding",
-       "IS-IS routing protocol\n"
-       "Add padding to IS-IS hello packets\n"
-       "Pad hello packets\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->pad_hellos = 1;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_isis_hello_padding,
-       no_isis_hello_padding_cmd,
-       "no isis hello padding",
-       NO_STR
-       "IS-IS routing protocol\n"
-       "Add padding to IS-IS hello packets\n"
-       "Pad hello packets\n")
-{
-       struct isis_circuit *circuit = isis_circuit_lookup(vty);
-       if (!circuit)
-               return CMD_ERR_NO_MATCH;
-
-       circuit->pad_hellos = 0;
-
-       return CMD_SUCCESS;
-}
-
 DEFUN (csnp_interval_level,
        csnp_interval_level_cmd,
        "isis csnp-interval (1-600) <level-1|level-2>",
@@ -465,66 +297,6 @@ DEFUN (no_psnp_interval_level,
        return CMD_SUCCESS;
 }
 
-DEFUN (max_lsp_lifetime_level,
-       max_lsp_lifetime_level_cmd,
-       "max-lsp-lifetime <level-1|level-2> (350-65535)",
-       "Maximum LSP lifetime\n"
-       "Maximum LSP lifetime for Level 1 only\n"
-       "Maximum LSP lifetime for Level 2 only\n"
-       "LSP lifetime in seconds\n")
-{
-       uint16_t lifetime = atoi(argv[2]->arg);
-
-       return isis_vty_max_lsp_lifetime_set(vty, level_for_arg(argv[1]->text),
-                                            lifetime);
-}
-
-DEFUN (no_max_lsp_lifetime_level,
-       no_max_lsp_lifetime_level_cmd,
-       "no max-lsp-lifetime <level-1|level-2> [(350-65535)]",
-       NO_STR
-       "Maximum LSP lifetime\n"
-       "Maximum LSP lifetime for Level 1 only\n"
-       "Maximum LSP lifetime for Level 2 only\n"
-       "LSP lifetime in seconds\n")
-{
-       return isis_vty_max_lsp_lifetime_set(vty, level_for_arg(argv[1]->text),
-                                            DEFAULT_LSP_LIFETIME);
-}
-
-DEFUN (spf_interval_level,
-       spf_interval_level_cmd,
-       "spf-interval <level-1|level-2> (1-120)",
-       "Minimum interval between SPF calculations\n"
-       "Set interval for level 1 only\n"
-       "Set interval for level 2 only\n"
-       "Minimum interval between consecutive SPFs in seconds\n")
-{
-       VTY_DECLVAR_CONTEXT(isis_area, area);
-       uint16_t interval = atoi(argv[2]->arg);
-
-       area->min_spf_interval[level_for_arg(argv[1]->text)] = interval;
-
-       return CMD_SUCCESS;
-}
-
-DEFUN (no_spf_interval_level,
-       no_spf_interval_level_cmd,
-       "no spf-interval <level-1|level-2> [(1-120)]",
-       NO_STR
-       "Minimum interval between SPF calculations\n"
-       "Set interval for level 1 only\n"
-       "Set interval for level 2 only\n"
-       "Minimum interval between consecutive SPFs in seconds\n")
-{
-       VTY_DECLVAR_CONTEXT(isis_area, area);
-       int level = level_for_arg(argv[1]->text);
-
-       area->min_spf_interval[level] = MINIMUM_SPF_INTERVAL;
-
-       return CMD_SUCCESS;
-}
-
 void isis_vty_daemon_init(void)
 {
        install_element(INTERFACE_NODE, &isis_circuit_type_cmd);
@@ -538,29 +310,9 @@ void isis_vty_daemon_init(void)
        install_element(INTERFACE_NODE, &isis_priority_level_cmd);
        install_element(INTERFACE_NODE, &no_isis_priority_level_cmd);
 
-       install_element(INTERFACE_NODE, &isis_metric_level_cmd);
-       install_element(INTERFACE_NODE, &no_isis_metric_level_cmd);
-
-       install_element(INTERFACE_NODE, &isis_hello_interval_level_cmd);
-       install_element(INTERFACE_NODE, &no_isis_hello_interval_level_cmd);
-
-       install_element(INTERFACE_NODE, &isis_hello_multiplier_level_cmd);
-       install_element(INTERFACE_NODE, &no_isis_hello_multiplier_level_cmd);
-
-       install_element(INTERFACE_NODE, &isis_threeway_adj_cmd);
-
-       install_element(INTERFACE_NODE, &isis_hello_padding_cmd);
-       install_element(INTERFACE_NODE, &no_isis_hello_padding_cmd);
-
        install_element(INTERFACE_NODE, &csnp_interval_level_cmd);
        install_element(INTERFACE_NODE, &no_csnp_interval_level_cmd);
 
        install_element(INTERFACE_NODE, &psnp_interval_level_cmd);
        install_element(INTERFACE_NODE, &no_psnp_interval_level_cmd);
-
-       install_element(ROUTER_NODE, &max_lsp_lifetime_level_cmd);
-       install_element(ROUTER_NODE, &no_max_lsp_lifetime_level_cmd);
-
-       install_element(ROUTER_NODE, &spf_interval_level_cmd);
-       install_element(ROUTER_NODE, &no_spf_interval_level_cmd);
 }