+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* PIM for IPv6 FRR
* Copyright (C) 2022 Vmware, Inc.
* Mobashshera Rasool <mrasool@vmware.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; see the file COPYING; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef PIM_CMD_COMMON_H
#define PIM_CMD_COMMON_H
struct pim_upstream;
struct pim_instance;
-/* duplicated from pim_instance.h - needed to avoid dependency mess */
-struct pim_instance *pim_get_pim_instance(vrf_id_t vrf_id);
-
const char *pim_cli_get_vrf_name(struct vty *vty);
int pim_process_join_prune_cmd(struct vty *vty, const char *jpi_str);
int pim_process_no_join_prune_cmd(struct vty *vty);
const char *group_str, const char *source_str);
int pim_process_no_ip_mroute_cmd(struct vty *vty, const char *interface,
const char *group_str, const char *src_str);
+int pim_process_bsm_cmd(struct vty *vty);
+int pim_process_no_bsm_cmd(struct vty *vty);
+int pim_process_unicast_bsm_cmd(struct vty *vty);
+int pim_process_no_unicast_bsm_cmd(struct vty *vty);
void json_object_pim_upstream_add(json_object *json, struct pim_upstream *up);
void pim_show_rpf(struct pim_instance *pim, struct vty *vty, json_object *json);
void pim_show_neighbors_secondary(struct pim_instance *pim, struct vty *vty);
bool uj);
int pim_show_nexthop_lookup_cmd_helper(const char *vrf, struct vty *vty,
pim_addr source, pim_addr group);
-int pim_show_nexthop_cmd_helper(const char *vrf, struct vty *vty);
-void pim_show_nexthop(struct pim_instance *pim, struct vty *vty);
+int pim_show_nexthop_cmd_helper(const char *vrf, struct vty *vty, bool uj);
+void pim_show_nexthop(struct pim_instance *pim, struct vty *vty, bool uj);
int pim_show_neighbors_cmd_helper(const char *vrf, struct vty *vty,
const char *json, const char *interface);
int pim_show_neighbors_vrf_all_cmd_helper(struct vty *vty, const char *json,
const char *neighbor, json_object *json);
void pim_show_neighbors(struct pim_instance *pim, struct vty *vty,
json_object *json);
+int pim_show_group_rp_mappings_info_helper(const char *vrf, struct vty *vty,
+ bool uj);
+int pim_show_bsm_db_helper(const char *vrf, struct vty *vty, bool uj);
int gm_process_query_max_response_time_cmd(struct vty *vty,
const char *qmrt_str);
int gm_process_no_query_max_response_time_cmd(struct vty *vty);
struct vrf *pim_cmd_lookup(struct vty *vty, const char *name);
void clear_mroute(struct pim_instance *pim);
void clear_pim_statistics(struct pim_instance *pim);
+int clear_pim_interface_traffic(const char *vrf, struct vty *vty);
int pim_debug_pim_cmd(void);
int pim_no_debug_pim_cmd(void);
int pim_debug_pim_packets_cmd(const char *hello, const char *joins,
const char *registers, struct vty *vty);
int pim_no_debug_pim_packets_cmd(const char *hello, const char *joins,
const char *registers, struct vty *vty);
+int pim_show_rpf_helper(const char *vrf, struct vty *vty, bool json);
+int pim_show_rpf_vrf_all_helper(struct vty *vty, bool json);
+int pim_show_rp_helper(const char *vrf, struct vty *vty, const char *group_str,
+ const struct prefix *group, bool json);
+int pim_show_rp_vrf_all_helper(struct vty *vty, const char *group_str,
+ const struct prefix *group, bool json);
+int pim_show_secondary_helper(const char *vrf, struct vty *vty);
+int pim_show_statistics_helper(const char *vrf, struct vty *vty,
+ const char *word, bool uj);
+int pim_show_upstream_helper(const char *vrf, struct vty *vty, pim_addr s_or_g,
+ pim_addr g, bool json);
+int pim_show_upstream_vrf_all_helper(struct vty *vty, bool json);
+int pim_show_upstream_join_desired_helper(const char *vrf, struct vty *vty,
+ bool uj);
+int pim_show_upstream_rpf_helper(const char *vrf, struct vty *vty, bool uj);
+int pim_show_state_helper(const char *vrf, struct vty *vty,
+ const char *s_or_g_str, const char *g_str, bool json);
+int pim_show_state_vrf_all_helper(struct vty *vty, const char *s_or_g_str,
+ const char *g_str, bool json);
+int pim_show_multicast_helper(const char *vrf, struct vty *vty);
+int pim_show_multicast_vrf_all_helper(struct vty *vty);
+int pim_show_multicast_count_helper(const char *vrf, struct vty *vty,
+ bool json);
+int pim_show_multicast_count_vrf_all_helper(struct vty *vty, bool json);
+int pim_show_mroute_helper(const char *vrf, struct vty *vty, pim_addr s_or_g,
+ pim_addr g, bool fill, bool json);
+int pim_show_mroute_vrf_all_helper(struct vty *vty, bool fill, bool json);
+int pim_show_mroute_count_helper(const char *vrf, struct vty *vty, bool json);
+int pim_show_mroute_count_vrf_all_helper(struct vty *vty, bool json);
+int pim_show_mroute_summary_helper(const char *vrf, struct vty *vty, bool json);
+int pim_show_mroute_summary_vrf_all_helper(struct vty *vty, bool json);
+void pim_show_interface_traffic_single(struct pim_instance *pim,
+ struct vty *vty, const char *ifname,
+ bool uj);
+void pim_show_interface_traffic(struct pim_instance *pim, struct vty *vty,
+ bool uj);
+int pim_show_interface_traffic_helper(const char *vrf, const char *if_name,
+ struct vty *vty, bool uj);
+void clear_pim_interfaces(struct pim_instance *pim);
+void pim_show_bsr(struct pim_instance *pim, struct vty *vty, bool uj);
+int pim_show_bsr_helper(const char *vrf, struct vty *vty, bool uj);
/*
* Special Macro to allow us to get the correct pim_instance;
*/