diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-21 15:30:02 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-24 19:51:36 +0200 |
commit | 6f439a70581a8c458a083e1ee4b6c6d5360c9664 (patch) | |
tree | 3b9d426ecb9c1526ac9dcb942fa10452e3eb15d3 /pimd/pim_ssm.c | |
parent | pimd: Finish up pimg -> pim conversion in pim_rpf.c (diff) | |
download | frr-6f439a70581a8c458a083e1ee4b6c6d5360c9664.tar.xz frr-6f439a70581a8c458a083e1ee4b6c6d5360c9664.zip |
pimd: Cleanup pim_ssm.c to use 'struct pim_instance *'
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_ssm.c')
-rw-r--r-- | pimd/pim_ssm.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/pimd/pim_ssm.c b/pimd/pim_ssm.c index 35d588abd..8d270e620 100644 --- a/pimd/pim_ssm.c +++ b/pimd/pim_ssm.c @@ -29,7 +29,7 @@ #include "pim_ssm.h" #include "pim_zebra.h" -static void pim_ssm_range_reevaluate(void) +static void pim_ssm_range_reevaluate(struct pim_instance *pim) { /* 1. Setup register state for (S,G) entries if G has changed from SSM * to @@ -47,13 +47,14 @@ static void pim_ssm_range_reevaluate(void) * will * disappear in time for SSM groups. */ - pim_upstream_register_reevaluate(pimg); + pim_upstream_register_reevaluate(pim); igmp_source_forward_reevaluate_all(); } -void pim_ssm_prefix_list_update(struct prefix_list *plist) +void pim_ssm_prefix_list_update(struct pim_instance *pim, + struct prefix_list *plist) { - struct pim_ssm *ssm = pimg->ssm_info; + struct pim_ssm *ssm = pim->ssm_info; if (!ssm->plist_name || strcmp(ssm->plist_name, prefix_list_name(plist))) { @@ -61,7 +62,7 @@ void pim_ssm_prefix_list_update(struct prefix_list *plist) return; } - pim_ssm_range_reevaluate(); + pim_ssm_range_reevaluate(pim); } static int pim_is_grp_standard_ssm(struct prefix *group) @@ -77,7 +78,7 @@ static int pim_is_grp_standard_ssm(struct prefix *group) return prefix_match(&group_ssm, group); } -int pim_is_grp_ssm(struct in_addr group_addr) +int pim_is_grp_ssm(struct pim_instance *pim, struct in_addr group_addr) { struct pim_ssm *ssm; struct prefix group; @@ -88,7 +89,7 @@ int pim_is_grp_ssm(struct in_addr group_addr) group.u.prefix4 = group_addr; group.prefixlen = 32; - ssm = pimg->ssm_info; + ssm = pim->ssm_info; if (!ssm->plist_name) { return pim_is_grp_standard_ssm(&group); } @@ -100,15 +101,16 @@ int pim_is_grp_ssm(struct in_addr group_addr) return (prefix_list_apply(plist, &group) == PREFIX_PERMIT); } -int pim_ssm_range_set(vrf_id_t vrf_id, const char *plist_name) +int pim_ssm_range_set(struct pim_instance *pim, vrf_id_t vrf_id, + const char *plist_name) { struct pim_ssm *ssm; int change = 0; - if (vrf_id != pimg->vrf_id) + if (vrf_id != pim->vrf_id) return PIM_SSM_ERR_NO_VRF; - ssm = pimg->ssm_info; + ssm = pim->ssm_info; if (plist_name) { if (ssm->plist_name) { if (!strcmp(ssm->plist_name, plist_name)) @@ -125,7 +127,7 @@ int pim_ssm_range_set(vrf_id_t vrf_id, const char *plist_name) } if (change) - pim_ssm_range_reevaluate(); + pim_ssm_range_reevaluate(pim); return PIM_SSM_ERR_NONE; } |