summaryrefslogtreecommitdiff
path: root/lib/ovsdb-data.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-07-12 10:05:16 -0700
committerBen Pfaff <blp@nicira.com>2010-07-12 10:05:16 -0700
commit958ac03a3f785303399316eda76362d26adb09d4 (patch)
tree2c90a0ec3fe68d62a8b354c577f716230bac65a6 /lib/ovsdb-data.h
parent5413de95bec046cff2cf72482d65f7fa435aa10e (diff)
downloadopenvswitch-958ac03a3f785303399316eda76362d26adb09d4.tar.gz
ovsdb: New functions ovsdb_atom_default(), ovsdb_datum_default().
Having access to const copies of default atoms and data will allow OVSDB code to avoid memory allocations and reduce copying in upcoming commits.
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r--lib/ovsdb-data.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h
index 29a5b9e0d..4f44fd847 100644
--- a/lib/ovsdb-data.h
+++ b/lib/ovsdb-data.h
@@ -33,6 +33,7 @@ union ovsdb_atom {
};
void ovsdb_atom_init_default(union ovsdb_atom *, enum ovsdb_atomic_type);
+const union ovsdb_atom *ovsdb_atom_default(enum ovsdb_atomic_type);
bool ovsdb_atom_is_default(const union ovsdb_atom *, enum ovsdb_atomic_type);
void ovsdb_atom_clone(union ovsdb_atom *, const union ovsdb_atom *,
enum ovsdb_atomic_type);
@@ -128,6 +129,7 @@ void ovsdb_datum_init_empty(struct ovsdb_datum *);
void ovsdb_datum_init_default(struct ovsdb_datum *, const struct ovsdb_type *);
bool ovsdb_datum_is_default(const struct ovsdb_datum *,
const struct ovsdb_type *);
+const struct ovsdb_datum *ovsdb_datum_default(const struct ovsdb_type *);
void ovsdb_datum_clone(struct ovsdb_datum *, const struct ovsdb_datum *,
const struct ovsdb_type *);
void ovsdb_datum_destroy(struct ovsdb_datum *, const struct ovsdb_type *);