vppinfra: Function to check if a bihash has been initialised
[vpp.git] / src / vppinfra / bihash_template.c
index 561855a..555c2e0 100644 (file)
@@ -390,6 +390,11 @@ void BV (clib_bihash_set_kvp_format_fn) (BVT (clib_bihash) * h,
   h->kvp_fmt_fn = kvp_fmt_fn;
 }
 
+int BV (clib_bihash_is_initialised) (const BVT (clib_bihash) * h)
+{
+  return (h->instantiated != 0);
+}
+
 void BV (clib_bihash_free) (BVT (clib_bihash) * h)
 {
   int i;