summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2015-01-06 19:53:24 +0100
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-05-25 20:38:31 -0400
commit4623d89737729bdf3961bfac024df2eb48b33adc (patch)
tree7371c44cdf7245fc4baf45a3a10958592ffbd8db /zebra/rib.h
parent33550aa869109b07405f7cac50f7287dc713eece (diff)
zebra: make MRIB lookup behaviour switchable
depending on the usage scenario (and availability of multitopology IGP protocols, which is currently zero in Quagga), different approaches of Multicast RPF lookups are useful. Reference behaviours from commercial vendors are urib-only/mrib-only (Juniper, depending on inet.2 availability) and lowest-distance (Cisco). As we are currently without MT IGP support, mrib-first seems the most useful default for Quagga. Cc: Everton Marques <everton.marques@gmail.com> Cc: Balaji G <balajig81@gmail.com> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index 8f23c57c17..5e0bce4461 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -332,6 +332,21 @@ extern struct nexthop *rib_nexthop_ipv4_ifindex_add (struct rib *,
extern void rib_nexthop_add (struct rib *rib, struct nexthop *nexthop);
extern void rib_copy_nexthops (struct rib *rib, struct nexthop *nh);
+/* RPF lookup behaviour */
+enum multicast_mode
+{
+ MCAST_NO_CONFIG = 0, /* MIX_MRIB_FIRST, but no show in config write */
+ MCAST_MRIB_ONLY, /* MRIB only */
+ MCAST_URIB_ONLY, /* URIB only */
+ MCAST_MIX_MRIB_FIRST, /* MRIB, if nothing at all then URIB */
+ MCAST_MIX_DISTANCE, /* MRIB & URIB, lower distance wins */
+ MCAST_MIX_PFXLEN, /* MRIB & URIB, longer prefix wins */
+ /* on equal value, MRIB wins for last 2 */
+};
+
+extern void multicast_mode_ipv4_set (enum multicast_mode mode);
+extern enum multicast_mode multicast_mode_ipv4_get (void);
+
extern int nexthop_has_fib_child(struct nexthop *);
extern void rib_lookup_and_dump (struct prefix_ipv4 *, vrf_id_t);
extern void rib_lookup_and_pushup (struct prefix_ipv4 *, vrf_id_t);
@@ -371,6 +386,8 @@ extern int rib_delete_ipv4 (int type, u_short instance, int flags, struct prefix
extern struct rib *rib_match_ipv4 (struct in_addr, safi_t safi, vrf_id_t,
struct route_node **rn_out);
+extern struct rib *rib_match_ipv4_multicast (struct in_addr addr,
+ struct route_node **rn_out);
extern struct rib *rib_lookup_ipv4 (struct prefix_ipv4 *, vrf_id_t);