From: Donald Sharp Date: Fri, 2 Oct 2015 17:34:11 +0000 (-0700) Subject: pimd: Add code to get RP(G) X-Git-Tag: frr-2.0-rc1~833 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=716940576443004c2a6dd14276bc28b438a371e0;p=matthieu%2Ffrr.git pimd: Add code to get RP(G) Add code to figure out who the RP is for group G. Signed-off-by: Donald Sharp --- diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 506b60eabb..eaafa46ae8 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -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 diff --git a/pimd/pim_rp.h b/pimd/pim_rp.h index 4639e7cebf..3938e7251c 100644 --- a/pimd/pim_rp.h +++ b/pimd/pim_rp.h @@ -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