diff options
author | Ben Pfaff <blp@nicira.com> | 2010-02-25 14:59:33 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2010-02-25 14:59:41 -0800 |
commit | bfc96d9b50ae119fcbf39a9511bd9f662e7ad390 (patch) | |
tree | 254e753c940fa0997879b1494ef01d0558d91a4b /lib/ovsdb-data.h | |
parent | a26cc67c16932fa9d07da200bbff75889cfe7529 (diff) |
ovsdb: Add support for "enum" constraints.
Some of the uses for the formerly supported regular expression constraints
were simply to limit values to those in a set of allowed values.
This commit adds support for that kind of simple enumeration constraint.
Diffstat (limited to 'lib/ovsdb-data.h')
-rw-r--r-- | lib/ovsdb-data.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ovsdb-data.h b/lib/ovsdb-data.h index 063536b2..a5c49f97 100644 --- a/lib/ovsdb-data.h +++ b/lib/ovsdb-data.h @@ -122,7 +122,12 @@ void ovsdb_datum_swap(struct ovsdb_datum *, struct ovsdb_datum *); /* Checking and maintaining invariants. */ struct ovsdb_error *ovsdb_datum_sort(struct ovsdb_datum *, - const struct ovsdb_type *); + enum ovsdb_atomic_type key_type) + WARN_UNUSED_RESULT; + +void ovsdb_datum_sort_assert(struct ovsdb_datum *, + enum ovsdb_atomic_type key_type); + struct ovsdb_error *ovsdb_datum_check_constraints( const struct ovsdb_datum *, const struct ovsdb_type *) WARN_UNUSED_RESULT; |