return nb_cli_apply_changes(vty, NULL);
}
+DEFPY (interface_ipv6_mld,
+ interface_ipv6_mld_cmd,
+ "ipv6 mld",
+ IPV6_STR
+ IFACE_MLD_STR)
+{
+ nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY, "true");
+
+ return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
+ "frr-routing:ipv6");
+}
+
+DEFPY (interface_no_ipv6_mld,
+ interface_no_ipv6_mld_cmd,
+ "no ipv6 mld",
+ NO_STR
+ IPV6_STR
+ IFACE_MLD_STR)
+{
+ const struct lyd_node *pim_enable_dnode;
+ char pim_if_xpath[XPATH_MAXLEN + 20];
+
+ snprintf(pim_if_xpath, sizeof(pim_if_xpath),
+ "%s/frr-pim:pim/address-family[address-family='%s']",
+ VTY_CURR_XPATH, "frr-routing:ipv6");
+
+ pim_enable_dnode = yang_dnode_getf(vty->candidate_config->dnode,
+ FRR_PIM_ENABLE_XPATH, VTY_CURR_XPATH,
+ "frr-routing:ipv6");
+ if (!pim_enable_dnode) {
+ nb_cli_enqueue_change(vty, pim_if_xpath, NB_OP_DESTROY, NULL);
+ nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+ } else {
+ if (!yang_dnode_get_bool(pim_enable_dnode, ".")) {
+ nb_cli_enqueue_change(vty, pim_if_xpath, NB_OP_DESTROY,
+ NULL);
+ nb_cli_enqueue_change(vty, ".", NB_OP_DESTROY, NULL);
+ } else
+ nb_cli_enqueue_change(vty, "./enable", NB_OP_MODIFY,
+ "false");
+ }
+
+ return nb_cli_apply_changes(vty, FRR_GMP_INTERFACE_XPATH,
+ "frr-routing:ipv6");
+}
+
void pim_cmd_init(void)
{
if_cmd_init(pim_interface_config_write);
install_element(VRF_NODE, &ipv6_pim_rp_prefix_list_cmd);
install_element(CONFIG_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
install_element(VRF_NODE, &no_ipv6_pim_rp_prefix_list_cmd);
+ install_element(INTERFACE_NODE, &interface_ipv6_mld_cmd);
+ install_element(INTERFACE_NODE, &interface_no_ipv6_mld_cmd);
install_element(INTERFACE_NODE, &interface_ipv6_mld_join_cmd);
install_element(INTERFACE_NODE, &interface_no_ipv6_mld_join_cmd);
}
return false;
}
+#if PIM_IPV == 4
static int pim_cmd_igmp_start(struct interface *ifp)
{
struct pim_interface *pim_ifp;
return NB_OK;
}
+#endif /* PIM_IPV == 4 */
/*
* CLI reconfiguration affects the interface level (struct pim_interface).
int lib_interface_gmp_address_family_enable_modify(
struct nb_cb_modify_args *args)
{
+#if PIM_IPV == 4
struct interface *ifp;
bool igmp_enable;
struct pim_interface *pim_ifp;
pim_if_delete(ifp);
}
}
-
+#else
+ /* TBD Depends on MLD data structure changes */
+#endif /* PIM_IPV == 4 */
return NB_OK;
}
case NB_EV_PREPARE:
case NB_EV_ABORT:
case NB_EV_APPLY:
+ /* TBD depends on MLD data structure changes */
break;
}