2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00

lib: New data structure - smap.

A smap is a string to string hash map.  It has a cleaner interface
than shash's which were traditionally used for the same purpose.
This patch implements the data structure, and changes netdev and
its providers to use it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
This commit is contained in:
Ethan Jackson
2012-05-22 03:47:36 -07:00
parent 37344ffa58
commit 79f1cbe9f8
13 changed files with 558 additions and 287 deletions

View File

@@ -67,12 +67,6 @@ 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