2015-09-30 14:41:18 +02:00
|
|
|
/*
|
|
|
|
* PIM for Quagga
|
|
|
|
* Copyright (C) 2015 Cumulus Networks, Inc.
|
|
|
|
* Donald Sharp
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* 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.
|
2017-05-13 10:25:29 +02:00
|
|
|
*
|
|
|
|
* 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
|
2015-09-30 14:41:18 +02:00
|
|
|
*/
|
|
|
|
#ifndef PIM_RP_H
|
|
|
|
#define PIM_RP_H
|
|
|
|
|
2017-02-22 16:28:36 +01:00
|
|
|
#include <zebra.h>
|
|
|
|
#include "prefix.h"
|
|
|
|
#include "vty.h"
|
|
|
|
#include "plist.h"
|
|
|
|
#include "pim_iface.h"
|
|
|
|
#include "pim_rpf.h"
|
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
struct rp_info {
|
|
|
|
struct prefix group;
|
|
|
|
struct pim_rpf rp;
|
|
|
|
int i_am_rp;
|
|
|
|
char *plist;
|
2017-02-22 16:28:36 +01:00
|
|
|
};
|
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
void pim_rp_init(void);
|
|
|
|
void pim_rp_free(void);
|
2017-05-19 00:51:31 +02:00
|
|
|
void pim_rp_list_hash_clean(void *data);
|
2016-08-05 19:08:06 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
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);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
int pim_rp_config_write(struct vty *vty);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
int pim_rp_setup(void);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
int pim_rp_i_am_rp(struct in_addr group);
|
2016-11-18 18:12:27 +01:00
|
|
|
void pim_rp_check_on_if_add(struct pim_interface *pim_ifp);
|
|
|
|
void pim_i_am_rp_re_evaluate(void);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
int pim_rp_check_is_my_ip_address(struct in_addr group,
|
|
|
|
struct in_addr dest_addr);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
int pim_rp_set_upstream_addr(struct in_addr *up, struct in_addr source,
|
|
|
|
struct in_addr group);
|
2016-08-05 15:07:46 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
struct pim_rpf *pim_rp_g(struct in_addr group);
|
2015-09-30 14:41:18 +02:00
|
|
|
|
2015-10-02 19:34:11 +02:00
|
|
|
#define I_am_RP(G) pim_rp_i_am_rp ((G))
|
|
|
|
#define RP(G) pim_rp_g ((G))
|
2016-08-23 22:22:14 +02:00
|
|
|
|
2017-07-17 14:03:14 +02:00
|
|
|
void pim_rp_show_information(struct vty *vty, u_char uj);
|
|
|
|
void pim_resolve_rp_nh(void);
|
|
|
|
int pim_rp_list_cmp(void *v1, void *v2);
|
2015-09-30 14:41:18 +02:00
|
|
|
#endif
|