summaryrefslogtreecommitdiffstats
path: root/zebra/zebra_rnh.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--zebra/zebra_rnh.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_rnh.h b/zebra/zebra_rnh.h
index 95a394118..c7d2c0d29 100644
--- a/zebra/zebra_rnh.h
+++ b/zebra/zebra_rnh.h
@@ -43,6 +43,18 @@ static inline int rnh_resolve_via_default(int family)
return 0;
}
+static inline const char *rnh_type2str(rnh_type_t type)
+{
+ switch (type) {
+ case RNH_NEXTHOP_TYPE:
+ return "Nexthop";
+ case RNH_IMPORT_CHECK_TYPE:
+ return "Import";
+ }
+
+ return "ERROR";
+}
+
extern struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid,
rnh_type_t type, bool *exists);
extern struct rnh *zebra_lookup_rnh(struct prefix *p, vrf_id_t vrfid,