summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/typesafe.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/typesafe.h b/lib/typesafe.h
index 1e3f932565..3292b6ec8b 100644
--- a/lib/typesafe.h
+++ b/lib/typesafe.h
@@ -20,6 +20,9 @@ extern "C" {
#define frr_each(prefix, head, item) \
for (item = prefix##_first(head); item; \
item = prefix##_next(head, item))
+#define frr_each_const(prefix, head, item) \
+ for (item = prefix##_const_first(head); item; \
+ item = prefix##_const_next(head, item))
#define frr_each_safe(prefix, head, item) \
for (typeof(prefix##_next_safe(head, NULL)) prefix##_safe = \
prefix##_next_safe(head, \