diff options
author | Ben Pfaff <blp@nicira.com> | 2011-03-01 13:11:56 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-03-10 11:24:00 -0800 |
commit | 0dc66db95bdceeaac2e32b581d2494fd773b17ae (patch) | |
tree | e2f26d614a676965e19b0bbad4d49ce2dfdaf36a /lib/ovsdb-data.h | |
parent | e9387de4a2601ed2768baaa9bc92a3ef27f1145a (diff) |
ovsdb-data: Expose guts of ovsdb_symbol_table() to clients.
ovs-vsctl will, in upcoming commits, want to more closely examine its
ovsdb_symbol_table structures. This could be done by providing a more
complete API, but it doesn't seem worth it to me. This commit instead goes
the other way, exposing the internals to clients. This commit also
eliminates the ovsdb_symbol_table_find_uncreated() function, which
ovs-vsctl can now implement itself.
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r-- | lib/ovsdb-data.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index fe279bcf..fe71f908 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -19,10 +19,10 @@ #include <stdlib.h> #include "compiler.h" #include "ovsdb-types.h" +#include "shash.h" struct ds; struct ovsdb_symbol_table; -struct shash; /* One value of an atomic type (given by enum ovs_atomic_type). */ union ovsdb_atom { @@ -229,6 +229,10 @@ ovsdb_datum_conforms_to_type(const struct ovsdb_datum *datum, /* A table mapping from names to data items. Currently the data items are * always UUIDs; perhaps this will be expanded in the future. */ +struct ovsdb_symbol_table { + struct shash sh; /* Maps from name to struct ovsdb_symbol *. */ +}; + struct ovsdb_symbol { struct uuid uuid; /* The UUID that the symbol represents. */ bool created; /* Already used to create row? */ @@ -243,8 +247,6 @@ struct ovsdb_symbol *ovsdb_symbol_table_put(struct ovsdb_symbol_table *, const struct uuid *, bool used); struct ovsdb_symbol *ovsdb_symbol_table_insert(struct ovsdb_symbol_table *, const char *name); -const char *ovsdb_symbol_table_find_uncreated( - const struct ovsdb_symbol_table *); /* Tokenization * |