X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fovsdb-types.h;h=b9b3d5a02338ceb5fb222948a6c9f48b8198a9b8;hb=a6057323869de5b323d1c75e678b6a0fe0e8addd;hp=78d76c97e5d68e167a551ca3058ed4cb349e67bd;hpb=f85f8ebbfac946c19b3c6eb0f4170f579d0a4d25;p=openvswitch diff --git a/lib/ovsdb-types.h b/lib/ovsdb-types.h index 78d76c97..b9b3d5a0 100644 --- a/lib/ovsdb-types.h +++ b/lib/ovsdb-types.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2009 Nicira Networks +/* Copyright (c) 2009, 2010 Nicira Networks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,13 +42,22 @@ struct ovsdb_error *ovsdb_atomic_type_from_json(enum ovsdb_atomic_type *, const char *ovsdb_atomic_type_to_string(enum ovsdb_atomic_type); struct json *ovsdb_atomic_type_to_json(enum ovsdb_atomic_type); -/* An OVSDB type. One of: +/* An OVSDB type. * - * - An atomic type. + * Several rules constrain the valid types. See ovsdb_type_is_valid() (in + * ovsdb-types.c) for details. * - * - A set of atomic types. + * If 'value_type' is OVSDB_TYPE_VOID, 'n_min' is 1, and 'n_max' is 1, then the + * type is a single atomic 'key_type'. * - * - A map from one atomic type to another. + * If 'value_type' is OVSDB_TYPE_VOID and 'n_min' or 'n_max' (or both) has a + * value other than 1, then the type is a set of 'key_type'. If 'n_min' is 0 + * and 'n_max' is 1, then the type can also be considered an optional + * 'key_type'. + * + * If 'value_type' is not OVSDB_TYPE_VOID, then the type is a map from + * 'key_type' to 'value_type'. If 'n_min' is 0 and 'n_max' is 1, then the type + * can also be considered an optional pair of 'key_type' and 'value_type'. */ struct ovsdb_type { enum ovsdb_atomic_type key_type;