summaryrefslogtreecommitdiff
path: root/zebra/zebra_nhg.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_nhg.h')
-rw-r--r--zebra/zebra_nhg.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/zebra_nhg.h b/zebra/zebra_nhg.h
index 38015bf557..3fbf778be2 100644
--- a/zebra/zebra_nhg.h
+++ b/zebra/zebra_nhg.h
@@ -51,6 +51,9 @@ struct nhg_hash_entry {
afi_t afi;
vrf_id_t vrf_id;
+ /* Time since last update */
+ time_t uptime;
+
/* Source protocol - zebra or another daemon */
int type;
@@ -147,6 +150,8 @@ enum nhg_type {
/* Is this an NHE owned by zebra and not an upper level protocol? */
#define ZEBRA_OWNED(NHE) (NHE->type == ZEBRA_ROUTE_NHG)
+#define PROTO_OWNED(NHE) (NHE->id >= ZEBRA_NHG_PROTO_LOWER)
+
/*
* Backup nexthops: this is a group object itself, so
* that the backup nexthops can use the same code as a normal object.
@@ -269,6 +274,7 @@ extern bool zebra_nhg_hash_id_equal(const void *arg1, const void *arg2);
* the rib meta queue.
*/
extern int nhg_ctx_process(struct nhg_ctx *ctx);
+void nhg_ctx_free(struct nhg_ctx **ctx);
/* Find via kernel nh creation */
extern int zebra_nhg_kernel_find(uint32_t id, struct nexthop *nh,