diff options
-rw-r--r-- | src/vppinfra/bihash_template.c | 5 | ||||
-rw-r--r-- | src/vppinfra/bihash_template.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/vppinfra/bihash_template.c b/src/vppinfra/bihash_template.c index 561855a5644..555c2e00cfb 100644 --- a/src/vppinfra/bihash_template.c +++ b/src/vppinfra/bihash_template.c @@ -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; diff --git a/src/vppinfra/bihash_template.h b/src/vppinfra/bihash_template.h index 83c94279668..4ab27aac38f 100644 --- a/src/vppinfra/bihash_template.h +++ b/src/vppinfra/bihash_template.h @@ -363,6 +363,8 @@ int BV (clib_bihash_search) (BVT (clib_bihash) * h, BVT (clib_bihash_kv) * search_v, BVT (clib_bihash_kv) * return_v); +int BV (clib_bihash_is_initialised) (const BVT (clib_bihash) * h); + #define BIHASH_WALK_STOP 0 #define BIHASH_WALK_CONTINUE 1 |