summaryrefslogtreecommitdiff
path: root/zebra/zebra_router.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_router.h')
-rw-r--r--zebra/zebra_router.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/zebra/zebra_router.h b/zebra/zebra_router.h
index d81c7df589..3041707439 100644
--- a/zebra/zebra_router.h
+++ b/zebra/zebra_router.h
@@ -207,6 +207,9 @@ struct zebra_router {
*/
bool asic_offloaded;
bool notify_on_ack;
+ bool v6_with_v4_nexthop;
+
+ bool v6_rr_semantics;
/*
* If the asic is notifying us about successful nexthop
@@ -228,6 +231,10 @@ struct zebra_router {
/* Should we allow non FRR processes to delete our routes */
bool allow_delete;
+
+ uint8_t protodown_r_bit;
+
+ uint64_t nexthop_weight_scale_value;
};
#define GRACEFUL_RESTART_TIME 60
@@ -235,13 +242,17 @@ struct zebra_router {
extern struct zebra_router zrouter;
extern uint32_t rcvbufsize;
-extern void zebra_router_init(bool asic_offload, bool notify_on_ack);
+extern void zebra_router_init(bool asic_offload, bool notify_on_ack,
+ bool v6_with_v4_nexthop);
extern void zebra_router_cleanup(void);
extern void zebra_router_terminate(void);
extern struct zebra_router_table *zebra_router_find_zrt(struct zebra_vrf *zvrf,
uint32_t tableid,
afi_t afi, safi_t safi);
+extern struct zebra_router_table *
+zebra_router_find_next_zrt(struct zebra_vrf *zvrf, uint32_t tableid, afi_t afi,
+ safi_t safi);
extern struct route_table *zebra_router_find_table(struct zebra_vrf *zvrf,
uint32_t tableid, afi_t afi,
safi_t safi);
@@ -286,6 +297,32 @@ static inline bool zebra_router_in_shutdown(void)
return atomic_load_explicit(&zrouter.in_shutdown, memory_order_relaxed);
}
+#define FRR_PROTODOWN_REASON_DEFAULT_BIT 7
+/* Protodown bit setter/getter
+ *
+ * Allow users to change the bit if it conflicts with another
+ * on their system.
+ */
+static inline void if_netlink_set_frr_protodown_r_bit(uint8_t bit)
+{
+ zrouter.protodown_r_bit = bit;
+}
+
+static inline void if_netlink_unset_frr_protodown_r_bit(void)
+{
+ zrouter.protodown_r_bit = FRR_PROTODOWN_REASON_DEFAULT_BIT;
+}
+
+static inline bool if_netlink_frr_protodown_r_bit_is_set(void)
+{
+ return (zrouter.protodown_r_bit != FRR_PROTODOWN_REASON_DEFAULT_BIT);
+}
+
+static inline uint8_t if_netlink_get_frr_protodown_r_bit(void)
+{
+ return zrouter.protodown_r_bit;
+}
+
/* zebra_northbound.c */
extern const struct frr_yang_module_info frr_zebra_info;