mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-09 07:30:53 +00:00
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>
This commit is contained in:
parent
ba634917bd
commit
bfea315d4f
@ -27,6 +27,38 @@
|
|||||||
#include "pim_upstream.h"
|
#include "pim_upstream.h"
|
||||||
#include "pim_neighbor.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);
|
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);
|
enum pim_rpf_result pim_rpf_update(struct pim_upstream *up, struct in_addr *old_rpf_addr);
|
||||||
|
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
#include <zebra.h>
|
#include <zebra.h>
|
||||||
#include <prefix.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 (1 << 0)
|
||||||
#define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED_UPDATED (2 << 0)
|
#define PIM_UPSTREAM_FLAG_MASK_DR_JOIN_DESIRED_UPDATED (2 << 0)
|
||||||
|
|
||||||
@ -37,36 +39,6 @@
|
|||||||
#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(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)
|
#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 {
|
enum pim_upstream_state {
|
||||||
PIM_UPSTREAM_NOTJOINED,
|
PIM_UPSTREAM_NOTJOINED,
|
||||||
PIM_UPSTREAM_JOINED,
|
PIM_UPSTREAM_JOINED,
|
||||||
|
Loading…
Reference in New Issue
Block a user