diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2015-01-06 19:53:24 +0100 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2015-01-30 01:12:38 +0100 |
commit | 240c56f3a41cb7018460ba6e36c9b559c897e3d0 (patch) | |
tree | 76e7bd769f19a7544b05e0070cdf058a5739eedb /zebra/rib.h | |
parent | 29ce93ebf6427d1d64eae8b385e36873e3ddcb88 (diff) | |
download | quagga-240c56f3a41cb7018460ba6e36c9b559c897e3d0.tar.bz2 quagga-240c56f3a41cb7018460ba6e36c9b559c897e3d0.tar.xz |
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.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/zebra/rib.h b/zebra/rib.h index 347fadb0..94a74194 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -373,6 +373,21 @@ typedef struct rib_tables_iter_t_ rib_tables_iter_state_t state; } rib_tables_iter_t; +/* 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 const char *nexthop_type_to_str (enum nexthop_types_t nh_type); extern struct nexthop *nexthop_ifindex_add (struct rib *, unsigned int); extern struct nexthop *nexthop_ifname_add (struct rib *, char *); @@ -420,6 +435,8 @@ extern int rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, extern struct rib *rib_match_ipv4_safi (struct in_addr addr, safi_t safi, int skip_bgp, 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 *); |