~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to lib/ovsdb-types.h

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
struct ovsdb_error *ovsdb_base_type_from_json(struct ovsdb_base_type *,
107
107
                                              const struct json *)
108
 
    WARN_UNUSED_RESULT;
 
108
    OVS_WARN_UNUSED_RESULT;
109
109
struct json *ovsdb_base_type_to_json(const struct ovsdb_base_type *);
110
110
 
111
111
static inline bool ovsdb_base_type_is_ref(const struct ovsdb_base_type *);
152
152
 
153
153
static inline bool ovsdb_type_is_scalar(const struct ovsdb_type *);
154
154
static inline bool ovsdb_type_is_optional(const struct ovsdb_type *);
 
155
static inline bool ovsdb_type_is_optional_scalar(
 
156
    const struct ovsdb_type *);
155
157
static inline bool ovsdb_type_is_composite(const struct ovsdb_type *);
156
158
static inline bool ovsdb_type_is_set(const struct ovsdb_type *);
157
159
static inline bool ovsdb_type_is_map(const struct ovsdb_type *);
160
162
 
161
163
struct ovsdb_error *ovsdb_type_from_json(struct ovsdb_type *,
162
164
                                         const struct json *)
163
 
    WARN_UNUSED_RESULT;
 
165
    OVS_WARN_UNUSED_RESULT;
164
166
struct json *ovsdb_type_to_json(const struct ovsdb_type *);
165
167
 
166
168
/* Inline function implementations. */
202
204
    return type->n_min == 0;
203
205
}
204
206
 
 
207
static inline bool ovsdb_type_is_optional_scalar(
 
208
    const struct ovsdb_type *type)
 
209
{
 
210
    return (type->value.type == OVSDB_TYPE_VOID
 
211
            && type->n_min == 0 && type->n_max == 1);
 
212
}
 
213
 
205
214
static inline bool ovsdb_type_is_composite(const struct ovsdb_type *type)
206
215
{
207
216
    return type->n_max > 1;