summaryrefslogtreecommitdiffstats
path: root/src/vppinfra/bihash_template.h
diff options
context:
space:
mode:
authorVijayabhaskar Katamreddy <vkatamre@cisco.com>2017-12-14 13:20:50 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2018-01-24 00:36:05 +0000
commitfb8e61cd93178f56a1fc91d438e8b2eec46f1522 (patch)
treeeeaafda607eb501272a7f7b3c9e1b5cab8b31599 /src/vppinfra/bihash_template.h
parent3a905e69b8ae1166c0be0c84770889538b43bacf (diff)
Adding a format function for bihash init routine to format the key, value, when verbose option is used
Change-Id: Ib63ead4525332f897b8a1d8a4cf5a0eb1da1e7f3 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Diffstat (limited to 'src/vppinfra/bihash_template.h')
-rw-r--r--src/vppinfra/bihash_template.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vppinfra/bihash_template.h b/src/vppinfra/bihash_template.h
index ea1b6f7b86f..9df418b5d7d 100644
--- a/src/vppinfra/bihash_template.h
+++ b/src/vppinfra/bihash_template.h
@@ -91,6 +91,11 @@ typedef struct
BVT (clib_bihash_value) ** freelists;
void *mheap;
+ /**
+ * A custom format function to print the Key and Value of bihash_key instead of default hexdump
+ */
+ format_function_t *fmt_fn;
+
} BVT (clib_bihash);
@@ -240,6 +245,9 @@ static inline uword BV (clib_bihash_get_offset) (BVT (clib_bihash) * h,
void BV (clib_bihash_init)
(BVT (clib_bihash) * h, char *name, u32 nbuckets, uword memory_size);
+void BV (clib_bihash_set_kvp_format_fn) (BVT (clib_bihash) * h,
+ format_function_t * fmt_fn);
+
void BV (clib_bihash_free) (BVT (clib_bihash) * h);
int BV (clib_bihash_add_del) (BVT (clib_bihash) * h,