+
+/* Returns true if 'node' is in 'hmap', false otherwise. */
+bool
+hmap_contains(const struct hmap *hmap, const struct hmap_node *node)
+{
+ struct hmap_node *p;
+
+ for (p = hmap_first_in_bucket(hmap, node->hash); p; p = p->next) {
+ if (p == node) {
+ return true;
+ }
+ }
+
+ return false;
+}