X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fovsdb-data.h;h=181df3b126890490a8b61dc9dc64dcce9b7bd0a0;hb=ece72d2415c62548751ba7276e5ca5e2dde11c04;hp=ced303397804ff20fad75c15e971f12cccdb21d5;hpb=c6a4125250b97d41d18dbeeea13043a86e9b8f55;p=sliver-openvswitch.git diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index ced303397..181df3b12 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -19,10 +19,10 @@ #include #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,9 +229,15 @@ 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 used; /* Already used as row UUID? */ + bool created; /* Already used to create row? */ + bool strong_ref; /* Parsed a strong reference to this row? */ + bool weak_ref; /* Parsed a weak reference to this row? */ }; struct ovsdb_symbol_table *ovsdb_symbol_table_create(void); @@ -243,7 +249,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_unused(const struct ovsdb_symbol_table *); /* Tokenization *