]> git.proxmox.com Git - mirror_frr.git/blame - pimd/pim_rp.h
pimd: Remove pimg from pim_upstream.c
[mirror_frr.git] / pimd / pim_rp.h
CommitLineData
8f5f5e91
DS
1/*
2 * PIM for Quagga
3 * Copyright (C) 2015 Cumulus Networks, Inc.
4 * Donald Sharp
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
896014f4
DL
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; see the file COPYING; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
8f5f5e91
DS
19 */
20#ifndef PIM_RP_H
21#define PIM_RP_H
22
1bc98276
CS
23#include <zebra.h>
24#include "prefix.h"
25#include "vty.h"
26#include "plist.h"
27#include "pim_iface.h"
28#include "pim_rpf.h"
29
d62a17ae 30struct rp_info {
31 struct prefix group;
32 struct pim_rpf rp;
33 int i_am_rp;
34 char *plist;
1bc98276
CS
35};
36
d62a17ae 37void pim_rp_init(void);
38void pim_rp_free(void);
c2cf4b02 39void pim_rp_list_hash_clean(void *data);
36d6bd7d 40
fec883d9
DS
41int pim_rp_new(struct pim_instance *pim, const char *rp, const char *group,
42 const char *plist);
43int pim_rp_del(struct pim_instance *pim, const char *rp, const char *group,
44 const char *plist);
d62a17ae 45void pim_rp_prefix_list_update(struct prefix_list *plist);
75a26779 46
d62a17ae 47int pim_rp_config_write(struct vty *vty);
75a26779 48
fec883d9 49void pim_rp_setup(struct pim_instance *pim);
75a26779 50
d62a17ae 51int pim_rp_i_am_rp(struct in_addr group);
7176984f 52void pim_rp_check_on_if_add(struct pim_interface *pim_ifp);
fec883d9 53void pim_i_am_rp_re_evaluate(struct pim_instance *pim);
75a26779 54
fec883d9
DS
55int pim_rp_check_is_my_ip_address(struct pim_instance *pim,
56 struct in_addr group,
d62a17ae 57 struct in_addr dest_addr);
75a26779 58
d62a17ae 59int pim_rp_set_upstream_addr(struct in_addr *up, struct in_addr source,
60 struct in_addr group);
75a26779 61
fec883d9 62struct pim_rpf *pim_rp_g(struct pim_instance *pim, struct in_addr group);
8f5f5e91 63
71694057 64#define I_am_RP(G) pim_rp_i_am_rp ((G))
fec883d9 65#define RP(P, G) pim_rp_g ((P), (G))
00d07c6f 66
d62a17ae 67void pim_rp_show_information(struct vty *vty, u_char uj);
fec883d9 68void pim_resolve_rp_nh(struct pim_instance *pim);
d62a17ae 69int pim_rp_list_cmp(void *v1, void *v2);
8f5f5e91 70#endif