]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: Move rpf code into pim_rpf.h
authorDonald Sharp <sharpd@cumulusnetwroks.com>
Fri, 2 Sep 2016 15:03:43 +0000 (11:03 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:08 +0000 (20:26 -0500)
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>
pimd/pim_rpf.h
pimd/pim_upstream.h

index ab16039a29fa8ef77941d3a86048eb25ee84374d..9e183a0895a75fbd8001f7e06b44797f0ace1693 100644 (file)
 #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);
 
index 95492b27c12662087169c71ea5af003d166fb6a1..cd30343492ca6ace8b04aa76be7c7b27b226c027 100644 (file)
@@ -25,6 +25,8 @@
 #include <zebra.h>
 #include <prefix.h>
 
+#include <pim_rpf.h>
+
 #define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED         (1 << 0)
 #define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED_UPDATED (2 << 0)
 
 #define PIM_UPSTREAM_FLAG_UNSET_DR_JOIN_DESIRED(flags) ((flags) &= ~PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED)
 #define PIM_UPSTREAM_FLAG_UNSET_DR_JOIN_DESIRED_UPDATED(flags) ((flags) &= ~PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED_UPDATED)
 
-/*
-  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
-};
-
 enum pim_upstream_state {
   PIM_UPSTREAM_NOTJOINED,
   PIM_UPSTREAM_JOINED,