]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Add code to get RP(G)
authorDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 2 Oct 2015 17:34:11 +0000 (10:34 -0700)
committerDonald Sharp <sharpd@cumulusnetwroks.com>
Thu, 26 May 2016 00:38:34 +0000 (20:38 -0400)
Add code to figure out who the RP is for group G.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_rp.c
pimd/pim_rp.h

index 506b60eabb7d4df17287a91effeea0e24f141e16..eaafa46ae82a5ef225f9ca9b618a99516c0840d2 100644 (file)
@@ -73,6 +73,20 @@ pim_rp_i_am_rp (struct in_addr group)
   return i_am_rp;
 }
 
+/*
+ * RP(G)
+ *
+ * Return the RP that the Group belongs too.
+ */
+struct in_addr
+pim_rp_g (struct in_addr group)
+{
+  /*
+   * For staticly configured RP, it is always the qpim_rp
+   */
+  return(qpim_rp);
+}
+
 /*
  * Set the upstream IP address we want to talk to based upon
  * the rp configured and the source address
index 4639e7cebfc6563550d805fd1d0dc54bb1d3b047..3938e7251c5258cd3993453d20e7330f6b5f1937 100644 (file)
@@ -24,5 +24,8 @@
 void pim_rp_check_rp (struct in_addr old, struct in_addr new);
 int pim_rp_i_am_rp (struct in_addr group);
 int pim_rp_set_upstream_addr (struct in_addr *up, struct in_addr source);
+struct in_addr pim_rp_g (struct in_addr group);
 
+#define I_am_RP(G)  pim_rp_i_am_rp ((G))
+#define RP(G)       pim_rp_g ((G))
 #endif