summaryrefslogtreecommitdiff
path: root/pimd/pim_rpf.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetwroks.com>2016-09-02 11:03:43 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-12-21 20:26:08 -0500
commitbfea315d4f24d456b4ecff6a53cca2389d667eb3 (patch)
tree037f04aaa7d1ed936eefa4cb718bad2c744789d9 /pimd/pim_rpf.h
parentba634917bde686ae908f8b59b407d23d4c88c99f (diff)
pimd: Move rpf code into pim_rpf.h
The pim_rpf code needs to be in pim_rpf.h as that it belongs in there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_rpf.h')
-rw-r--r--pimd/pim_rpf.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/pimd/pim_rpf.h b/pimd/pim_rpf.h
index ab16039a29..9e183a0895 100644
--- a/pimd/pim_rpf.h
+++ b/pimd/pim_rpf.h
@@ -27,6 +27,38 @@
#include "pim_upstream.h"
#include "pim_neighbor.h"
+/*
+ RFC 4601:
+
+ Metric Preference
+ Preference value assigned to the unicast routing protocol that
+ provided the route to the multicast source or Rendezvous-Point.
+
+ Metric
+ The unicast routing table metric associated with the route used to
+ reach the multicast source or Rendezvous-Point. The metric is in
+ units applicable to the unicast routing protocol used.
+*/
+struct pim_nexthop {
+ struct interface *interface; /* RPF_interface(S) */
+ struct in_addr mrib_nexthop_addr; /* MRIB.next_hop(S) */
+ uint32_t mrib_metric_preference; /* MRIB.pref(S) */
+ uint32_t mrib_route_metric; /* MRIB.metric(S) */
+};
+
+struct pim_rpf {
+ struct pim_nexthop source_nexthop;
+ struct in_addr rpf_addr; /* RPF'(S,G) */
+};
+
+enum pim_rpf_result {
+ PIM_RPF_OK = 0,
+ PIM_RPF_CHANGED,
+ PIM_RPF_FAILURE
+};
+
+struct pim_upstream;
+
int pim_nexthop_lookup(struct pim_nexthop *nexthop, struct in_addr addr);
enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_rpf_addr);