]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_rp.h
lib: enforce vrf_name_to_id by returning default_vrf when name is null
[mirror_frr.git] / pimd / pim_rp.h
index b32228ed49daa5e7df48b408c100089eacc67881..672a69631907c0d12ae4375e2b4d36eca7d8deb7 100644 (file)
  * 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
+ *
+ * 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_RP_H
 #define PIM_RP_H
 
-void pim_rp_init (void);
-void pim_rp_free (void);
+#include <zebra.h>
+#include "prefix.h"
+#include "vty.h"
+#include "plist.h"
+#include "pim_iface.h"
+#include "pim_rpf.h"
+
+struct rp_info {
+       struct prefix group;
+       struct pim_rpf rp;
+       int i_am_rp;
+       char *plist;
+};
+
+void pim_rp_init(struct pim_instance *pim);
+void pim_rp_free(struct pim_instance *pim);
+
+void pim_rp_list_hash_clean(void *data);
 
-int pim_rp_new (const char *rp, const char *group, const char *plist);
-int pim_rp_del (const char *rp, const char *group, const char *plist);
-void pim_rp_prefix_list_update (struct prefix_list *plist);
+int pim_rp_new(struct pim_instance *pim, const char *rp, const char *group,
+              const char *plist);
+int pim_rp_del(struct pim_instance *pim, const char *rp, const char *group,
+              const char *plist);
+void pim_rp_prefix_list_update(struct pim_instance *pim,
+                              struct prefix_list *plist);
 
-int pim_rp_config_write (struct vty *vty);
+int pim_rp_config_write(struct pim_instance *pim, struct vty *vty,
+                       const char *spaces);
 
-int pim_rp_setup (void);
+void pim_rp_setup(struct pim_instance *pim);
 
-int pim_rp_i_am_rp (struct in_addr group);
+int pim_rp_i_am_rp(struct pim_instance *pim, struct in_addr group);
 void pim_rp_check_on_if_add(struct pim_interface *pim_ifp);
-void pim_i_am_rp_re_evaluate(void);
+void pim_i_am_rp_re_evaluate(struct pim_instance *pim);
 
-int pim_rp_check_is_my_ip_address (struct in_addr group, struct in_addr dest_addr);
+int pim_rp_check_is_my_ip_address(struct pim_instance *pim,
+                                 struct in_addr group,
+                                 struct in_addr dest_addr);
 
-int pim_rp_set_upstream_addr (struct in_addr *up, struct in_addr source, struct in_addr group);
+int pim_rp_set_upstream_addr(struct pim_instance *pim, struct in_addr *up,
+                            struct in_addr source, struct in_addr group);
 
-struct pim_rpf *pim_rp_g (struct in_addr group);
+struct pim_rpf *pim_rp_g(struct pim_instance *pim, struct in_addr group);
 
-#define I_am_RP(G)  pim_rp_i_am_rp ((G))
-#define RP(G)       pim_rp_g ((G))
+#define I_am_RP(P, G)  pim_rp_i_am_rp ((P), (G))
+#define RP(P, G)       pim_rp_g ((P), (G))
 
-void pim_rp_show_information (struct vty *vty, u_char uj);
+void pim_rp_show_information(struct pim_instance *pim, struct vty *vty,
+                            bool uj);
+void pim_resolve_rp_nh(struct pim_instance *pim);
+int pim_rp_list_cmp(void *v1, void *v2);
 #endif