- @param h - the bi-hash table to search
- @param callback - function to call with each active (key,value) pair
- @param arg - arbitrary second argument passed to the callback function
- First argument is the (key,value) pair to visit
- @note Trying to supply a proper function prototype for the
- callback function appears to be a fool's errand.
-*/
+/**
+ * Search a bi-hash table
+ *
+ * @param h - the bi-hash table to search
+ * @param in_out_kv - (key,value) pair containing the search key
+ * @returns 0 on success (with in_out_kv set), < 0 on error
+ */
+int clib_bihash_search_inline (clib_bihash *h, clib_bihash_kv *in_out_kv);
+
+/**
+ * Prefetch a bi-hash bucket given a hash code
+ *
+ * @param h - the bi-hash table to search
+ * @param hash - the hash code
+ * @note see also clib_bihash_hash to compute the code
+ */
+void clib_bihash_prefetch_bucket (clib_bihash * h, u64 hash);
+
+/**
+ * Prefetch bi-hash (key,value) data given a hash code
+ *
+ * @param h - the bi-hash table to search
+ * @param hash - the hash code
+ * @note assumes that the bucket has been prefetched, see
+ * clib_bihash_prefetch_bucket
+ */
+void clib_bihash_prefetch_data (clib_bihash * h, u64 hash);
+
+/**
+ * Search a bi-hash table
+ *
+ * @param h - the bi-hash table to search
+ * @param search_key - (key,value) pair containing the search key
+ * @param valuep - (key,value) set to search result
+ * @returns 0 on success (with valuep set), < 0 on error
+ * @note used in situations where key modification is not desired
+ */
+int clib_bihash_search_inline_2
+ (clib_bihash * h, clib_bihash_kv * search_key, clib_bihash_kv * valuep);
+
+/**
+ * Calback function for walking a bihash table
+ *
+ * @param kv - KV pair visited
+ * @param ctx - Context passed to the walk
+ * @return BIHASH_WALK_CONTINUE to continue BIHASH_WALK_STOP to stop
+ */
+typedef int (*clib_bihash_foreach_key_value_pair_cb) (clib_bihash_kv * kv,
+ void *ctx);
+
+/**
+ * Visit active (key,value) pairs in a bi-hash table
+ *
+ * @param h - the bi-hash table to search
+ * @param callback - function to call with each active (key,value) pair
+ * @param arg - arbitrary second argument passed to the callback function
+ * First argument is the (key,value) pair to visit
+ */