}
}
+/*
+ * XPath:
+ * /frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake
+ */
+DEFPY(isis_threeway_adj, isis_threeway_adj_cmd, "[no] isis three-way-handshake",
+ NO_STR
+ "IS-IS commands\n"
+ "Enable/Disable three-way handshake\n")
+{
+ nb_cli_enqueue_change(vty,
+ "./frr-isisd:isis/disable-three-way-handshake",
+ no ? NB_OP_CREATE : NB_OP_DELETE, NULL);
+
+ return nb_cli_apply_changes(vty, NULL);
+}
+
+void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults)
+{
+ vty_out(vty, " no isis three-way-handshake\n");
+}
+
void isis_cli_init(void)
{
install_element(CONFIG_NODE, &router_isis_cmd);
install_element(INTERFACE_NODE, &isis_hello_multiplier_cmd);
install_element(INTERFACE_NODE, &no_isis_hello_multiplier_cmd);
+
+ install_element(INTERFACE_NODE, &isis_threeway_adj_cmd);
}
#endif /* ifndef FABRICD */
bool show_defaults);
void cli_show_ip_isis_hello_multi(struct vty *vty, struct lyd_node *dnode,
bool show_defaults);
+void cli_show_ip_isis_threeway_shake(struct vty *vty, struct lyd_node *dnode,
+ bool show_defaults);
#endif /* ISISD_ISIS_CLI_H_ */
enum nb_event event, const struct lyd_node *dnode,
union nb_resource *resource)
{
- /* TODO: implement me. */
+ struct isis_circuit *circuit;
+
+ if (event != NB_EV_APPLY)
+ return NB_OK;
+
+ circuit = yang_dnode_get_entry(dnode, true);
+ circuit->disable_threeway_adj = true;
+
return NB_OK;
}
static int lib_interface_isis_disable_three_way_handshake_delete(
enum nb_event event, const struct lyd_node *dnode)
{
- /* TODO: implement me. */
+ struct isis_circuit *circuit;
+
+ if (event != NB_EV_APPLY)
+ return NB_OK;
+
+ circuit = yang_dnode_get_entry(dnode, true);
+ circuit->disable_threeway_adj = false;
+
return NB_OK;
}
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/disable-three-way-handshake",
.cbs.create = lib_interface_isis_disable_three_way_handshake_create,
.cbs.delete = lib_interface_isis_disable_three_way_handshake_delete,
+ .cbs.cli_show = cli_show_ip_isis_threeway_shake,
},
{
.xpath = "/frr-interface:lib/interface/frr-isisd:isis/multi-topology/ipv4-unicast",
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",
install_element(INTERFACE_NODE, &isis_priority_level_cmd);
install_element(INTERFACE_NODE, &no_isis_priority_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);