vswitchd: Document how to disable inactivity probes.
[sliver-openvswitch.git] / lib / shash.h
index 8a736e8..1210772 100644 (file)
@@ -35,12 +35,11 @@ struct shash {
 
 #define SHASH_INITIALIZER(SHASH) { HMAP_INITIALIZER(&(SHASH)->map) }
 
-#define SHASH_FOR_EACH(SHASH_NODE, SHASH)                               \
-    HMAP_FOR_EACH (SHASH_NODE, struct shash_node, node, &(SHASH)->map)
+#define SHASH_FOR_EACH(SHASH_NODE, SHASH) \
+    HMAP_FOR_EACH (SHASH_NODE, node, &(SHASH)->map)
 
-#define SHASH_FOR_EACH_SAFE(SHASH_NODE, NEXT, SHASH)                \
-    HMAP_FOR_EACH_SAFE (SHASH_NODE, NEXT, struct shash_node, node,  \
-                        &(SHASH)->map)
+#define SHASH_FOR_EACH_SAFE(SHASH_NODE, NEXT, SHASH) \
+    HMAP_FOR_EACH_SAFE (SHASH_NODE, NEXT, node, &(SHASH)->map)
 
 void shash_init(struct shash *);
 void shash_destroy(struct shash *);
@@ -67,6 +66,12 @@ const struct shash_node **shash_sort(const struct shash *);
 bool shash_equal_keys(const struct shash *, const struct shash *);
 struct shash_node *shash_random_node(struct shash *);
 
+/* Working with "smaps": shashes used as string-to-string maps. */
+void smap_destroy(struct shash *);
+bool smap_equal(const struct shash *, const struct shash *);
+void smap_clone(struct shash *, const struct shash *);
+void smap_add(struct shash *, const char *key, const char *value);
+
 #ifdef  __cplusplus
 }
 #endif