summaryrefslogtreecommitdiff
path: root/lib/if.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2025-03-23 21:17:53 -0400
committerDonald Sharp <sharpd@nvidia.com>2025-03-24 11:00:45 -0400
commit5f9e26069ee1244fbcd200118a55a51d88795b3d (patch)
tree478416de0459e14513c6aece7ac6d369da08d1f6 /lib/if.h
parentd736350986e4318e47bb97e731fd13a4a627acec (diff)
lib: expose comparision function to allow a typesafe conversion
The interface hash comparison function is needed in eigrpd. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/if.h')
-rw-r--r--lib/if.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/if.h b/lib/if.h
index 897f2be239..fce6705c23 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -309,6 +309,8 @@ struct interface {
QOBJ_FIELDS;
};
+extern int if_cmp_func(const struct interface *a, const struct interface *b);
+
RB_HEAD(if_name_head, interface);
RB_PROTOTYPE(if_name_head, interface, name_entry, if_cmp_func)
RB_HEAD(if_index_head, interface);