LCOV - code coverage report
Current view: top level - vtep - vtep-idl.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2109 7502 28.1 %
Date: 2016-09-14 01:02:56 Functions: 243 1079 22.5 %
Branches: 239 2270 10.5 %

           Branch data     Line data    Source code
       1                 :            : /* Generated automatically -- do not modify!    -*- buffer-read-only: t -*- */
       2                 :            : 
       3                 :            : #include <config.h>
       4                 :            : #include "vtep/vtep-idl.h"
       5                 :            : #include <limits.h>
       6                 :            : #include "ovs-thread.h"
       7                 :            : #include "ovsdb-data.h"
       8                 :            : #include "ovsdb-error.h"
       9                 :            : #include "util.h"
      10                 :            : 
      11                 :            : #ifdef __CHECKER__
      12                 :            : /* Sparse dislikes sizeof(bool) ("warning: expression using sizeof bool"). */
      13                 :            : enum { sizeof_bool = 1 };
      14                 :            : #else
      15                 :            : enum { sizeof_bool = sizeof(bool) };
      16                 :            : #endif
      17                 :            : 
      18                 :            : static bool inited;
      19                 :            : 
      20                 :            : 
      21                 :            : static struct vteprec_acl *
      22                 :          0 : vteprec_acl_cast(const struct ovsdb_idl_row *row)
      23                 :            : {
      24                 :          0 :     return row ? CONTAINER_OF(row, struct vteprec_acl, header_) : NULL;
      25                 :            : }
      26                 :            : 
      27                 :            : static struct vteprec_acl_entry *
      28                 :          0 : vteprec_acl_entry_cast(const struct ovsdb_idl_row *row)
      29                 :            : {
      30                 :          0 :     return row ? CONTAINER_OF(row, struct vteprec_acl_entry, header_) : NULL;
      31                 :            : }
      32                 :            : 
      33                 :            : static struct vteprec_arp_sources_local *
      34                 :          0 : vteprec_arp_sources_local_cast(const struct ovsdb_idl_row *row)
      35                 :            : {
      36                 :          0 :     return row ? CONTAINER_OF(row, struct vteprec_arp_sources_local, header_) : NULL;
      37                 :            : }
      38                 :            : 
      39                 :            : static struct vteprec_arp_sources_remote *
      40                 :          0 : vteprec_arp_sources_remote_cast(const struct ovsdb_idl_row *row)
      41                 :            : {
      42                 :          0 :     return row ? CONTAINER_OF(row, struct vteprec_arp_sources_remote, header_) : NULL;
      43                 :            : }
      44                 :            : 
      45                 :            : static struct vteprec_global *
      46                 :       8490 : vteprec_global_cast(const struct ovsdb_idl_row *row)
      47                 :            : {
      48                 :       8490 :     return row ? CONTAINER_OF(row, struct vteprec_global, header_) : NULL;
      49                 :            : }
      50                 :            : 
      51                 :            : static struct vteprec_logical_binding_stats *
      52                 :        964 : vteprec_logical_binding_stats_cast(const struct ovsdb_idl_row *row)
      53                 :            : {
      54                 :        964 :     return row ? CONTAINER_OF(row, struct vteprec_logical_binding_stats, header_) : NULL;
      55                 :            : }
      56                 :            : 
      57                 :            : static struct vteprec_logical_router *
      58                 :        484 : vteprec_logical_router_cast(const struct ovsdb_idl_row *row)
      59                 :            : {
      60                 :        484 :     return row ? CONTAINER_OF(row, struct vteprec_logical_router, header_) : NULL;
      61                 :            : }
      62                 :            : 
      63                 :            : static struct vteprec_logical_switch *
      64                 :       9328 : vteprec_logical_switch_cast(const struct ovsdb_idl_row *row)
      65                 :            : {
      66                 :       9328 :     return row ? CONTAINER_OF(row, struct vteprec_logical_switch, header_) : NULL;
      67                 :            : }
      68                 :            : 
      69                 :            : static struct vteprec_manager *
      70                 :         56 : vteprec_manager_cast(const struct ovsdb_idl_row *row)
      71                 :            : {
      72                 :         56 :     return row ? CONTAINER_OF(row, struct vteprec_manager, header_) : NULL;
      73                 :            : }
      74                 :            : 
      75                 :            : static struct vteprec_mcast_macs_local *
      76                 :       2036 : vteprec_mcast_macs_local_cast(const struct ovsdb_idl_row *row)
      77                 :            : {
      78                 :       2036 :     return row ? CONTAINER_OF(row, struct vteprec_mcast_macs_local, header_) : NULL;
      79                 :            : }
      80                 :            : 
      81                 :            : static struct vteprec_mcast_macs_remote *
      82                 :       1953 : vteprec_mcast_macs_remote_cast(const struct ovsdb_idl_row *row)
      83                 :            : {
      84                 :       1953 :     return row ? CONTAINER_OF(row, struct vteprec_mcast_macs_remote, header_) : NULL;
      85                 :            : }
      86                 :            : 
      87                 :            : static struct vteprec_physical_locator *
      88                 :       4059 : vteprec_physical_locator_cast(const struct ovsdb_idl_row *row)
      89                 :            : {
      90                 :       4059 :     return row ? CONTAINER_OF(row, struct vteprec_physical_locator, header_) : NULL;
      91                 :            : }
      92                 :            : 
      93                 :            : static struct vteprec_physical_locator_set *
      94                 :       1899 : vteprec_physical_locator_set_cast(const struct ovsdb_idl_row *row)
      95                 :            : {
      96                 :       1899 :     return row ? CONTAINER_OF(row, struct vteprec_physical_locator_set, header_) : NULL;
      97                 :            : }
      98                 :            : 
      99                 :            : static struct vteprec_physical_port *
     100                 :       9162 : vteprec_physical_port_cast(const struct ovsdb_idl_row *row)
     101                 :            : {
     102                 :       9162 :     return row ? CONTAINER_OF(row, struct vteprec_physical_port, header_) : NULL;
     103                 :            : }
     104                 :            : 
     105                 :            : static struct vteprec_physical_switch *
     106                 :      10915 : vteprec_physical_switch_cast(const struct ovsdb_idl_row *row)
     107                 :            : {
     108                 :      10915 :     return row ? CONTAINER_OF(row, struct vteprec_physical_switch, header_) : NULL;
     109                 :            : }
     110                 :            : 
     111                 :            : static struct vteprec_tunnel *
     112                 :       3198 : vteprec_tunnel_cast(const struct ovsdb_idl_row *row)
     113                 :            : {
     114                 :       3198 :     return row ? CONTAINER_OF(row, struct vteprec_tunnel, header_) : NULL;
     115                 :            : }
     116                 :            : 
     117                 :            : static struct vteprec_ucast_macs_local *
     118                 :       1100 : vteprec_ucast_macs_local_cast(const struct ovsdb_idl_row *row)
     119                 :            : {
     120                 :       1100 :     return row ? CONTAINER_OF(row, struct vteprec_ucast_macs_local, header_) : NULL;
     121                 :            : }
     122                 :            : 
     123                 :            : static struct vteprec_ucast_macs_remote *
     124                 :       1960 : vteprec_ucast_macs_remote_cast(const struct ovsdb_idl_row *row)
     125                 :            : {
     126                 :       1960 :     return row ? CONTAINER_OF(row, struct vteprec_ucast_macs_remote, header_) : NULL;
     127                 :            : }
     128                 :            : 
     129                 :            : /* ACL table. */
     130                 :            : 
     131                 :            : static void
     132                 :          0 : vteprec_acl_parse_acl_entries(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     133                 :            : {
     134                 :          0 :     struct vteprec_acl *row = vteprec_acl_cast(row_);
     135                 :            :     size_t i;
     136                 :            : 
     137         [ #  # ]:          0 :     ovs_assert(inited);
     138                 :          0 :     row->acl_entries = NULL;
     139                 :          0 :     row->n_acl_entries = 0;
     140         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
     141                 :          0 :         struct vteprec_acl_entry *keyRow = vteprec_acl_entry_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], &datum->keys[i].uuid));
     142         [ #  # ]:          0 :         if (keyRow) {
     143         [ #  # ]:          0 :             if (!row->n_acl_entries) {
     144                 :          0 :                 row->acl_entries = xmalloc(datum->n * sizeof *row->acl_entries);
     145                 :            :             }
     146                 :          0 :             row->acl_entries[row->n_acl_entries] = keyRow;
     147                 :          0 :             row->n_acl_entries++;
     148                 :            :         }
     149                 :            :     }
     150                 :          0 : }
     151                 :            : 
     152                 :            : static void
     153                 :          0 : vteprec_acl_parse_acl_fault_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     154                 :            : {
     155                 :          0 :     struct vteprec_acl *row = vteprec_acl_cast(row_);
     156                 :            :     size_t i;
     157                 :            : 
     158         [ #  # ]:          0 :     ovs_assert(inited);
     159                 :          0 :     row->acl_fault_status = NULL;
     160                 :          0 :     row->n_acl_fault_status = 0;
     161         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
     162         [ #  # ]:          0 :         if (!row->n_acl_fault_status) {
     163                 :          0 :             row->acl_fault_status = xmalloc(datum->n * sizeof *row->acl_fault_status);
     164                 :            :         }
     165                 :          0 :         row->acl_fault_status[row->n_acl_fault_status] = datum->keys[i].string;
     166                 :          0 :         row->n_acl_fault_status++;
     167                 :            :     }
     168                 :          0 : }
     169                 :            : 
     170                 :            : static void
     171                 :          0 : vteprec_acl_parse_acl_name(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     172                 :            : {
     173                 :          0 :     struct vteprec_acl *row = vteprec_acl_cast(row_);
     174                 :            : 
     175         [ #  # ]:          0 :     ovs_assert(inited);
     176         [ #  # ]:          0 :     if (datum->n >= 1) {
     177                 :          0 :         row->acl_name = datum->keys[0].string;
     178                 :            :     } else {
     179                 :          0 :         row->acl_name = "";
     180                 :            :     }
     181                 :          0 : }
     182                 :            : 
     183                 :            : static void
     184                 :          0 : vteprec_acl_unparse_acl_entries(struct ovsdb_idl_row *row_)
     185                 :            : {
     186                 :          0 :     struct vteprec_acl *row = vteprec_acl_cast(row_);
     187                 :            : 
     188         [ #  # ]:          0 :     ovs_assert(inited);
     189                 :          0 :     free(row->acl_entries);
     190                 :          0 : }
     191                 :            : 
     192                 :            : static void
     193                 :          0 : vteprec_acl_unparse_acl_fault_status(struct ovsdb_idl_row *row_)
     194                 :            : {
     195                 :          0 :     struct vteprec_acl *row = vteprec_acl_cast(row_);
     196                 :            : 
     197         [ #  # ]:          0 :     ovs_assert(inited);
     198                 :          0 :     free(row->acl_fault_status);
     199                 :          0 : }
     200                 :            : 
     201                 :            : static void
     202                 :          0 : vteprec_acl_unparse_acl_name(struct ovsdb_idl_row *row OVS_UNUSED)
     203                 :            : {
     204                 :            :     /* Nothing to do. */
     205                 :          0 : }
     206                 :            : 
     207                 :            : static void
     208                 :          0 : vteprec_acl_init__(struct ovsdb_idl_row *row)
     209                 :            : {
     210                 :          0 :     vteprec_acl_init(vteprec_acl_cast(row));
     211                 :          0 : }
     212                 :            : 
     213                 :            : /* Clears the contents of 'row' in table "ACL". */
     214                 :            : void
     215                 :          0 : vteprec_acl_init(struct vteprec_acl *row)
     216                 :            : {
     217                 :          0 :     memset(row, 0, sizeof *row); 
     218                 :          0 : }
     219                 :            : 
     220                 :            : /* Searches table "ACL" in 'idl' for a row with UUID 'uuid'.  Returns
     221                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
     222                 :            : const struct vteprec_acl *
     223                 :          0 : vteprec_acl_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
     224                 :            : {
     225                 :          0 :     return vteprec_acl_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL], uuid));
     226                 :            : }
     227                 :            : 
     228                 :            : /* Returns a row in table "ACL" in 'idl', or a null pointer if that
     229                 :            :  * table is empty.
     230                 :            :  *
     231                 :            :  * Database tables are internally maintained as hash tables, so adding or
     232                 :            :  * removing rows while traversing the same table can cause some rows to be
     233                 :            :  * visited twice or not at apply. */
     234                 :            : const struct vteprec_acl *
     235                 :          0 : vteprec_acl_first(const struct ovsdb_idl *idl)
     236                 :            : {
     237                 :          0 :     return vteprec_acl_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL]));
     238                 :            : }
     239                 :            : 
     240                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
     241                 :            :  * is the last row in its table. */
     242                 :            : const struct vteprec_acl *
     243                 :          0 : vteprec_acl_next(const struct vteprec_acl *row)
     244                 :            : {
     245                 :          0 :     return vteprec_acl_cast(ovsdb_idl_next_row(&row->header_));
     246                 :            : }
     247                 :            : 
     248                 :          0 : unsigned int vteprec_acl_get_seqno(const struct ovsdb_idl *idl)
     249                 :            : {
     250                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL]);
     251                 :            : }
     252                 :            : 
     253                 :          0 : unsigned int vteprec_acl_row_get_seqno(const struct vteprec_acl *row, enum ovsdb_idl_change change)
     254                 :            : {
     255                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
     256                 :            : }
     257                 :            : 
     258                 :            : const struct vteprec_acl *
     259                 :          0 : vteprec_acl_track_get_first(const struct ovsdb_idl *idl)
     260                 :            : {
     261                 :          0 :     return vteprec_acl_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL]));
     262                 :            : }
     263                 :            : 
     264                 :            : const struct vteprec_acl
     265                 :          0 : *vteprec_acl_track_get_next(const struct vteprec_acl *row)
     266                 :            : {
     267                 :          0 :     return vteprec_acl_cast(ovsdb_idl_track_get_next(&row->header_));
     268                 :            : }
     269                 :            : 
     270                 :            : 
     271                 :            : /* Deletes 'row' from table "ACL".  'row' may be freed, so it must not be
     272                 :            :  * accessed afterward.
     273                 :            :  *
     274                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
     275                 :            : void
     276                 :          0 : vteprec_acl_delete(const struct vteprec_acl *row)
     277                 :            : {
     278                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
     279                 :          0 : }
     280                 :            : 
     281                 :            : /* Inserts and returns a new row in the table "ACL" in the database
     282                 :            :  * with open transaction 'txn'.
     283                 :            :  *
     284                 :            :  * The new row is assigned a randomly generated provisional UUID.
     285                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
     286                 :            :  * but the IDL will replace any uses of the provisional UUID in the
     287                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
     288                 :            : struct vteprec_acl *
     289                 :          0 : vteprec_acl_insert(struct ovsdb_idl_txn *txn)
     290                 :            : {
     291                 :          0 :     return vteprec_acl_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_ACL], NULL));
     292                 :            : }
     293                 :            : 
     294                 :            : bool
     295                 :          0 : vteprec_acl_is_updated(const struct vteprec_acl *row, enum vteprec_acl_column_id column)
     296                 :            : {
     297                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_acl_columns[column]);
     298                 :            : }
     299                 :            : 
     300                 :            : /* Causes the original contents of column "acl_entries" in 'row' to be
     301                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
     302                 :            :  * "acl_entries" in 'row' changed (or if 'row' was deleted) between the
     303                 :            :  * time that the IDL originally read its contents and the time that the
     304                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
     305                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
     306                 :            :  * change has already been received).
     307                 :            :  *
     308                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
     309                 :            :  * reads, an application should call this function any time "acl_entries" is
     310                 :            :  * read as part of a read-modify-write operation.
     311                 :            :  *
     312                 :            :  * In some cases this function reduces to a no-op, because the current value
     313                 :            :  * of "acl_entries" is already known:
     314                 :            :  *
     315                 :            :  *   - If 'row' is a row created by the current transaction (returned by
     316                 :            :  *     vteprec_acl_insert()).
     317                 :            :  *
     318                 :            :  *   - If "acl_entries" has already been modified (with
     319                 :            :  *     vteprec_acl_set_acl_entries()) within the current transaction.
     320                 :            :  *
     321                 :            :  * Because of the latter property, always call this function *before*
     322                 :            :  * vteprec_acl_set_acl_entries() for a given read-modify-write.
     323                 :            :  *
     324                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
     325                 :            : void
     326                 :          0 : vteprec_acl_verify_acl_entries(const struct vteprec_acl *row)
     327                 :            : {
     328         [ #  # ]:          0 :     ovs_assert(inited);
     329                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES]);
     330                 :          0 : }
     331                 :            : 
     332                 :            : /* Causes the original contents of column "acl_fault_status" in 'row' to be
     333                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
     334                 :            :  * "acl_fault_status" in 'row' changed (or if 'row' was deleted) between the
     335                 :            :  * time that the IDL originally read its contents and the time that the
     336                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
     337                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
     338                 :            :  * change has already been received).
     339                 :            :  *
     340                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
     341                 :            :  * reads, an application should call this function any time "acl_fault_status" is
     342                 :            :  * read as part of a read-modify-write operation.
     343                 :            :  *
     344                 :            :  * In some cases this function reduces to a no-op, because the current value
     345                 :            :  * of "acl_fault_status" is already known:
     346                 :            :  *
     347                 :            :  *   - If 'row' is a row created by the current transaction (returned by
     348                 :            :  *     vteprec_acl_insert()).
     349                 :            :  *
     350                 :            :  *   - If "acl_fault_status" has already been modified (with
     351                 :            :  *     vteprec_acl_set_acl_fault_status()) within the current transaction.
     352                 :            :  *
     353                 :            :  * Because of the latter property, always call this function *before*
     354                 :            :  * vteprec_acl_set_acl_fault_status() for a given read-modify-write.
     355                 :            :  *
     356                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
     357                 :            : void
     358                 :          0 : vteprec_acl_verify_acl_fault_status(const struct vteprec_acl *row)
     359                 :            : {
     360         [ #  # ]:          0 :     ovs_assert(inited);
     361                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS]);
     362                 :          0 : }
     363                 :            : 
     364                 :            : /* Causes the original contents of column "acl_name" in 'row' to be
     365                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
     366                 :            :  * "acl_name" in 'row' changed (or if 'row' was deleted) between the
     367                 :            :  * time that the IDL originally read its contents and the time that the
     368                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
     369                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
     370                 :            :  * change has already been received).
     371                 :            :  *
     372                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
     373                 :            :  * reads, an application should call this function any time "acl_name" is
     374                 :            :  * read as part of a read-modify-write operation.
     375                 :            :  *
     376                 :            :  * In some cases this function reduces to a no-op, because the current value
     377                 :            :  * of "acl_name" is already known:
     378                 :            :  *
     379                 :            :  *   - If 'row' is a row created by the current transaction (returned by
     380                 :            :  *     vteprec_acl_insert()).
     381                 :            :  *
     382                 :            :  *   - If "acl_name" has already been modified (with
     383                 :            :  *     vteprec_acl_set_acl_name()) within the current transaction.
     384                 :            :  *
     385                 :            :  * Because of the latter property, always call this function *before*
     386                 :            :  * vteprec_acl_set_acl_name() for a given read-modify-write.
     387                 :            :  *
     388                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
     389                 :            : void
     390                 :          0 : vteprec_acl_verify_acl_name(const struct vteprec_acl *row)
     391                 :            : {
     392         [ #  # ]:          0 :     ovs_assert(inited);
     393                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_NAME]);
     394                 :          0 : }
     395                 :            : 
     396                 :            : /* Returns the "acl_entries" column's value from the "ACL" table in 'row'
     397                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
     398                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
     399                 :            :  * for a given key than implementing the same operation on the "cooked"
     400                 :            :  * form in 'row'.
     401                 :            :  *
     402                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
     403                 :            :  * (This helps to avoid silent bugs if someone changes acl_entries's
     404                 :            :  * type without updating the caller.)
     405                 :            :  *
     406                 :            :  * The caller must not modify or free the returned value.
     407                 :            :  *
     408                 :            :  * Various kinds of changes can invalidate the returned value: modifying
     409                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
     410                 :            :  * If the returned value is needed for a long time, it is best to make a copy
     411                 :            :  * of it with ovsdb_datum_clone().
     412                 :            :  *
     413                 :            :  * This function is rarely useful, since it is easier to access the value
     414                 :            :  * directly through the "acl_entries" member in vteprec_acl. */
     415                 :            : const struct ovsdb_datum *
     416                 :          0 : vteprec_acl_get_acl_entries(const struct vteprec_acl *row,
     417                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
     418                 :            : {
     419         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
     420                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_col_acl_entries);
     421                 :            : }
     422                 :            : 
     423                 :            : /* Returns the "acl_fault_status" column's value from the "ACL" table in 'row'
     424                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
     425                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
     426                 :            :  * for a given key than implementing the same operation on the "cooked"
     427                 :            :  * form in 'row'.
     428                 :            :  *
     429                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
     430                 :            :  * (This helps to avoid silent bugs if someone changes acl_fault_status's
     431                 :            :  * type without updating the caller.)
     432                 :            :  *
     433                 :            :  * The caller must not modify or free the returned value.
     434                 :            :  *
     435                 :            :  * Various kinds of changes can invalidate the returned value: modifying
     436                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
     437                 :            :  * If the returned value is needed for a long time, it is best to make a copy
     438                 :            :  * of it with ovsdb_datum_clone().
     439                 :            :  *
     440                 :            :  * This function is rarely useful, since it is easier to access the value
     441                 :            :  * directly through the "acl_fault_status" member in vteprec_acl. */
     442                 :            : const struct ovsdb_datum *
     443                 :          0 : vteprec_acl_get_acl_fault_status(const struct vteprec_acl *row,
     444                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
     445                 :            : {
     446         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
     447                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_col_acl_fault_status);
     448                 :            : }
     449                 :            : 
     450                 :            : /* Returns the "acl_name" column's value from the "ACL" table in 'row'
     451                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
     452                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
     453                 :            :  * for a given key than implementing the same operation on the "cooked"
     454                 :            :  * form in 'row'.
     455                 :            :  *
     456                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
     457                 :            :  * (This helps to avoid silent bugs if someone changes acl_name's
     458                 :            :  * type without updating the caller.)
     459                 :            :  *
     460                 :            :  * The caller must not modify or free the returned value.
     461                 :            :  *
     462                 :            :  * Various kinds of changes can invalidate the returned value: modifying
     463                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
     464                 :            :  * If the returned value is needed for a long time, it is best to make a copy
     465                 :            :  * of it with ovsdb_datum_clone().
     466                 :            :  *
     467                 :            :  * This function is rarely useful, since it is easier to access the value
     468                 :            :  * directly through the "acl_name" member in vteprec_acl. */
     469                 :            : const struct ovsdb_datum *
     470                 :          0 : vteprec_acl_get_acl_name(const struct vteprec_acl *row,
     471                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
     472                 :            : {
     473         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
     474                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_col_acl_name);
     475                 :            : }
     476                 :            : 
     477                 :            : /* Sets the "acl_entries" column from the "ACL" table in 'row' to
     478                 :            :  * the 'acl_entries' set with 'n_acl_entries' entries.
     479                 :            :  *
     480                 :            :  * The caller retains ownership of the arguments. */
     481                 :            : void
     482                 :          0 : vteprec_acl_set_acl_entries(const struct vteprec_acl *row, struct vteprec_acl_entry **acl_entries, size_t n_acl_entries)
     483                 :            : {
     484                 :            :     struct ovsdb_datum datum;
     485                 :            :     size_t i;
     486                 :            : 
     487         [ #  # ]:          0 :     ovs_assert(inited);
     488                 :          0 :     datum.n = n_acl_entries;
     489         [ #  # ]:          0 :     datum.keys = n_acl_entries ? xmalloc(n_acl_entries * sizeof *datum.keys) : NULL;
     490                 :          0 :     datum.values = NULL;
     491         [ #  # ]:          0 :     for (i = 0; i < n_acl_entries; i++) {
     492                 :          0 :         datum.keys[i].uuid = acl_entries[i]->header_.uuid;
     493                 :            :     }
     494                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
     495                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES], &datum);
     496                 :          0 : }
     497                 :            : 
     498                 :            : /* Sets the "acl_fault_status" column from the "ACL" table in 'row' to
     499                 :            :  * the 'acl_fault_status' set with 'n_acl_fault_status' entries.
     500                 :            :  *
     501                 :            :  * The caller retains ownership of the arguments. */
     502                 :            : void
     503                 :          0 : vteprec_acl_set_acl_fault_status(const struct vteprec_acl *row, const char **acl_fault_status, size_t n_acl_fault_status)
     504                 :            : {
     505                 :            :     struct ovsdb_datum datum;
     506                 :            :     size_t i;
     507                 :            : 
     508         [ #  # ]:          0 :     ovs_assert(inited);
     509                 :          0 :     datum.n = n_acl_fault_status;
     510         [ #  # ]:          0 :     datum.keys = n_acl_fault_status ? xmalloc(n_acl_fault_status * sizeof *datum.keys) : NULL;
     511                 :          0 :     datum.values = NULL;
     512         [ #  # ]:          0 :     for (i = 0; i < n_acl_fault_status; i++) {
     513                 :          0 :         datum.keys[i].string = xstrdup(acl_fault_status[i]);
     514                 :            :     }
     515                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
     516                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS], &datum);
     517                 :          0 : }
     518                 :            : 
     519                 :            : /* Sets the "acl_name" column from the "ACL" table in 'row' to
     520                 :            :  * 'acl_name'.
     521                 :            :  *
     522                 :            :  * The caller retains ownership of the arguments. */
     523                 :            : void
     524                 :          0 : vteprec_acl_set_acl_name(const struct vteprec_acl *row, const char *acl_name)
     525                 :            : {
     526                 :            :     struct ovsdb_datum datum;
     527                 :            :     union ovsdb_atom key;
     528                 :            : 
     529         [ #  # ]:          0 :     ovs_assert(inited);
     530                 :          0 :     datum.n = 1;
     531                 :          0 :     datum.keys = &key;
     532                 :          0 :     key.string = CONST_CAST(char *, acl_name);
     533                 :          0 :     datum.values = NULL;
     534                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_NAME], &datum);
     535                 :          0 : }
     536                 :            : 
     537                 :            : /* Adds the value 'new_value' to the "acl_entries" set column from the "ACL" table
     538                 :            :  * in 'row'.
     539                 :            :  *
     540                 :            :  */
     541                 :            : void
     542                 :          0 : vteprec_acl_update_acl_entries_addvalue(const struct vteprec_acl *row, const struct vteprec_acl_entry *new_value)
     543                 :            : {
     544                 :            :     struct ovsdb_datum *datum;
     545                 :            : 
     546         [ #  # ]:          0 :     ovs_assert(inited);
     547                 :            : 
     548                 :          0 :     datum = xmalloc(sizeof *datum);
     549                 :          0 :     datum->n = 1;
     550                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
     551                 :          0 :     datum->values = NULL;
     552                 :            : 
     553                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
     554                 :            : 
     555                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
     556                 :            :                                     &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES],
     557                 :            :                                     datum);
     558                 :          0 : }
     559                 :            : 
     560                 :            : /* Deletes the value 'delete_value' from the "acl_entries" set column from the
     561                 :            :  * "ACL" table in 'row'.
     562                 :            :  *
     563                 :            :  */
     564                 :            : void
     565                 :          0 : vteprec_acl_update_acl_entries_delvalue(const struct vteprec_acl *row, const struct vteprec_acl_entry *delete_value)
     566                 :            : {
     567                 :            :     struct ovsdb_datum *datum;
     568                 :            : 
     569         [ #  # ]:          0 :     ovs_assert(inited);
     570                 :            : 
     571                 :          0 :     datum = xmalloc(sizeof *datum);
     572                 :          0 :     datum->n = 1;
     573                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
     574                 :          0 :     datum->values = NULL;
     575                 :            : 
     576                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
     577                 :            : 
     578                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
     579                 :            :                                     &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES],
     580                 :            :                                     datum);
     581                 :          0 : }
     582                 :            : 
     583                 :            : /* Adds the value 'new_value' to the "acl_fault_status" set column from the "ACL" table
     584                 :            :  * in 'row'.
     585                 :            :  *
     586                 :            :  */
     587                 :            : void
     588                 :          0 : vteprec_acl_update_acl_fault_status_addvalue(const struct vteprec_acl *row, const char *new_value)
     589                 :            : {
     590                 :            :     struct ovsdb_datum *datum;
     591                 :            : 
     592         [ #  # ]:          0 :     ovs_assert(inited);
     593                 :            : 
     594                 :          0 :     datum = xmalloc(sizeof *datum);
     595                 :          0 :     datum->n = 1;
     596                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
     597                 :          0 :     datum->values = NULL;
     598                 :            : 
     599                 :          0 :     datum->keys[0].string = xstrdup(new_value);
     600                 :            : 
     601                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
     602                 :            :                                     &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS],
     603                 :            :                                     datum);
     604                 :          0 : }
     605                 :            : 
     606                 :            : /* Deletes the value 'delete_value' from the "acl_fault_status" set column from the
     607                 :            :  * "ACL" table in 'row'.
     608                 :            :  *
     609                 :            :  */
     610                 :            : void
     611                 :          0 : vteprec_acl_update_acl_fault_status_delvalue(const struct vteprec_acl *row, const char *delete_value)
     612                 :            : {
     613                 :            :     struct ovsdb_datum *datum;
     614                 :            : 
     615         [ #  # ]:          0 :     ovs_assert(inited);
     616                 :            : 
     617                 :          0 :     datum = xmalloc(sizeof *datum);
     618                 :          0 :     datum->n = 1;
     619                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
     620                 :          0 :     datum->values = NULL;
     621                 :            : 
     622                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
     623                 :            : 
     624                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
     625                 :            :                                     &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS],
     626                 :            :                                     datum);
     627                 :          0 : }
     628                 :            : 
     629                 :            : /* Sets the "acl_entries" column from the "ACL" table in 'row' to
     630                 :            :  * the 'acl_entries' set with 'n_acl_entries' entries.
     631                 :            :  *
     632                 :            :  * The caller retains ownership of the arguments. */
     633                 :            : void
     634                 :          0 : vteprec_acl_add_clause_acl_entries(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **acl_entries, size_t n_acl_entries)
     635                 :            : {
     636                 :            :     struct ovsdb_datum datum;
     637                 :            :     size_t i;
     638                 :            : 
     639         [ #  # ]:          0 :     ovs_assert(inited);
     640                 :          0 :     datum.n = n_acl_entries;
     641         [ #  # ]:          0 :     datum.keys = n_acl_entries ? xmalloc(n_acl_entries * sizeof *datum.keys) : NULL;
     642                 :          0 :     datum.values = NULL;
     643         [ #  # ]:          0 :     for (i = 0; i < n_acl_entries; i++) {
     644                 :          0 :         datum.keys[i].uuid = *acl_entries[i];
     645                 :            :     }
     646                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
     647                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     648                 :            :                           function,
     649                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES],
     650                 :            :                           &datum);
     651                 :          0 :     free(datum.keys);
     652                 :          0 : }
     653                 :            : 
     654                 :            : /* Sets the "acl_fault_status" column from the "ACL" table in 'row' to
     655                 :            :  * the 'acl_fault_status' set with 'n_acl_fault_status' entries.
     656                 :            :  *
     657                 :            :  * The caller retains ownership of the arguments. */
     658                 :            : void
     659                 :          0 : vteprec_acl_add_clause_acl_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **acl_fault_status, size_t n_acl_fault_status)
     660                 :            : {
     661                 :            :     struct ovsdb_datum datum;
     662                 :            :     size_t i;
     663                 :            : 
     664         [ #  # ]:          0 :     ovs_assert(inited);
     665                 :          0 :     datum.n = n_acl_fault_status;
     666         [ #  # ]:          0 :     datum.keys = n_acl_fault_status ? xmalloc(n_acl_fault_status * sizeof *datum.keys) : NULL;
     667                 :          0 :     datum.values = NULL;
     668         [ #  # ]:          0 :     for (i = 0; i < n_acl_fault_status; i++) {
     669                 :          0 :         datum.keys[i].string = CONST_CAST(char *, acl_fault_status[i]);
     670                 :            :     }
     671                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
     672                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     673                 :            :                           function,
     674                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS],
     675                 :            :                           &datum);
     676                 :          0 :     free(datum.keys);
     677                 :          0 : }
     678                 :            : 
     679                 :            : /* Sets the "acl_name" column from the "ACL" table in 'row' to
     680                 :            :  * 'acl_name'.
     681                 :            :  *
     682                 :            :  * The caller retains ownership of the arguments. */
     683                 :            : void
     684                 :          0 : vteprec_acl_add_clause_acl_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *acl_name)
     685                 :            : {
     686                 :            :     struct ovsdb_datum datum;
     687                 :            :     union ovsdb_atom key;
     688                 :            : 
     689         [ #  # ]:          0 :     ovs_assert(inited);
     690                 :          0 :     datum.n = 1;
     691                 :          0 :     datum.keys = &key;
     692                 :          0 :     key.string = CONST_CAST(char *, acl_name);
     693                 :          0 :     datum.values = NULL;
     694                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     695                 :            :                           function,
     696                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_NAME],
     697                 :            :                           &datum);
     698                 :          0 : }
     699                 :            : void
     700                 :          0 : vteprec_acl_add_clause_false(struct ovsdb_idl *idl)
     701                 :            : {
     702                 :            :     struct ovsdb_datum datum;
     703                 :            : 
     704                 :          0 :     ovsdb_datum_init_empty(&datum);
     705                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL], OVSDB_F_FALSE, NULL, &datum);
     706                 :          0 : }
     707                 :            : void
     708                 :          0 : vteprec_acl_add_clause_true(struct ovsdb_idl *idl)
     709                 :            : {
     710                 :            :     struct ovsdb_datum datum;
     711                 :            : 
     712                 :          0 :     ovsdb_datum_init_empty(&datum);
     713                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL], OVSDB_F_TRUE, NULL, &datum);
     714                 :          0 : }
     715                 :            : 
     716                 :            : /* Sets the "acl_entries" column from the "ACL" table in 'row' to
     717                 :            :  * the 'acl_entries' set with 'n_acl_entries' entries.
     718                 :            :  *
     719                 :            :  * The caller retains ownership of the arguments. */
     720                 :            : void
     721                 :          0 : vteprec_acl_remove_clause_acl_entries(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **acl_entries, size_t n_acl_entries)
     722                 :            : {
     723                 :            :     struct ovsdb_datum datum;
     724                 :            :     size_t i;
     725                 :            : 
     726         [ #  # ]:          0 :     ovs_assert(inited);
     727                 :          0 :     datum.n = n_acl_entries;
     728         [ #  # ]:          0 :     datum.keys = n_acl_entries ? xmalloc(n_acl_entries * sizeof *datum.keys) : NULL;
     729                 :          0 :     datum.values = NULL;
     730         [ #  # ]:          0 :     for (i = 0; i < n_acl_entries; i++) {
     731                 :          0 :         datum.keys[i].uuid = *acl_entries[i];
     732                 :            :     }
     733                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
     734                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     735                 :            :                           function,
     736                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_ENTRIES],
     737                 :            :                           &datum);
     738                 :          0 :     free(datum.keys);
     739                 :          0 : }
     740                 :            : 
     741                 :            : /* Sets the "acl_fault_status" column from the "ACL" table in 'row' to
     742                 :            :  * the 'acl_fault_status' set with 'n_acl_fault_status' entries.
     743                 :            :  *
     744                 :            :  * The caller retains ownership of the arguments. */
     745                 :            : void
     746                 :          0 : vteprec_acl_remove_clause_acl_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **acl_fault_status, size_t n_acl_fault_status)
     747                 :            : {
     748                 :            :     struct ovsdb_datum datum;
     749                 :            :     size_t i;
     750                 :            : 
     751         [ #  # ]:          0 :     ovs_assert(inited);
     752                 :          0 :     datum.n = n_acl_fault_status;
     753         [ #  # ]:          0 :     datum.keys = n_acl_fault_status ? xmalloc(n_acl_fault_status * sizeof *datum.keys) : NULL;
     754                 :          0 :     datum.values = NULL;
     755         [ #  # ]:          0 :     for (i = 0; i < n_acl_fault_status; i++) {
     756                 :          0 :         datum.keys[i].string = CONST_CAST(char *, acl_fault_status[i]);
     757                 :            :     }
     758                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
     759                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     760                 :            :                           function,
     761                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_FAULT_STATUS],
     762                 :            :                           &datum);
     763                 :          0 :     free(datum.keys);
     764                 :          0 : }
     765                 :            : 
     766                 :            : /* Sets the "acl_name" column from the "ACL" table in 'row' to
     767                 :            :  * 'acl_name'.
     768                 :            :  *
     769                 :            :  * The caller retains ownership of the arguments. */
     770                 :            : void
     771                 :          0 : vteprec_acl_remove_clause_acl_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *acl_name)
     772                 :            : {
     773                 :            :     struct ovsdb_datum datum;
     774                 :            :     union ovsdb_atom key;
     775                 :            : 
     776         [ #  # ]:          0 :     ovs_assert(inited);
     777                 :          0 :     datum.n = 1;
     778                 :          0 :     datum.keys = &key;
     779                 :          0 :     key.string = CONST_CAST(char *, acl_name);
     780                 :          0 :     datum.values = NULL;
     781                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL],
     782                 :            :                           function,
     783                 :            :                           &vteprec_acl_columns[VTEPREC_ACL_COL_ACL_NAME],
     784                 :            :                           &datum);
     785                 :          0 : }
     786                 :            : void
     787                 :          0 : vteprec_acl_remove_clause_false(struct ovsdb_idl *idl)
     788                 :            : {
     789                 :            :     struct ovsdb_datum datum;
     790                 :            : 
     791                 :          0 :     ovsdb_datum_init_empty(&datum);
     792                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL], OVSDB_F_FALSE, NULL, &datum);
     793                 :          0 : }
     794                 :            : void
     795                 :          0 : vteprec_acl_remove_clause_true(struct ovsdb_idl *idl)
     796                 :            : {
     797                 :            :     struct ovsdb_datum datum;
     798                 :            : 
     799                 :          0 :     ovsdb_datum_init_empty(&datum);
     800                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL], OVSDB_F_TRUE, NULL, &datum);
     801                 :          0 : }
     802                 :            : 
     803                 :            : struct ovsdb_idl_column vteprec_acl_columns[VTEPREC_ACL_N_COLUMNS];
     804                 :            : 
     805                 :            : static void
     806                 :        741 : vteprec_acl_columns_init(void)
     807                 :            : {
     808                 :            :     struct ovsdb_idl_column *c;
     809                 :            : 
     810                 :            :     /* Initialize vteprec_acl_col_acl_entries. */
     811                 :        741 :     c = &vteprec_acl_col_acl_entries;
     812                 :        741 :     c->name = "acl_entries";
     813                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
     814                 :        741 :     c->type.key.u.uuid.refTableName = "ACL_entry";
     815                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
     816                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
     817                 :        741 :     c->type.n_min = 1;
     818                 :        741 :     c->type.n_max = UINT_MAX;
     819                 :        741 :     c->mutable = true;
     820                 :        741 :     c->parse = vteprec_acl_parse_acl_entries;
     821                 :        741 :     c->unparse = vteprec_acl_unparse_acl_entries;
     822                 :            : 
     823                 :            :     /* Initialize vteprec_acl_col_acl_fault_status. */
     824                 :        741 :     c = &vteprec_acl_col_acl_fault_status;
     825                 :        741 :     c->name = "acl_fault_status";
     826                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
     827                 :        741 :     c->type.key.u.string.minLen = 0;
     828                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
     829                 :        741 :     c->type.n_min = 0;
     830                 :        741 :     c->type.n_max = UINT_MAX;
     831                 :        741 :     c->mutable = true;
     832                 :        741 :     c->parse = vteprec_acl_parse_acl_fault_status;
     833                 :        741 :     c->unparse = vteprec_acl_unparse_acl_fault_status;
     834                 :            : 
     835                 :            :     /* Initialize vteprec_acl_col_acl_name. */
     836                 :        741 :     c = &vteprec_acl_col_acl_name;
     837                 :        741 :     c->name = "acl_name";
     838                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
     839                 :        741 :     c->type.key.u.string.minLen = 0;
     840                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
     841                 :        741 :     c->type.n_min = 1;
     842                 :        741 :     c->type.n_max = 1;
     843                 :        741 :     c->mutable = true;
     844                 :        741 :     c->parse = vteprec_acl_parse_acl_name;
     845                 :        741 :     c->unparse = vteprec_acl_unparse_acl_name;
     846                 :        741 : }
     847                 :            : 
     848                 :            : /* ACL_entry table. */
     849                 :            : 
     850                 :            : static void
     851                 :          0 : vteprec_acl_entry_parse_acle_fault_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     852                 :            : {
     853                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     854                 :            :     size_t i;
     855                 :            : 
     856         [ #  # ]:          0 :     ovs_assert(inited);
     857                 :          0 :     row->acle_fault_status = NULL;
     858                 :          0 :     row->n_acle_fault_status = 0;
     859         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
     860         [ #  # ]:          0 :         if (!row->n_acle_fault_status) {
     861                 :          0 :             row->acle_fault_status = xmalloc(datum->n * sizeof *row->acle_fault_status);
     862                 :            :         }
     863                 :          0 :         row->acle_fault_status[row->n_acle_fault_status] = datum->keys[i].string;
     864                 :          0 :         row->n_acle_fault_status++;
     865                 :            :     }
     866                 :          0 : }
     867                 :            : 
     868                 :            : static void
     869                 :          0 : vteprec_acl_entry_parse_action(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     870                 :            : {
     871                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     872                 :            : 
     873         [ #  # ]:          0 :     ovs_assert(inited);
     874         [ #  # ]:          0 :     if (datum->n >= 1) {
     875                 :          0 :         row->action = datum->keys[0].string;
     876                 :            :     } else {
     877                 :          0 :         row->action = "";
     878                 :            :     }
     879                 :          0 : }
     880                 :            : 
     881                 :            : static void
     882                 :          0 : vteprec_acl_entry_parse_dest_ip(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     883                 :            : {
     884                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     885                 :            : 
     886         [ #  # ]:          0 :     ovs_assert(inited);
     887         [ #  # ]:          0 :     if (datum->n >= 1) {
     888                 :          0 :         row->dest_ip = datum->keys[0].string;
     889                 :            :     } else {
     890                 :          0 :         row->dest_ip = NULL;
     891                 :            :     }
     892                 :          0 : }
     893                 :            : 
     894                 :            : static void
     895                 :          0 : vteprec_acl_entry_parse_dest_mac(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     896                 :            : {
     897                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     898                 :            : 
     899         [ #  # ]:          0 :     ovs_assert(inited);
     900         [ #  # ]:          0 :     if (datum->n >= 1) {
     901                 :          0 :         row->dest_mac = datum->keys[0].string;
     902                 :            :     } else {
     903                 :          0 :         row->dest_mac = NULL;
     904                 :            :     }
     905                 :          0 : }
     906                 :            : 
     907                 :            : static void
     908                 :          0 : vteprec_acl_entry_parse_dest_mask(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     909                 :            : {
     910                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     911                 :            : 
     912         [ #  # ]:          0 :     ovs_assert(inited);
     913         [ #  # ]:          0 :     if (datum->n >= 1) {
     914                 :          0 :         row->dest_mask = datum->keys[0].string;
     915                 :            :     } else {
     916                 :          0 :         row->dest_mask = NULL;
     917                 :            :     }
     918                 :          0 : }
     919                 :            : 
     920                 :            : static void
     921                 :          0 : vteprec_acl_entry_parse_dest_port_max(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     922                 :            : {
     923                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     924                 :          0 :     size_t n = MIN(1, datum->n);
     925                 :            :     size_t i;
     926                 :            : 
     927         [ #  # ]:          0 :     ovs_assert(inited);
     928                 :          0 :     row->dest_port_max = NULL;
     929                 :          0 :     row->n_dest_port_max = 0;
     930         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
     931         [ #  # ]:          0 :         if (!row->n_dest_port_max) {
     932                 :          0 :             row->dest_port_max = xmalloc(n * sizeof *row->dest_port_max);
     933                 :            :         }
     934                 :          0 :         row->dest_port_max[row->n_dest_port_max] = datum->keys[i].integer;
     935                 :          0 :         row->n_dest_port_max++;
     936                 :            :     }
     937                 :          0 : }
     938                 :            : 
     939                 :            : static void
     940                 :          0 : vteprec_acl_entry_parse_dest_port_min(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     941                 :            : {
     942                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     943                 :          0 :     size_t n = MIN(1, datum->n);
     944                 :            :     size_t i;
     945                 :            : 
     946         [ #  # ]:          0 :     ovs_assert(inited);
     947                 :          0 :     row->dest_port_min = NULL;
     948                 :          0 :     row->n_dest_port_min = 0;
     949         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
     950         [ #  # ]:          0 :         if (!row->n_dest_port_min) {
     951                 :          0 :             row->dest_port_min = xmalloc(n * sizeof *row->dest_port_min);
     952                 :            :         }
     953                 :          0 :         row->dest_port_min[row->n_dest_port_min] = datum->keys[i].integer;
     954                 :          0 :         row->n_dest_port_min++;
     955                 :            :     }
     956                 :          0 : }
     957                 :            : 
     958                 :            : static void
     959                 :          0 : vteprec_acl_entry_parse_direction(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     960                 :            : {
     961                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     962                 :            : 
     963         [ #  # ]:          0 :     ovs_assert(inited);
     964         [ #  # ]:          0 :     if (datum->n >= 1) {
     965                 :          0 :         row->direction = datum->keys[0].string;
     966                 :            :     } else {
     967                 :          0 :         row->direction = "";
     968                 :            :     }
     969                 :          0 : }
     970                 :            : 
     971                 :            : static void
     972                 :          0 : vteprec_acl_entry_parse_ethertype(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     973                 :            : {
     974                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     975                 :            : 
     976         [ #  # ]:          0 :     ovs_assert(inited);
     977         [ #  # ]:          0 :     if (datum->n >= 1) {
     978                 :          0 :         row->ethertype = datum->keys[0].string;
     979                 :            :     } else {
     980                 :          0 :         row->ethertype = NULL;
     981                 :            :     }
     982                 :          0 : }
     983                 :            : 
     984                 :            : static void
     985                 :          0 : vteprec_acl_entry_parse_icmp_code(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
     986                 :            : {
     987                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
     988                 :          0 :     size_t n = MIN(1, datum->n);
     989                 :            :     size_t i;
     990                 :            : 
     991         [ #  # ]:          0 :     ovs_assert(inited);
     992                 :          0 :     row->icmp_code = NULL;
     993                 :          0 :     row->n_icmp_code = 0;
     994         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
     995         [ #  # ]:          0 :         if (!row->n_icmp_code) {
     996                 :          0 :             row->icmp_code = xmalloc(n * sizeof *row->icmp_code);
     997                 :            :         }
     998                 :          0 :         row->icmp_code[row->n_icmp_code] = datum->keys[i].integer;
     999                 :          0 :         row->n_icmp_code++;
    1000                 :            :     }
    1001                 :          0 : }
    1002                 :            : 
    1003                 :            : static void
    1004                 :          0 : vteprec_acl_entry_parse_icmp_type(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1005                 :            : {
    1006                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1007                 :          0 :     size_t n = MIN(1, datum->n);
    1008                 :            :     size_t i;
    1009                 :            : 
    1010         [ #  # ]:          0 :     ovs_assert(inited);
    1011                 :          0 :     row->icmp_type = NULL;
    1012                 :          0 :     row->n_icmp_type = 0;
    1013         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1014         [ #  # ]:          0 :         if (!row->n_icmp_type) {
    1015                 :          0 :             row->icmp_type = xmalloc(n * sizeof *row->icmp_type);
    1016                 :            :         }
    1017                 :          0 :         row->icmp_type[row->n_icmp_type] = datum->keys[i].integer;
    1018                 :          0 :         row->n_icmp_type++;
    1019                 :            :     }
    1020                 :          0 : }
    1021                 :            : 
    1022                 :            : static void
    1023                 :          0 : vteprec_acl_entry_parse_protocol(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1024                 :            : {
    1025                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1026                 :          0 :     size_t n = MIN(1, datum->n);
    1027                 :            :     size_t i;
    1028                 :            : 
    1029         [ #  # ]:          0 :     ovs_assert(inited);
    1030                 :          0 :     row->protocol = NULL;
    1031                 :          0 :     row->n_protocol = 0;
    1032         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1033         [ #  # ]:          0 :         if (!row->n_protocol) {
    1034                 :          0 :             row->protocol = xmalloc(n * sizeof *row->protocol);
    1035                 :            :         }
    1036                 :          0 :         row->protocol[row->n_protocol] = datum->keys[i].integer;
    1037                 :          0 :         row->n_protocol++;
    1038                 :            :     }
    1039                 :          0 : }
    1040                 :            : 
    1041                 :            : static void
    1042                 :          0 : vteprec_acl_entry_parse_sequence(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1043                 :            : {
    1044                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1045                 :            : 
    1046         [ #  # ]:          0 :     ovs_assert(inited);
    1047         [ #  # ]:          0 :     if (datum->n >= 1) {
    1048                 :          0 :         row->sequence = datum->keys[0].integer;
    1049                 :            :     } else {
    1050                 :          0 :         row->sequence = 0;
    1051                 :            :     }
    1052                 :          0 : }
    1053                 :            : 
    1054                 :            : static void
    1055                 :          0 : vteprec_acl_entry_parse_source_ip(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1056                 :            : {
    1057                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1058                 :            : 
    1059         [ #  # ]:          0 :     ovs_assert(inited);
    1060         [ #  # ]:          0 :     if (datum->n >= 1) {
    1061                 :          0 :         row->source_ip = datum->keys[0].string;
    1062                 :            :     } else {
    1063                 :          0 :         row->source_ip = NULL;
    1064                 :            :     }
    1065                 :          0 : }
    1066                 :            : 
    1067                 :            : static void
    1068                 :          0 : vteprec_acl_entry_parse_source_mac(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1069                 :            : {
    1070                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1071                 :            : 
    1072         [ #  # ]:          0 :     ovs_assert(inited);
    1073         [ #  # ]:          0 :     if (datum->n >= 1) {
    1074                 :          0 :         row->source_mac = datum->keys[0].string;
    1075                 :            :     } else {
    1076                 :          0 :         row->source_mac = NULL;
    1077                 :            :     }
    1078                 :          0 : }
    1079                 :            : 
    1080                 :            : static void
    1081                 :          0 : vteprec_acl_entry_parse_source_mask(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1082                 :            : {
    1083                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1084                 :            : 
    1085         [ #  # ]:          0 :     ovs_assert(inited);
    1086         [ #  # ]:          0 :     if (datum->n >= 1) {
    1087                 :          0 :         row->source_mask = datum->keys[0].string;
    1088                 :            :     } else {
    1089                 :          0 :         row->source_mask = NULL;
    1090                 :            :     }
    1091                 :          0 : }
    1092                 :            : 
    1093                 :            : static void
    1094                 :          0 : vteprec_acl_entry_parse_source_port_max(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1095                 :            : {
    1096                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1097                 :          0 :     size_t n = MIN(1, datum->n);
    1098                 :            :     size_t i;
    1099                 :            : 
    1100         [ #  # ]:          0 :     ovs_assert(inited);
    1101                 :          0 :     row->source_port_max = NULL;
    1102                 :          0 :     row->n_source_port_max = 0;
    1103         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1104         [ #  # ]:          0 :         if (!row->n_source_port_max) {
    1105                 :          0 :             row->source_port_max = xmalloc(n * sizeof *row->source_port_max);
    1106                 :            :         }
    1107                 :          0 :         row->source_port_max[row->n_source_port_max] = datum->keys[i].integer;
    1108                 :          0 :         row->n_source_port_max++;
    1109                 :            :     }
    1110                 :          0 : }
    1111                 :            : 
    1112                 :            : static void
    1113                 :          0 : vteprec_acl_entry_parse_source_port_min(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1114                 :            : {
    1115                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1116                 :          0 :     size_t n = MIN(1, datum->n);
    1117                 :            :     size_t i;
    1118                 :            : 
    1119         [ #  # ]:          0 :     ovs_assert(inited);
    1120                 :          0 :     row->source_port_min = NULL;
    1121                 :          0 :     row->n_source_port_min = 0;
    1122         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1123         [ #  # ]:          0 :         if (!row->n_source_port_min) {
    1124                 :          0 :             row->source_port_min = xmalloc(n * sizeof *row->source_port_min);
    1125                 :            :         }
    1126                 :          0 :         row->source_port_min[row->n_source_port_min] = datum->keys[i].integer;
    1127                 :          0 :         row->n_source_port_min++;
    1128                 :            :     }
    1129                 :          0 : }
    1130                 :            : 
    1131                 :            : static void
    1132                 :          0 : vteprec_acl_entry_parse_tcp_flags(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1133                 :            : {
    1134                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1135                 :          0 :     size_t n = MIN(1, datum->n);
    1136                 :            :     size_t i;
    1137                 :            : 
    1138         [ #  # ]:          0 :     ovs_assert(inited);
    1139                 :          0 :     row->tcp_flags = NULL;
    1140                 :          0 :     row->n_tcp_flags = 0;
    1141         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1142         [ #  # ]:          0 :         if (!row->n_tcp_flags) {
    1143                 :          0 :             row->tcp_flags = xmalloc(n * sizeof *row->tcp_flags);
    1144                 :            :         }
    1145                 :          0 :         row->tcp_flags[row->n_tcp_flags] = datum->keys[i].integer;
    1146                 :          0 :         row->n_tcp_flags++;
    1147                 :            :     }
    1148                 :          0 : }
    1149                 :            : 
    1150                 :            : static void
    1151                 :          0 : vteprec_acl_entry_parse_tcp_flags_mask(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    1152                 :            : {
    1153                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1154                 :          0 :     size_t n = MIN(1, datum->n);
    1155                 :            :     size_t i;
    1156                 :            : 
    1157         [ #  # ]:          0 :     ovs_assert(inited);
    1158                 :          0 :     row->tcp_flags_mask = NULL;
    1159                 :          0 :     row->n_tcp_flags_mask = 0;
    1160         [ #  # ]:          0 :     for (i = 0; i < n; i++) {
    1161         [ #  # ]:          0 :         if (!row->n_tcp_flags_mask) {
    1162                 :          0 :             row->tcp_flags_mask = xmalloc(n * sizeof *row->tcp_flags_mask);
    1163                 :            :         }
    1164                 :          0 :         row->tcp_flags_mask[row->n_tcp_flags_mask] = datum->keys[i].integer;
    1165                 :          0 :         row->n_tcp_flags_mask++;
    1166                 :            :     }
    1167                 :          0 : }
    1168                 :            : 
    1169                 :            : static void
    1170                 :          0 : vteprec_acl_entry_unparse_acle_fault_status(struct ovsdb_idl_row *row_)
    1171                 :            : {
    1172                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1173                 :            : 
    1174         [ #  # ]:          0 :     ovs_assert(inited);
    1175                 :          0 :     free(row->acle_fault_status);
    1176                 :          0 : }
    1177                 :            : 
    1178                 :            : static void
    1179                 :          0 : vteprec_acl_entry_unparse_action(struct ovsdb_idl_row *row OVS_UNUSED)
    1180                 :            : {
    1181                 :            :     /* Nothing to do. */
    1182                 :          0 : }
    1183                 :            : 
    1184                 :            : static void
    1185                 :          0 : vteprec_acl_entry_unparse_dest_ip(struct ovsdb_idl_row *row OVS_UNUSED)
    1186                 :            : {
    1187                 :            :     /* Nothing to do. */
    1188                 :          0 : }
    1189                 :            : 
    1190                 :            : static void
    1191                 :          0 : vteprec_acl_entry_unparse_dest_mac(struct ovsdb_idl_row *row OVS_UNUSED)
    1192                 :            : {
    1193                 :            :     /* Nothing to do. */
    1194                 :          0 : }
    1195                 :            : 
    1196                 :            : static void
    1197                 :          0 : vteprec_acl_entry_unparse_dest_mask(struct ovsdb_idl_row *row OVS_UNUSED)
    1198                 :            : {
    1199                 :            :     /* Nothing to do. */
    1200                 :          0 : }
    1201                 :            : 
    1202                 :            : static void
    1203                 :          0 : vteprec_acl_entry_unparse_dest_port_max(struct ovsdb_idl_row *row_)
    1204                 :            : {
    1205                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1206                 :            : 
    1207         [ #  # ]:          0 :     ovs_assert(inited);
    1208                 :          0 :     free(row->dest_port_max);
    1209                 :          0 : }
    1210                 :            : 
    1211                 :            : static void
    1212                 :          0 : vteprec_acl_entry_unparse_dest_port_min(struct ovsdb_idl_row *row_)
    1213                 :            : {
    1214                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1215                 :            : 
    1216         [ #  # ]:          0 :     ovs_assert(inited);
    1217                 :          0 :     free(row->dest_port_min);
    1218                 :          0 : }
    1219                 :            : 
    1220                 :            : static void
    1221                 :          0 : vteprec_acl_entry_unparse_direction(struct ovsdb_idl_row *row OVS_UNUSED)
    1222                 :            : {
    1223                 :            :     /* Nothing to do. */
    1224                 :          0 : }
    1225                 :            : 
    1226                 :            : static void
    1227                 :          0 : vteprec_acl_entry_unparse_ethertype(struct ovsdb_idl_row *row OVS_UNUSED)
    1228                 :            : {
    1229                 :            :     /* Nothing to do. */
    1230                 :          0 : }
    1231                 :            : 
    1232                 :            : static void
    1233                 :          0 : vteprec_acl_entry_unparse_icmp_code(struct ovsdb_idl_row *row_)
    1234                 :            : {
    1235                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1236                 :            : 
    1237         [ #  # ]:          0 :     ovs_assert(inited);
    1238                 :          0 :     free(row->icmp_code);
    1239                 :          0 : }
    1240                 :            : 
    1241                 :            : static void
    1242                 :          0 : vteprec_acl_entry_unparse_icmp_type(struct ovsdb_idl_row *row_)
    1243                 :            : {
    1244                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1245                 :            : 
    1246         [ #  # ]:          0 :     ovs_assert(inited);
    1247                 :          0 :     free(row->icmp_type);
    1248                 :          0 : }
    1249                 :            : 
    1250                 :            : static void
    1251                 :          0 : vteprec_acl_entry_unparse_protocol(struct ovsdb_idl_row *row_)
    1252                 :            : {
    1253                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1254                 :            : 
    1255         [ #  # ]:          0 :     ovs_assert(inited);
    1256                 :          0 :     free(row->protocol);
    1257                 :          0 : }
    1258                 :            : 
    1259                 :            : static void
    1260                 :          0 : vteprec_acl_entry_unparse_sequence(struct ovsdb_idl_row *row OVS_UNUSED)
    1261                 :            : {
    1262                 :            :     /* Nothing to do. */
    1263                 :          0 : }
    1264                 :            : 
    1265                 :            : static void
    1266                 :          0 : vteprec_acl_entry_unparse_source_ip(struct ovsdb_idl_row *row OVS_UNUSED)
    1267                 :            : {
    1268                 :            :     /* Nothing to do. */
    1269                 :          0 : }
    1270                 :            : 
    1271                 :            : static void
    1272                 :          0 : vteprec_acl_entry_unparse_source_mac(struct ovsdb_idl_row *row OVS_UNUSED)
    1273                 :            : {
    1274                 :            :     /* Nothing to do. */
    1275                 :          0 : }
    1276                 :            : 
    1277                 :            : static void
    1278                 :          0 : vteprec_acl_entry_unparse_source_mask(struct ovsdb_idl_row *row OVS_UNUSED)
    1279                 :            : {
    1280                 :            :     /* Nothing to do. */
    1281                 :          0 : }
    1282                 :            : 
    1283                 :            : static void
    1284                 :          0 : vteprec_acl_entry_unparse_source_port_max(struct ovsdb_idl_row *row_)
    1285                 :            : {
    1286                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1287                 :            : 
    1288         [ #  # ]:          0 :     ovs_assert(inited);
    1289                 :          0 :     free(row->source_port_max);
    1290                 :          0 : }
    1291                 :            : 
    1292                 :            : static void
    1293                 :          0 : vteprec_acl_entry_unparse_source_port_min(struct ovsdb_idl_row *row_)
    1294                 :            : {
    1295                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1296                 :            : 
    1297         [ #  # ]:          0 :     ovs_assert(inited);
    1298                 :          0 :     free(row->source_port_min);
    1299                 :          0 : }
    1300                 :            : 
    1301                 :            : static void
    1302                 :          0 : vteprec_acl_entry_unparse_tcp_flags(struct ovsdb_idl_row *row_)
    1303                 :            : {
    1304                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1305                 :            : 
    1306         [ #  # ]:          0 :     ovs_assert(inited);
    1307                 :          0 :     free(row->tcp_flags);
    1308                 :          0 : }
    1309                 :            : 
    1310                 :            : static void
    1311                 :          0 : vteprec_acl_entry_unparse_tcp_flags_mask(struct ovsdb_idl_row *row_)
    1312                 :            : {
    1313                 :          0 :     struct vteprec_acl_entry *row = vteprec_acl_entry_cast(row_);
    1314                 :            : 
    1315         [ #  # ]:          0 :     ovs_assert(inited);
    1316                 :          0 :     free(row->tcp_flags_mask);
    1317                 :          0 : }
    1318                 :            : 
    1319                 :            : static void
    1320                 :          0 : vteprec_acl_entry_init__(struct ovsdb_idl_row *row)
    1321                 :            : {
    1322                 :          0 :     vteprec_acl_entry_init(vteprec_acl_entry_cast(row));
    1323                 :          0 : }
    1324                 :            : 
    1325                 :            : /* Clears the contents of 'row' in table "ACL_entry". */
    1326                 :            : void
    1327                 :          0 : vteprec_acl_entry_init(struct vteprec_acl_entry *row)
    1328                 :            : {
    1329                 :          0 :     memset(row, 0, sizeof *row); 
    1330                 :          0 : }
    1331                 :            : 
    1332                 :            : /* Searches table "ACL_entry" in 'idl' for a row with UUID 'uuid'.  Returns
    1333                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    1334                 :            : const struct vteprec_acl_entry *
    1335                 :          0 : vteprec_acl_entry_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    1336                 :            : {
    1337                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], uuid));
    1338                 :            : }
    1339                 :            : 
    1340                 :            : /* Returns a row in table "ACL_entry" in 'idl', or a null pointer if that
    1341                 :            :  * table is empty.
    1342                 :            :  *
    1343                 :            :  * Database tables are internally maintained as hash tables, so adding or
    1344                 :            :  * removing rows while traversing the same table can cause some rows to be
    1345                 :            :  * visited twice or not at apply. */
    1346                 :            : const struct vteprec_acl_entry *
    1347                 :          0 : vteprec_acl_entry_first(const struct ovsdb_idl *idl)
    1348                 :            : {
    1349                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY]));
    1350                 :            : }
    1351                 :            : 
    1352                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    1353                 :            :  * is the last row in its table. */
    1354                 :            : const struct vteprec_acl_entry *
    1355                 :          0 : vteprec_acl_entry_next(const struct vteprec_acl_entry *row)
    1356                 :            : {
    1357                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_next_row(&row->header_));
    1358                 :            : }
    1359                 :            : 
    1360                 :          0 : unsigned int vteprec_acl_entry_get_seqno(const struct ovsdb_idl *idl)
    1361                 :            : {
    1362                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY]);
    1363                 :            : }
    1364                 :            : 
    1365                 :          0 : unsigned int vteprec_acl_entry_row_get_seqno(const struct vteprec_acl_entry *row, enum ovsdb_idl_change change)
    1366                 :            : {
    1367                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    1368                 :            : }
    1369                 :            : 
    1370                 :            : const struct vteprec_acl_entry *
    1371                 :          0 : vteprec_acl_entry_track_get_first(const struct ovsdb_idl *idl)
    1372                 :            : {
    1373                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY]));
    1374                 :            : }
    1375                 :            : 
    1376                 :            : const struct vteprec_acl_entry
    1377                 :          0 : *vteprec_acl_entry_track_get_next(const struct vteprec_acl_entry *row)
    1378                 :            : {
    1379                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_track_get_next(&row->header_));
    1380                 :            : }
    1381                 :            : 
    1382                 :            : 
    1383                 :            : /* Deletes 'row' from table "ACL_entry".  'row' may be freed, so it must not be
    1384                 :            :  * accessed afterward.
    1385                 :            :  *
    1386                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1387                 :            : void
    1388                 :          0 : vteprec_acl_entry_delete(const struct vteprec_acl_entry *row)
    1389                 :            : {
    1390                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    1391                 :          0 : }
    1392                 :            : 
    1393                 :            : /* Inserts and returns a new row in the table "ACL_entry" in the database
    1394                 :            :  * with open transaction 'txn'.
    1395                 :            :  *
    1396                 :            :  * The new row is assigned a randomly generated provisional UUID.
    1397                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    1398                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    1399                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    1400                 :            : struct vteprec_acl_entry *
    1401                 :          0 : vteprec_acl_entry_insert(struct ovsdb_idl_txn *txn)
    1402                 :            : {
    1403                 :          0 :     return vteprec_acl_entry_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], NULL));
    1404                 :            : }
    1405                 :            : 
    1406                 :            : bool
    1407                 :          0 : vteprec_acl_entry_is_updated(const struct vteprec_acl_entry *row, enum vteprec_acl_entry_column_id column)
    1408                 :            : {
    1409                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_acl_entry_columns[column]);
    1410                 :            : }
    1411                 :            : 
    1412                 :            : /* Causes the original contents of column "acle_fault_status" in 'row' to be
    1413                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1414                 :            :  * "acle_fault_status" in 'row' changed (or if 'row' was deleted) between the
    1415                 :            :  * time that the IDL originally read its contents and the time that the
    1416                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1417                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1418                 :            :  * change has already been received).
    1419                 :            :  *
    1420                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1421                 :            :  * reads, an application should call this function any time "acle_fault_status" is
    1422                 :            :  * read as part of a read-modify-write operation.
    1423                 :            :  *
    1424                 :            :  * In some cases this function reduces to a no-op, because the current value
    1425                 :            :  * of "acle_fault_status" is already known:
    1426                 :            :  *
    1427                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1428                 :            :  *     vteprec_acl_entry_insert()).
    1429                 :            :  *
    1430                 :            :  *   - If "acle_fault_status" has already been modified (with
    1431                 :            :  *     vteprec_acl_entry_set_acle_fault_status()) within the current transaction.
    1432                 :            :  *
    1433                 :            :  * Because of the latter property, always call this function *before*
    1434                 :            :  * vteprec_acl_entry_set_acle_fault_status() for a given read-modify-write.
    1435                 :            :  *
    1436                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1437                 :            : void
    1438                 :          0 : vteprec_acl_entry_verify_acle_fault_status(const struct vteprec_acl_entry *row)
    1439                 :            : {
    1440         [ #  # ]:          0 :     ovs_assert(inited);
    1441                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS]);
    1442                 :          0 : }
    1443                 :            : 
    1444                 :            : /* Causes the original contents of column "action" in 'row' to be
    1445                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1446                 :            :  * "action" in 'row' changed (or if 'row' was deleted) between the
    1447                 :            :  * time that the IDL originally read its contents and the time that the
    1448                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1449                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1450                 :            :  * change has already been received).
    1451                 :            :  *
    1452                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1453                 :            :  * reads, an application should call this function any time "action" is
    1454                 :            :  * read as part of a read-modify-write operation.
    1455                 :            :  *
    1456                 :            :  * In some cases this function reduces to a no-op, because the current value
    1457                 :            :  * of "action" is already known:
    1458                 :            :  *
    1459                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1460                 :            :  *     vteprec_acl_entry_insert()).
    1461                 :            :  *
    1462                 :            :  *   - If "action" has already been modified (with
    1463                 :            :  *     vteprec_acl_entry_set_action()) within the current transaction.
    1464                 :            :  *
    1465                 :            :  * Because of the latter property, always call this function *before*
    1466                 :            :  * vteprec_acl_entry_set_action() for a given read-modify-write.
    1467                 :            :  *
    1468                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1469                 :            : void
    1470                 :          0 : vteprec_acl_entry_verify_action(const struct vteprec_acl_entry *row)
    1471                 :            : {
    1472         [ #  # ]:          0 :     ovs_assert(inited);
    1473                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACTION]);
    1474                 :          0 : }
    1475                 :            : 
    1476                 :            : /* Causes the original contents of column "dest_ip" in 'row' to be
    1477                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1478                 :            :  * "dest_ip" in 'row' changed (or if 'row' was deleted) between the
    1479                 :            :  * time that the IDL originally read its contents and the time that the
    1480                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1481                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1482                 :            :  * change has already been received).
    1483                 :            :  *
    1484                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1485                 :            :  * reads, an application should call this function any time "dest_ip" is
    1486                 :            :  * read as part of a read-modify-write operation.
    1487                 :            :  *
    1488                 :            :  * In some cases this function reduces to a no-op, because the current value
    1489                 :            :  * of "dest_ip" is already known:
    1490                 :            :  *
    1491                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1492                 :            :  *     vteprec_acl_entry_insert()).
    1493                 :            :  *
    1494                 :            :  *   - If "dest_ip" has already been modified (with
    1495                 :            :  *     vteprec_acl_entry_set_dest_ip()) within the current transaction.
    1496                 :            :  *
    1497                 :            :  * Because of the latter property, always call this function *before*
    1498                 :            :  * vteprec_acl_entry_set_dest_ip() for a given read-modify-write.
    1499                 :            :  *
    1500                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1501                 :            : void
    1502                 :          0 : vteprec_acl_entry_verify_dest_ip(const struct vteprec_acl_entry *row)
    1503                 :            : {
    1504         [ #  # ]:          0 :     ovs_assert(inited);
    1505                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP]);
    1506                 :          0 : }
    1507                 :            : 
    1508                 :            : /* Causes the original contents of column "dest_mac" in 'row' to be
    1509                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1510                 :            :  * "dest_mac" in 'row' changed (or if 'row' was deleted) between the
    1511                 :            :  * time that the IDL originally read its contents and the time that the
    1512                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1513                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1514                 :            :  * change has already been received).
    1515                 :            :  *
    1516                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1517                 :            :  * reads, an application should call this function any time "dest_mac" is
    1518                 :            :  * read as part of a read-modify-write operation.
    1519                 :            :  *
    1520                 :            :  * In some cases this function reduces to a no-op, because the current value
    1521                 :            :  * of "dest_mac" is already known:
    1522                 :            :  *
    1523                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1524                 :            :  *     vteprec_acl_entry_insert()).
    1525                 :            :  *
    1526                 :            :  *   - If "dest_mac" has already been modified (with
    1527                 :            :  *     vteprec_acl_entry_set_dest_mac()) within the current transaction.
    1528                 :            :  *
    1529                 :            :  * Because of the latter property, always call this function *before*
    1530                 :            :  * vteprec_acl_entry_set_dest_mac() for a given read-modify-write.
    1531                 :            :  *
    1532                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1533                 :            : void
    1534                 :          0 : vteprec_acl_entry_verify_dest_mac(const struct vteprec_acl_entry *row)
    1535                 :            : {
    1536         [ #  # ]:          0 :     ovs_assert(inited);
    1537                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC]);
    1538                 :          0 : }
    1539                 :            : 
    1540                 :            : /* Causes the original contents of column "dest_mask" in 'row' to be
    1541                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1542                 :            :  * "dest_mask" in 'row' changed (or if 'row' was deleted) between the
    1543                 :            :  * time that the IDL originally read its contents and the time that the
    1544                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1545                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1546                 :            :  * change has already been received).
    1547                 :            :  *
    1548                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1549                 :            :  * reads, an application should call this function any time "dest_mask" is
    1550                 :            :  * read as part of a read-modify-write operation.
    1551                 :            :  *
    1552                 :            :  * In some cases this function reduces to a no-op, because the current value
    1553                 :            :  * of "dest_mask" is already known:
    1554                 :            :  *
    1555                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1556                 :            :  *     vteprec_acl_entry_insert()).
    1557                 :            :  *
    1558                 :            :  *   - If "dest_mask" has already been modified (with
    1559                 :            :  *     vteprec_acl_entry_set_dest_mask()) within the current transaction.
    1560                 :            :  *
    1561                 :            :  * Because of the latter property, always call this function *before*
    1562                 :            :  * vteprec_acl_entry_set_dest_mask() for a given read-modify-write.
    1563                 :            :  *
    1564                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1565                 :            : void
    1566                 :          0 : vteprec_acl_entry_verify_dest_mask(const struct vteprec_acl_entry *row)
    1567                 :            : {
    1568         [ #  # ]:          0 :     ovs_assert(inited);
    1569                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK]);
    1570                 :          0 : }
    1571                 :            : 
    1572                 :            : /* Causes the original contents of column "dest_port_max" in 'row' to be
    1573                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1574                 :            :  * "dest_port_max" in 'row' changed (or if 'row' was deleted) between the
    1575                 :            :  * time that the IDL originally read its contents and the time that the
    1576                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1577                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1578                 :            :  * change has already been received).
    1579                 :            :  *
    1580                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1581                 :            :  * reads, an application should call this function any time "dest_port_max" is
    1582                 :            :  * read as part of a read-modify-write operation.
    1583                 :            :  *
    1584                 :            :  * In some cases this function reduces to a no-op, because the current value
    1585                 :            :  * of "dest_port_max" is already known:
    1586                 :            :  *
    1587                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1588                 :            :  *     vteprec_acl_entry_insert()).
    1589                 :            :  *
    1590                 :            :  *   - If "dest_port_max" has already been modified (with
    1591                 :            :  *     vteprec_acl_entry_set_dest_port_max()) within the current transaction.
    1592                 :            :  *
    1593                 :            :  * Because of the latter property, always call this function *before*
    1594                 :            :  * vteprec_acl_entry_set_dest_port_max() for a given read-modify-write.
    1595                 :            :  *
    1596                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1597                 :            : void
    1598                 :          0 : vteprec_acl_entry_verify_dest_port_max(const struct vteprec_acl_entry *row)
    1599                 :            : {
    1600         [ #  # ]:          0 :     ovs_assert(inited);
    1601                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX]);
    1602                 :          0 : }
    1603                 :            : 
    1604                 :            : /* Causes the original contents of column "dest_port_min" in 'row' to be
    1605                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1606                 :            :  * "dest_port_min" in 'row' changed (or if 'row' was deleted) between the
    1607                 :            :  * time that the IDL originally read its contents and the time that the
    1608                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1609                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1610                 :            :  * change has already been received).
    1611                 :            :  *
    1612                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1613                 :            :  * reads, an application should call this function any time "dest_port_min" is
    1614                 :            :  * read as part of a read-modify-write operation.
    1615                 :            :  *
    1616                 :            :  * In some cases this function reduces to a no-op, because the current value
    1617                 :            :  * of "dest_port_min" is already known:
    1618                 :            :  *
    1619                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1620                 :            :  *     vteprec_acl_entry_insert()).
    1621                 :            :  *
    1622                 :            :  *   - If "dest_port_min" has already been modified (with
    1623                 :            :  *     vteprec_acl_entry_set_dest_port_min()) within the current transaction.
    1624                 :            :  *
    1625                 :            :  * Because of the latter property, always call this function *before*
    1626                 :            :  * vteprec_acl_entry_set_dest_port_min() for a given read-modify-write.
    1627                 :            :  *
    1628                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1629                 :            : void
    1630                 :          0 : vteprec_acl_entry_verify_dest_port_min(const struct vteprec_acl_entry *row)
    1631                 :            : {
    1632         [ #  # ]:          0 :     ovs_assert(inited);
    1633                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN]);
    1634                 :          0 : }
    1635                 :            : 
    1636                 :            : /* Causes the original contents of column "direction" in 'row' to be
    1637                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1638                 :            :  * "direction" in 'row' changed (or if 'row' was deleted) between the
    1639                 :            :  * time that the IDL originally read its contents and the time that the
    1640                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1641                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1642                 :            :  * change has already been received).
    1643                 :            :  *
    1644                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1645                 :            :  * reads, an application should call this function any time "direction" is
    1646                 :            :  * read as part of a read-modify-write operation.
    1647                 :            :  *
    1648                 :            :  * In some cases this function reduces to a no-op, because the current value
    1649                 :            :  * of "direction" is already known:
    1650                 :            :  *
    1651                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1652                 :            :  *     vteprec_acl_entry_insert()).
    1653                 :            :  *
    1654                 :            :  *   - If "direction" has already been modified (with
    1655                 :            :  *     vteprec_acl_entry_set_direction()) within the current transaction.
    1656                 :            :  *
    1657                 :            :  * Because of the latter property, always call this function *before*
    1658                 :            :  * vteprec_acl_entry_set_direction() for a given read-modify-write.
    1659                 :            :  *
    1660                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1661                 :            : void
    1662                 :          0 : vteprec_acl_entry_verify_direction(const struct vteprec_acl_entry *row)
    1663                 :            : {
    1664         [ #  # ]:          0 :     ovs_assert(inited);
    1665                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DIRECTION]);
    1666                 :          0 : }
    1667                 :            : 
    1668                 :            : /* Causes the original contents of column "ethertype" in 'row' to be
    1669                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1670                 :            :  * "ethertype" in 'row' changed (or if 'row' was deleted) between the
    1671                 :            :  * time that the IDL originally read its contents and the time that the
    1672                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1673                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1674                 :            :  * change has already been received).
    1675                 :            :  *
    1676                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1677                 :            :  * reads, an application should call this function any time "ethertype" is
    1678                 :            :  * read as part of a read-modify-write operation.
    1679                 :            :  *
    1680                 :            :  * In some cases this function reduces to a no-op, because the current value
    1681                 :            :  * of "ethertype" is already known:
    1682                 :            :  *
    1683                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1684                 :            :  *     vteprec_acl_entry_insert()).
    1685                 :            :  *
    1686                 :            :  *   - If "ethertype" has already been modified (with
    1687                 :            :  *     vteprec_acl_entry_set_ethertype()) within the current transaction.
    1688                 :            :  *
    1689                 :            :  * Because of the latter property, always call this function *before*
    1690                 :            :  * vteprec_acl_entry_set_ethertype() for a given read-modify-write.
    1691                 :            :  *
    1692                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1693                 :            : void
    1694                 :          0 : vteprec_acl_entry_verify_ethertype(const struct vteprec_acl_entry *row)
    1695                 :            : {
    1696         [ #  # ]:          0 :     ovs_assert(inited);
    1697                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE]);
    1698                 :          0 : }
    1699                 :            : 
    1700                 :            : /* Causes the original contents of column "icmp_code" in 'row' to be
    1701                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1702                 :            :  * "icmp_code" in 'row' changed (or if 'row' was deleted) between the
    1703                 :            :  * time that the IDL originally read its contents and the time that the
    1704                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1705                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1706                 :            :  * change has already been received).
    1707                 :            :  *
    1708                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1709                 :            :  * reads, an application should call this function any time "icmp_code" is
    1710                 :            :  * read as part of a read-modify-write operation.
    1711                 :            :  *
    1712                 :            :  * In some cases this function reduces to a no-op, because the current value
    1713                 :            :  * of "icmp_code" is already known:
    1714                 :            :  *
    1715                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1716                 :            :  *     vteprec_acl_entry_insert()).
    1717                 :            :  *
    1718                 :            :  *   - If "icmp_code" has already been modified (with
    1719                 :            :  *     vteprec_acl_entry_set_icmp_code()) within the current transaction.
    1720                 :            :  *
    1721                 :            :  * Because of the latter property, always call this function *before*
    1722                 :            :  * vteprec_acl_entry_set_icmp_code() for a given read-modify-write.
    1723                 :            :  *
    1724                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1725                 :            : void
    1726                 :          0 : vteprec_acl_entry_verify_icmp_code(const struct vteprec_acl_entry *row)
    1727                 :            : {
    1728         [ #  # ]:          0 :     ovs_assert(inited);
    1729                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE]);
    1730                 :          0 : }
    1731                 :            : 
    1732                 :            : /* Causes the original contents of column "icmp_type" in 'row' to be
    1733                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1734                 :            :  * "icmp_type" in 'row' changed (or if 'row' was deleted) between the
    1735                 :            :  * time that the IDL originally read its contents and the time that the
    1736                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1737                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1738                 :            :  * change has already been received).
    1739                 :            :  *
    1740                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1741                 :            :  * reads, an application should call this function any time "icmp_type" is
    1742                 :            :  * read as part of a read-modify-write operation.
    1743                 :            :  *
    1744                 :            :  * In some cases this function reduces to a no-op, because the current value
    1745                 :            :  * of "icmp_type" is already known:
    1746                 :            :  *
    1747                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1748                 :            :  *     vteprec_acl_entry_insert()).
    1749                 :            :  *
    1750                 :            :  *   - If "icmp_type" has already been modified (with
    1751                 :            :  *     vteprec_acl_entry_set_icmp_type()) within the current transaction.
    1752                 :            :  *
    1753                 :            :  * Because of the latter property, always call this function *before*
    1754                 :            :  * vteprec_acl_entry_set_icmp_type() for a given read-modify-write.
    1755                 :            :  *
    1756                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1757                 :            : void
    1758                 :          0 : vteprec_acl_entry_verify_icmp_type(const struct vteprec_acl_entry *row)
    1759                 :            : {
    1760         [ #  # ]:          0 :     ovs_assert(inited);
    1761                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE]);
    1762                 :          0 : }
    1763                 :            : 
    1764                 :            : /* Causes the original contents of column "protocol" in 'row' to be
    1765                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1766                 :            :  * "protocol" in 'row' changed (or if 'row' was deleted) between the
    1767                 :            :  * time that the IDL originally read its contents and the time that the
    1768                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1769                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1770                 :            :  * change has already been received).
    1771                 :            :  *
    1772                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1773                 :            :  * reads, an application should call this function any time "protocol" is
    1774                 :            :  * read as part of a read-modify-write operation.
    1775                 :            :  *
    1776                 :            :  * In some cases this function reduces to a no-op, because the current value
    1777                 :            :  * of "protocol" is already known:
    1778                 :            :  *
    1779                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1780                 :            :  *     vteprec_acl_entry_insert()).
    1781                 :            :  *
    1782                 :            :  *   - If "protocol" has already been modified (with
    1783                 :            :  *     vteprec_acl_entry_set_protocol()) within the current transaction.
    1784                 :            :  *
    1785                 :            :  * Because of the latter property, always call this function *before*
    1786                 :            :  * vteprec_acl_entry_set_protocol() for a given read-modify-write.
    1787                 :            :  *
    1788                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1789                 :            : void
    1790                 :          0 : vteprec_acl_entry_verify_protocol(const struct vteprec_acl_entry *row)
    1791                 :            : {
    1792         [ #  # ]:          0 :     ovs_assert(inited);
    1793                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL]);
    1794                 :          0 : }
    1795                 :            : 
    1796                 :            : /* Causes the original contents of column "sequence" in 'row' to be
    1797                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1798                 :            :  * "sequence" in 'row' changed (or if 'row' was deleted) between the
    1799                 :            :  * time that the IDL originally read its contents and the time that the
    1800                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1801                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1802                 :            :  * change has already been received).
    1803                 :            :  *
    1804                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1805                 :            :  * reads, an application should call this function any time "sequence" is
    1806                 :            :  * read as part of a read-modify-write operation.
    1807                 :            :  *
    1808                 :            :  * In some cases this function reduces to a no-op, because the current value
    1809                 :            :  * of "sequence" is already known:
    1810                 :            :  *
    1811                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1812                 :            :  *     vteprec_acl_entry_insert()).
    1813                 :            :  *
    1814                 :            :  *   - If "sequence" has already been modified (with
    1815                 :            :  *     vteprec_acl_entry_set_sequence()) within the current transaction.
    1816                 :            :  *
    1817                 :            :  * Because of the latter property, always call this function *before*
    1818                 :            :  * vteprec_acl_entry_set_sequence() for a given read-modify-write.
    1819                 :            :  *
    1820                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1821                 :            : void
    1822                 :          0 : vteprec_acl_entry_verify_sequence(const struct vteprec_acl_entry *row)
    1823                 :            : {
    1824         [ #  # ]:          0 :     ovs_assert(inited);
    1825                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SEQUENCE]);
    1826                 :          0 : }
    1827                 :            : 
    1828                 :            : /* Causes the original contents of column "source_ip" in 'row' to be
    1829                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1830                 :            :  * "source_ip" in 'row' changed (or if 'row' was deleted) between the
    1831                 :            :  * time that the IDL originally read its contents and the time that the
    1832                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1833                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1834                 :            :  * change has already been received).
    1835                 :            :  *
    1836                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1837                 :            :  * reads, an application should call this function any time "source_ip" is
    1838                 :            :  * read as part of a read-modify-write operation.
    1839                 :            :  *
    1840                 :            :  * In some cases this function reduces to a no-op, because the current value
    1841                 :            :  * of "source_ip" is already known:
    1842                 :            :  *
    1843                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1844                 :            :  *     vteprec_acl_entry_insert()).
    1845                 :            :  *
    1846                 :            :  *   - If "source_ip" has already been modified (with
    1847                 :            :  *     vteprec_acl_entry_set_source_ip()) within the current transaction.
    1848                 :            :  *
    1849                 :            :  * Because of the latter property, always call this function *before*
    1850                 :            :  * vteprec_acl_entry_set_source_ip() for a given read-modify-write.
    1851                 :            :  *
    1852                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1853                 :            : void
    1854                 :          0 : vteprec_acl_entry_verify_source_ip(const struct vteprec_acl_entry *row)
    1855                 :            : {
    1856         [ #  # ]:          0 :     ovs_assert(inited);
    1857                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP]);
    1858                 :          0 : }
    1859                 :            : 
    1860                 :            : /* Causes the original contents of column "source_mac" in 'row' to be
    1861                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1862                 :            :  * "source_mac" in 'row' changed (or if 'row' was deleted) between the
    1863                 :            :  * time that the IDL originally read its contents and the time that the
    1864                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1865                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1866                 :            :  * change has already been received).
    1867                 :            :  *
    1868                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1869                 :            :  * reads, an application should call this function any time "source_mac" is
    1870                 :            :  * read as part of a read-modify-write operation.
    1871                 :            :  *
    1872                 :            :  * In some cases this function reduces to a no-op, because the current value
    1873                 :            :  * of "source_mac" is already known:
    1874                 :            :  *
    1875                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1876                 :            :  *     vteprec_acl_entry_insert()).
    1877                 :            :  *
    1878                 :            :  *   - If "source_mac" has already been modified (with
    1879                 :            :  *     vteprec_acl_entry_set_source_mac()) within the current transaction.
    1880                 :            :  *
    1881                 :            :  * Because of the latter property, always call this function *before*
    1882                 :            :  * vteprec_acl_entry_set_source_mac() for a given read-modify-write.
    1883                 :            :  *
    1884                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1885                 :            : void
    1886                 :          0 : vteprec_acl_entry_verify_source_mac(const struct vteprec_acl_entry *row)
    1887                 :            : {
    1888         [ #  # ]:          0 :     ovs_assert(inited);
    1889                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC]);
    1890                 :          0 : }
    1891                 :            : 
    1892                 :            : /* Causes the original contents of column "source_mask" in 'row' to be
    1893                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1894                 :            :  * "source_mask" in 'row' changed (or if 'row' was deleted) between the
    1895                 :            :  * time that the IDL originally read its contents and the time that the
    1896                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1897                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1898                 :            :  * change has already been received).
    1899                 :            :  *
    1900                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1901                 :            :  * reads, an application should call this function any time "source_mask" is
    1902                 :            :  * read as part of a read-modify-write operation.
    1903                 :            :  *
    1904                 :            :  * In some cases this function reduces to a no-op, because the current value
    1905                 :            :  * of "source_mask" is already known:
    1906                 :            :  *
    1907                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1908                 :            :  *     vteprec_acl_entry_insert()).
    1909                 :            :  *
    1910                 :            :  *   - If "source_mask" has already been modified (with
    1911                 :            :  *     vteprec_acl_entry_set_source_mask()) within the current transaction.
    1912                 :            :  *
    1913                 :            :  * Because of the latter property, always call this function *before*
    1914                 :            :  * vteprec_acl_entry_set_source_mask() for a given read-modify-write.
    1915                 :            :  *
    1916                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1917                 :            : void
    1918                 :          0 : vteprec_acl_entry_verify_source_mask(const struct vteprec_acl_entry *row)
    1919                 :            : {
    1920         [ #  # ]:          0 :     ovs_assert(inited);
    1921                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK]);
    1922                 :          0 : }
    1923                 :            : 
    1924                 :            : /* Causes the original contents of column "source_port_max" in 'row' to be
    1925                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1926                 :            :  * "source_port_max" in 'row' changed (or if 'row' was deleted) between the
    1927                 :            :  * time that the IDL originally read its contents and the time that the
    1928                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1929                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1930                 :            :  * change has already been received).
    1931                 :            :  *
    1932                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1933                 :            :  * reads, an application should call this function any time "source_port_max" is
    1934                 :            :  * read as part of a read-modify-write operation.
    1935                 :            :  *
    1936                 :            :  * In some cases this function reduces to a no-op, because the current value
    1937                 :            :  * of "source_port_max" is already known:
    1938                 :            :  *
    1939                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1940                 :            :  *     vteprec_acl_entry_insert()).
    1941                 :            :  *
    1942                 :            :  *   - If "source_port_max" has already been modified (with
    1943                 :            :  *     vteprec_acl_entry_set_source_port_max()) within the current transaction.
    1944                 :            :  *
    1945                 :            :  * Because of the latter property, always call this function *before*
    1946                 :            :  * vteprec_acl_entry_set_source_port_max() for a given read-modify-write.
    1947                 :            :  *
    1948                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1949                 :            : void
    1950                 :          0 : vteprec_acl_entry_verify_source_port_max(const struct vteprec_acl_entry *row)
    1951                 :            : {
    1952         [ #  # ]:          0 :     ovs_assert(inited);
    1953                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX]);
    1954                 :          0 : }
    1955                 :            : 
    1956                 :            : /* Causes the original contents of column "source_port_min" in 'row' to be
    1957                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1958                 :            :  * "source_port_min" in 'row' changed (or if 'row' was deleted) between the
    1959                 :            :  * time that the IDL originally read its contents and the time that the
    1960                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1961                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1962                 :            :  * change has already been received).
    1963                 :            :  *
    1964                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1965                 :            :  * reads, an application should call this function any time "source_port_min" is
    1966                 :            :  * read as part of a read-modify-write operation.
    1967                 :            :  *
    1968                 :            :  * In some cases this function reduces to a no-op, because the current value
    1969                 :            :  * of "source_port_min" is already known:
    1970                 :            :  *
    1971                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    1972                 :            :  *     vteprec_acl_entry_insert()).
    1973                 :            :  *
    1974                 :            :  *   - If "source_port_min" has already been modified (with
    1975                 :            :  *     vteprec_acl_entry_set_source_port_min()) within the current transaction.
    1976                 :            :  *
    1977                 :            :  * Because of the latter property, always call this function *before*
    1978                 :            :  * vteprec_acl_entry_set_source_port_min() for a given read-modify-write.
    1979                 :            :  *
    1980                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    1981                 :            : void
    1982                 :          0 : vteprec_acl_entry_verify_source_port_min(const struct vteprec_acl_entry *row)
    1983                 :            : {
    1984         [ #  # ]:          0 :     ovs_assert(inited);
    1985                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN]);
    1986                 :          0 : }
    1987                 :            : 
    1988                 :            : /* Causes the original contents of column "tcp_flags" in 'row' to be
    1989                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    1990                 :            :  * "tcp_flags" in 'row' changed (or if 'row' was deleted) between the
    1991                 :            :  * time that the IDL originally read its contents and the time that the
    1992                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    1993                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    1994                 :            :  * change has already been received).
    1995                 :            :  *
    1996                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    1997                 :            :  * reads, an application should call this function any time "tcp_flags" is
    1998                 :            :  * read as part of a read-modify-write operation.
    1999                 :            :  *
    2000                 :            :  * In some cases this function reduces to a no-op, because the current value
    2001                 :            :  * of "tcp_flags" is already known:
    2002                 :            :  *
    2003                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    2004                 :            :  *     vteprec_acl_entry_insert()).
    2005                 :            :  *
    2006                 :            :  *   - If "tcp_flags" has already been modified (with
    2007                 :            :  *     vteprec_acl_entry_set_tcp_flags()) within the current transaction.
    2008                 :            :  *
    2009                 :            :  * Because of the latter property, always call this function *before*
    2010                 :            :  * vteprec_acl_entry_set_tcp_flags() for a given read-modify-write.
    2011                 :            :  *
    2012                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    2013                 :            : void
    2014                 :          0 : vteprec_acl_entry_verify_tcp_flags(const struct vteprec_acl_entry *row)
    2015                 :            : {
    2016         [ #  # ]:          0 :     ovs_assert(inited);
    2017                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS]);
    2018                 :          0 : }
    2019                 :            : 
    2020                 :            : /* Causes the original contents of column "tcp_flags_mask" in 'row' to be
    2021                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    2022                 :            :  * "tcp_flags_mask" in 'row' changed (or if 'row' was deleted) between the
    2023                 :            :  * time that the IDL originally read its contents and the time that the
    2024                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    2025                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    2026                 :            :  * change has already been received).
    2027                 :            :  *
    2028                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    2029                 :            :  * reads, an application should call this function any time "tcp_flags_mask" is
    2030                 :            :  * read as part of a read-modify-write operation.
    2031                 :            :  *
    2032                 :            :  * In some cases this function reduces to a no-op, because the current value
    2033                 :            :  * of "tcp_flags_mask" is already known:
    2034                 :            :  *
    2035                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    2036                 :            :  *     vteprec_acl_entry_insert()).
    2037                 :            :  *
    2038                 :            :  *   - If "tcp_flags_mask" has already been modified (with
    2039                 :            :  *     vteprec_acl_entry_set_tcp_flags_mask()) within the current transaction.
    2040                 :            :  *
    2041                 :            :  * Because of the latter property, always call this function *before*
    2042                 :            :  * vteprec_acl_entry_set_tcp_flags_mask() for a given read-modify-write.
    2043                 :            :  *
    2044                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    2045                 :            : void
    2046                 :          0 : vteprec_acl_entry_verify_tcp_flags_mask(const struct vteprec_acl_entry *row)
    2047                 :            : {
    2048         [ #  # ]:          0 :     ovs_assert(inited);
    2049                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK]);
    2050                 :          0 : }
    2051                 :            : 
    2052                 :            : /* Returns the "acle_fault_status" column's value from the "ACL_entry" table in 'row'
    2053                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2054                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2055                 :            :  * for a given key than implementing the same operation on the "cooked"
    2056                 :            :  * form in 'row'.
    2057                 :            :  *
    2058                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2059                 :            :  * (This helps to avoid silent bugs if someone changes acle_fault_status's
    2060                 :            :  * type without updating the caller.)
    2061                 :            :  *
    2062                 :            :  * The caller must not modify or free the returned value.
    2063                 :            :  *
    2064                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2065                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2066                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2067                 :            :  * of it with ovsdb_datum_clone().
    2068                 :            :  *
    2069                 :            :  * This function is rarely useful, since it is easier to access the value
    2070                 :            :  * directly through the "acle_fault_status" member in vteprec_acl_entry. */
    2071                 :            : const struct ovsdb_datum *
    2072                 :          0 : vteprec_acl_entry_get_acle_fault_status(const struct vteprec_acl_entry *row,
    2073                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2074                 :            : {
    2075         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2076                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_acle_fault_status);
    2077                 :            : }
    2078                 :            : 
    2079                 :            : /* Returns the "action" column's value from the "ACL_entry" table in 'row'
    2080                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2081                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2082                 :            :  * for a given key than implementing the same operation on the "cooked"
    2083                 :            :  * form in 'row'.
    2084                 :            :  *
    2085                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2086                 :            :  * (This helps to avoid silent bugs if someone changes action's
    2087                 :            :  * type without updating the caller.)
    2088                 :            :  *
    2089                 :            :  * The caller must not modify or free the returned value.
    2090                 :            :  *
    2091                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2092                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2093                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2094                 :            :  * of it with ovsdb_datum_clone().
    2095                 :            :  *
    2096                 :            :  * This function is rarely useful, since it is easier to access the value
    2097                 :            :  * directly through the "action" member in vteprec_acl_entry. */
    2098                 :            : const struct ovsdb_datum *
    2099                 :          0 : vteprec_acl_entry_get_action(const struct vteprec_acl_entry *row,
    2100                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2101                 :            : {
    2102         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2103                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_action);
    2104                 :            : }
    2105                 :            : 
    2106                 :            : /* Returns the "dest_ip" column's value from the "ACL_entry" table in 'row'
    2107                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2108                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2109                 :            :  * for a given key than implementing the same operation on the "cooked"
    2110                 :            :  * form in 'row'.
    2111                 :            :  *
    2112                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2113                 :            :  * (This helps to avoid silent bugs if someone changes dest_ip's
    2114                 :            :  * type without updating the caller.)
    2115                 :            :  *
    2116                 :            :  * The caller must not modify or free the returned value.
    2117                 :            :  *
    2118                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2119                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2120                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2121                 :            :  * of it with ovsdb_datum_clone().
    2122                 :            :  *
    2123                 :            :  * This function is rarely useful, since it is easier to access the value
    2124                 :            :  * directly through the "dest_ip" member in vteprec_acl_entry. */
    2125                 :            : const struct ovsdb_datum *
    2126                 :          0 : vteprec_acl_entry_get_dest_ip(const struct vteprec_acl_entry *row,
    2127                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2128                 :            : {
    2129         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2130                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_dest_ip);
    2131                 :            : }
    2132                 :            : 
    2133                 :            : /* Returns the "dest_mac" column's value from the "ACL_entry" table in 'row'
    2134                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2135                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2136                 :            :  * for a given key than implementing the same operation on the "cooked"
    2137                 :            :  * form in 'row'.
    2138                 :            :  *
    2139                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2140                 :            :  * (This helps to avoid silent bugs if someone changes dest_mac's
    2141                 :            :  * type without updating the caller.)
    2142                 :            :  *
    2143                 :            :  * The caller must not modify or free the returned value.
    2144                 :            :  *
    2145                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2146                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2147                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2148                 :            :  * of it with ovsdb_datum_clone().
    2149                 :            :  *
    2150                 :            :  * This function is rarely useful, since it is easier to access the value
    2151                 :            :  * directly through the "dest_mac" member in vteprec_acl_entry. */
    2152                 :            : const struct ovsdb_datum *
    2153                 :          0 : vteprec_acl_entry_get_dest_mac(const struct vteprec_acl_entry *row,
    2154                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2155                 :            : {
    2156         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2157                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_dest_mac);
    2158                 :            : }
    2159                 :            : 
    2160                 :            : /* Returns the "dest_mask" column's value from the "ACL_entry" table in 'row'
    2161                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2162                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2163                 :            :  * for a given key than implementing the same operation on the "cooked"
    2164                 :            :  * form in 'row'.
    2165                 :            :  *
    2166                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2167                 :            :  * (This helps to avoid silent bugs if someone changes dest_mask's
    2168                 :            :  * type without updating the caller.)
    2169                 :            :  *
    2170                 :            :  * The caller must not modify or free the returned value.
    2171                 :            :  *
    2172                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2173                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2174                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2175                 :            :  * of it with ovsdb_datum_clone().
    2176                 :            :  *
    2177                 :            :  * This function is rarely useful, since it is easier to access the value
    2178                 :            :  * directly through the "dest_mask" member in vteprec_acl_entry. */
    2179                 :            : const struct ovsdb_datum *
    2180                 :          0 : vteprec_acl_entry_get_dest_mask(const struct vteprec_acl_entry *row,
    2181                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2182                 :            : {
    2183         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2184                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_dest_mask);
    2185                 :            : }
    2186                 :            : 
    2187                 :            : /* Returns the "dest_port_max" column's value from the "ACL_entry" table in 'row'
    2188                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2189                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2190                 :            :  * for a given key than implementing the same operation on the "cooked"
    2191                 :            :  * form in 'row'.
    2192                 :            :  *
    2193                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2194                 :            :  * (This helps to avoid silent bugs if someone changes dest_port_max's
    2195                 :            :  * type without updating the caller.)
    2196                 :            :  *
    2197                 :            :  * The caller must not modify or free the returned value.
    2198                 :            :  *
    2199                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2200                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2201                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2202                 :            :  * of it with ovsdb_datum_clone().
    2203                 :            :  *
    2204                 :            :  * This function is rarely useful, since it is easier to access the value
    2205                 :            :  * directly through the "dest_port_max" member in vteprec_acl_entry. */
    2206                 :            : const struct ovsdb_datum *
    2207                 :          0 : vteprec_acl_entry_get_dest_port_max(const struct vteprec_acl_entry *row,
    2208                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2209                 :            : {
    2210         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2211                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_dest_port_max);
    2212                 :            : }
    2213                 :            : 
    2214                 :            : /* Returns the "dest_port_min" column's value from the "ACL_entry" table in 'row'
    2215                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2216                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2217                 :            :  * for a given key than implementing the same operation on the "cooked"
    2218                 :            :  * form in 'row'.
    2219                 :            :  *
    2220                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2221                 :            :  * (This helps to avoid silent bugs if someone changes dest_port_min's
    2222                 :            :  * type without updating the caller.)
    2223                 :            :  *
    2224                 :            :  * The caller must not modify or free the returned value.
    2225                 :            :  *
    2226                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2227                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2228                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2229                 :            :  * of it with ovsdb_datum_clone().
    2230                 :            :  *
    2231                 :            :  * This function is rarely useful, since it is easier to access the value
    2232                 :            :  * directly through the "dest_port_min" member in vteprec_acl_entry. */
    2233                 :            : const struct ovsdb_datum *
    2234                 :          0 : vteprec_acl_entry_get_dest_port_min(const struct vteprec_acl_entry *row,
    2235                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2236                 :            : {
    2237         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2238                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_dest_port_min);
    2239                 :            : }
    2240                 :            : 
    2241                 :            : /* Returns the "direction" column's value from the "ACL_entry" table in 'row'
    2242                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2243                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2244                 :            :  * for a given key than implementing the same operation on the "cooked"
    2245                 :            :  * form in 'row'.
    2246                 :            :  *
    2247                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2248                 :            :  * (This helps to avoid silent bugs if someone changes direction's
    2249                 :            :  * type without updating the caller.)
    2250                 :            :  *
    2251                 :            :  * The caller must not modify or free the returned value.
    2252                 :            :  *
    2253                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2254                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2255                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2256                 :            :  * of it with ovsdb_datum_clone().
    2257                 :            :  *
    2258                 :            :  * This function is rarely useful, since it is easier to access the value
    2259                 :            :  * directly through the "direction" member in vteprec_acl_entry. */
    2260                 :            : const struct ovsdb_datum *
    2261                 :          0 : vteprec_acl_entry_get_direction(const struct vteprec_acl_entry *row,
    2262                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2263                 :            : {
    2264         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2265                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_direction);
    2266                 :            : }
    2267                 :            : 
    2268                 :            : /* Returns the "ethertype" column's value from the "ACL_entry" table in 'row'
    2269                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2270                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2271                 :            :  * for a given key than implementing the same operation on the "cooked"
    2272                 :            :  * form in 'row'.
    2273                 :            :  *
    2274                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2275                 :            :  * (This helps to avoid silent bugs if someone changes ethertype's
    2276                 :            :  * type without updating the caller.)
    2277                 :            :  *
    2278                 :            :  * The caller must not modify or free the returned value.
    2279                 :            :  *
    2280                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2281                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2282                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2283                 :            :  * of it with ovsdb_datum_clone().
    2284                 :            :  *
    2285                 :            :  * This function is rarely useful, since it is easier to access the value
    2286                 :            :  * directly through the "ethertype" member in vteprec_acl_entry. */
    2287                 :            : const struct ovsdb_datum *
    2288                 :          0 : vteprec_acl_entry_get_ethertype(const struct vteprec_acl_entry *row,
    2289                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2290                 :            : {
    2291         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2292                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_ethertype);
    2293                 :            : }
    2294                 :            : 
    2295                 :            : /* Returns the "icmp_code" column's value from the "ACL_entry" table in 'row'
    2296                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2297                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2298                 :            :  * for a given key than implementing the same operation on the "cooked"
    2299                 :            :  * form in 'row'.
    2300                 :            :  *
    2301                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2302                 :            :  * (This helps to avoid silent bugs if someone changes icmp_code's
    2303                 :            :  * type without updating the caller.)
    2304                 :            :  *
    2305                 :            :  * The caller must not modify or free the returned value.
    2306                 :            :  *
    2307                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2308                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2309                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2310                 :            :  * of it with ovsdb_datum_clone().
    2311                 :            :  *
    2312                 :            :  * This function is rarely useful, since it is easier to access the value
    2313                 :            :  * directly through the "icmp_code" member in vteprec_acl_entry. */
    2314                 :            : const struct ovsdb_datum *
    2315                 :          0 : vteprec_acl_entry_get_icmp_code(const struct vteprec_acl_entry *row,
    2316                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2317                 :            : {
    2318         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2319                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_icmp_code);
    2320                 :            : }
    2321                 :            : 
    2322                 :            : /* Returns the "icmp_type" column's value from the "ACL_entry" table in 'row'
    2323                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2324                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2325                 :            :  * for a given key than implementing the same operation on the "cooked"
    2326                 :            :  * form in 'row'.
    2327                 :            :  *
    2328                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2329                 :            :  * (This helps to avoid silent bugs if someone changes icmp_type's
    2330                 :            :  * type without updating the caller.)
    2331                 :            :  *
    2332                 :            :  * The caller must not modify or free the returned value.
    2333                 :            :  *
    2334                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2335                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2336                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2337                 :            :  * of it with ovsdb_datum_clone().
    2338                 :            :  *
    2339                 :            :  * This function is rarely useful, since it is easier to access the value
    2340                 :            :  * directly through the "icmp_type" member in vteprec_acl_entry. */
    2341                 :            : const struct ovsdb_datum *
    2342                 :          0 : vteprec_acl_entry_get_icmp_type(const struct vteprec_acl_entry *row,
    2343                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2344                 :            : {
    2345         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2346                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_icmp_type);
    2347                 :            : }
    2348                 :            : 
    2349                 :            : /* Returns the "protocol" column's value from the "ACL_entry" table in 'row'
    2350                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2351                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2352                 :            :  * for a given key than implementing the same operation on the "cooked"
    2353                 :            :  * form in 'row'.
    2354                 :            :  *
    2355                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2356                 :            :  * (This helps to avoid silent bugs if someone changes protocol's
    2357                 :            :  * type without updating the caller.)
    2358                 :            :  *
    2359                 :            :  * The caller must not modify or free the returned value.
    2360                 :            :  *
    2361                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2362                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2363                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2364                 :            :  * of it with ovsdb_datum_clone().
    2365                 :            :  *
    2366                 :            :  * This function is rarely useful, since it is easier to access the value
    2367                 :            :  * directly through the "protocol" member in vteprec_acl_entry. */
    2368                 :            : const struct ovsdb_datum *
    2369                 :          0 : vteprec_acl_entry_get_protocol(const struct vteprec_acl_entry *row,
    2370                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2371                 :            : {
    2372         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2373                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_protocol);
    2374                 :            : }
    2375                 :            : 
    2376                 :            : /* Returns the "sequence" column's value from the "ACL_entry" table in 'row'
    2377                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2378                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2379                 :            :  * for a given key than implementing the same operation on the "cooked"
    2380                 :            :  * form in 'row'.
    2381                 :            :  *
    2382                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2383                 :            :  * (This helps to avoid silent bugs if someone changes sequence's
    2384                 :            :  * type without updating the caller.)
    2385                 :            :  *
    2386                 :            :  * The caller must not modify or free the returned value.
    2387                 :            :  *
    2388                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2389                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2390                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2391                 :            :  * of it with ovsdb_datum_clone().
    2392                 :            :  *
    2393                 :            :  * This function is rarely useful, since it is easier to access the value
    2394                 :            :  * directly through the "sequence" member in vteprec_acl_entry. */
    2395                 :            : const struct ovsdb_datum *
    2396                 :          0 : vteprec_acl_entry_get_sequence(const struct vteprec_acl_entry *row,
    2397                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2398                 :            : {
    2399         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2400                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_sequence);
    2401                 :            : }
    2402                 :            : 
    2403                 :            : /* Returns the "source_ip" column's value from the "ACL_entry" table in 'row'
    2404                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2405                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2406                 :            :  * for a given key than implementing the same operation on the "cooked"
    2407                 :            :  * form in 'row'.
    2408                 :            :  *
    2409                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2410                 :            :  * (This helps to avoid silent bugs if someone changes source_ip's
    2411                 :            :  * type without updating the caller.)
    2412                 :            :  *
    2413                 :            :  * The caller must not modify or free the returned value.
    2414                 :            :  *
    2415                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2416                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2417                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2418                 :            :  * of it with ovsdb_datum_clone().
    2419                 :            :  *
    2420                 :            :  * This function is rarely useful, since it is easier to access the value
    2421                 :            :  * directly through the "source_ip" member in vteprec_acl_entry. */
    2422                 :            : const struct ovsdb_datum *
    2423                 :          0 : vteprec_acl_entry_get_source_ip(const struct vteprec_acl_entry *row,
    2424                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2425                 :            : {
    2426         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2427                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_source_ip);
    2428                 :            : }
    2429                 :            : 
    2430                 :            : /* Returns the "source_mac" column's value from the "ACL_entry" table in 'row'
    2431                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2432                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2433                 :            :  * for a given key than implementing the same operation on the "cooked"
    2434                 :            :  * form in 'row'.
    2435                 :            :  *
    2436                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2437                 :            :  * (This helps to avoid silent bugs if someone changes source_mac's
    2438                 :            :  * type without updating the caller.)
    2439                 :            :  *
    2440                 :            :  * The caller must not modify or free the returned value.
    2441                 :            :  *
    2442                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2443                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2444                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2445                 :            :  * of it with ovsdb_datum_clone().
    2446                 :            :  *
    2447                 :            :  * This function is rarely useful, since it is easier to access the value
    2448                 :            :  * directly through the "source_mac" member in vteprec_acl_entry. */
    2449                 :            : const struct ovsdb_datum *
    2450                 :          0 : vteprec_acl_entry_get_source_mac(const struct vteprec_acl_entry *row,
    2451                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2452                 :            : {
    2453         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2454                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_source_mac);
    2455                 :            : }
    2456                 :            : 
    2457                 :            : /* Returns the "source_mask" column's value from the "ACL_entry" table in 'row'
    2458                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2459                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2460                 :            :  * for a given key than implementing the same operation on the "cooked"
    2461                 :            :  * form in 'row'.
    2462                 :            :  *
    2463                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    2464                 :            :  * (This helps to avoid silent bugs if someone changes source_mask's
    2465                 :            :  * type without updating the caller.)
    2466                 :            :  *
    2467                 :            :  * The caller must not modify or free the returned value.
    2468                 :            :  *
    2469                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2470                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2471                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2472                 :            :  * of it with ovsdb_datum_clone().
    2473                 :            :  *
    2474                 :            :  * This function is rarely useful, since it is easier to access the value
    2475                 :            :  * directly through the "source_mask" member in vteprec_acl_entry. */
    2476                 :            : const struct ovsdb_datum *
    2477                 :          0 : vteprec_acl_entry_get_source_mask(const struct vteprec_acl_entry *row,
    2478                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2479                 :            : {
    2480         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    2481                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_source_mask);
    2482                 :            : }
    2483                 :            : 
    2484                 :            : /* Returns the "source_port_max" column's value from the "ACL_entry" table in 'row'
    2485                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2486                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2487                 :            :  * for a given key than implementing the same operation on the "cooked"
    2488                 :            :  * form in 'row'.
    2489                 :            :  *
    2490                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2491                 :            :  * (This helps to avoid silent bugs if someone changes source_port_max's
    2492                 :            :  * type without updating the caller.)
    2493                 :            :  *
    2494                 :            :  * The caller must not modify or free the returned value.
    2495                 :            :  *
    2496                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2497                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2498                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2499                 :            :  * of it with ovsdb_datum_clone().
    2500                 :            :  *
    2501                 :            :  * This function is rarely useful, since it is easier to access the value
    2502                 :            :  * directly through the "source_port_max" member in vteprec_acl_entry. */
    2503                 :            : const struct ovsdb_datum *
    2504                 :          0 : vteprec_acl_entry_get_source_port_max(const struct vteprec_acl_entry *row,
    2505                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2506                 :            : {
    2507         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2508                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_source_port_max);
    2509                 :            : }
    2510                 :            : 
    2511                 :            : /* Returns the "source_port_min" column's value from the "ACL_entry" table in 'row'
    2512                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2513                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2514                 :            :  * for a given key than implementing the same operation on the "cooked"
    2515                 :            :  * form in 'row'.
    2516                 :            :  *
    2517                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2518                 :            :  * (This helps to avoid silent bugs if someone changes source_port_min's
    2519                 :            :  * type without updating the caller.)
    2520                 :            :  *
    2521                 :            :  * The caller must not modify or free the returned value.
    2522                 :            :  *
    2523                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2524                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2525                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2526                 :            :  * of it with ovsdb_datum_clone().
    2527                 :            :  *
    2528                 :            :  * This function is rarely useful, since it is easier to access the value
    2529                 :            :  * directly through the "source_port_min" member in vteprec_acl_entry. */
    2530                 :            : const struct ovsdb_datum *
    2531                 :          0 : vteprec_acl_entry_get_source_port_min(const struct vteprec_acl_entry *row,
    2532                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2533                 :            : {
    2534         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2535                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_source_port_min);
    2536                 :            : }
    2537                 :            : 
    2538                 :            : /* Returns the "tcp_flags" column's value from the "ACL_entry" table in 'row'
    2539                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2540                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2541                 :            :  * for a given key than implementing the same operation on the "cooked"
    2542                 :            :  * form in 'row'.
    2543                 :            :  *
    2544                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2545                 :            :  * (This helps to avoid silent bugs if someone changes tcp_flags's
    2546                 :            :  * type without updating the caller.)
    2547                 :            :  *
    2548                 :            :  * The caller must not modify or free the returned value.
    2549                 :            :  *
    2550                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2551                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2552                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2553                 :            :  * of it with ovsdb_datum_clone().
    2554                 :            :  *
    2555                 :            :  * This function is rarely useful, since it is easier to access the value
    2556                 :            :  * directly through the "tcp_flags" member in vteprec_acl_entry. */
    2557                 :            : const struct ovsdb_datum *
    2558                 :          0 : vteprec_acl_entry_get_tcp_flags(const struct vteprec_acl_entry *row,
    2559                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2560                 :            : {
    2561         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2562                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_tcp_flags);
    2563                 :            : }
    2564                 :            : 
    2565                 :            : /* Returns the "tcp_flags_mask" column's value from the "ACL_entry" table in 'row'
    2566                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    2567                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    2568                 :            :  * for a given key than implementing the same operation on the "cooked"
    2569                 :            :  * form in 'row'.
    2570                 :            :  *
    2571                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    2572                 :            :  * (This helps to avoid silent bugs if someone changes tcp_flags_mask's
    2573                 :            :  * type without updating the caller.)
    2574                 :            :  *
    2575                 :            :  * The caller must not modify or free the returned value.
    2576                 :            :  *
    2577                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    2578                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    2579                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    2580                 :            :  * of it with ovsdb_datum_clone().
    2581                 :            :  *
    2582                 :            :  * This function is rarely useful, since it is easier to access the value
    2583                 :            :  * directly through the "tcp_flags_mask" member in vteprec_acl_entry. */
    2584                 :            : const struct ovsdb_datum *
    2585                 :          0 : vteprec_acl_entry_get_tcp_flags_mask(const struct vteprec_acl_entry *row,
    2586                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    2587                 :            : {
    2588         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    2589                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_acl_entry_col_tcp_flags_mask);
    2590                 :            : }
    2591                 :            : 
    2592                 :            : /* Sets the "acle_fault_status" column from the "ACL_entry" table in 'row' to
    2593                 :            :  * the 'acle_fault_status' set with 'n_acle_fault_status' entries.
    2594                 :            :  *
    2595                 :            :  * The caller retains ownership of the arguments. */
    2596                 :            : void
    2597                 :          0 : vteprec_acl_entry_set_acle_fault_status(const struct vteprec_acl_entry *row, const char **acle_fault_status, size_t n_acle_fault_status)
    2598                 :            : {
    2599                 :            :     struct ovsdb_datum datum;
    2600                 :            :     size_t i;
    2601                 :            : 
    2602         [ #  # ]:          0 :     ovs_assert(inited);
    2603                 :          0 :     datum.n = n_acle_fault_status;
    2604         [ #  # ]:          0 :     datum.keys = n_acle_fault_status ? xmalloc(n_acle_fault_status * sizeof *datum.keys) : NULL;
    2605                 :          0 :     datum.values = NULL;
    2606         [ #  # ]:          0 :     for (i = 0; i < n_acle_fault_status; i++) {
    2607                 :          0 :         datum.keys[i].string = xstrdup(acle_fault_status[i]);
    2608                 :            :     }
    2609                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    2610                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS], &datum);
    2611                 :          0 : }
    2612                 :            : 
    2613                 :            : /* Sets the "action" column from the "ACL_entry" table in 'row' to
    2614                 :            :  * 'action'.
    2615                 :            :  *
    2616                 :            :  * Argument constraints: either "deny" or "permit"
    2617                 :            :  *
    2618                 :            :  * The caller retains ownership of the arguments. */
    2619                 :            : void
    2620                 :          0 : vteprec_acl_entry_set_action(const struct vteprec_acl_entry *row, const char *action)
    2621                 :            : {
    2622                 :            :     struct ovsdb_datum datum;
    2623                 :            :     union ovsdb_atom key;
    2624                 :            : 
    2625         [ #  # ]:          0 :     ovs_assert(inited);
    2626                 :          0 :     datum.n = 1;
    2627                 :          0 :     datum.keys = &key;
    2628                 :          0 :     key.string = CONST_CAST(char *, action);
    2629                 :          0 :     datum.values = NULL;
    2630                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACTION], &datum);
    2631                 :          0 : }
    2632                 :            : 
    2633                 :            : /* Sets the "dest_ip" column from the "ACL_entry" table in 'row' to
    2634                 :            :  * the 'dest_ip' set.
    2635                 :            :  *
    2636                 :            :  * If "dest_ip" is null, the column will be the empty set,
    2637                 :            :  * otherwise it will contain the specified value.
    2638                 :            :  *
    2639                 :            :  * The caller retains ownership of the arguments. */
    2640                 :            : void
    2641                 :          0 : vteprec_acl_entry_set_dest_ip(const struct vteprec_acl_entry *row, const char *dest_ip)
    2642                 :            : {
    2643                 :            :     struct ovsdb_datum datum;
    2644                 :            :     union ovsdb_atom key;
    2645                 :            : 
    2646         [ #  # ]:          0 :     ovs_assert(inited);
    2647         [ #  # ]:          0 :     if (dest_ip) {
    2648                 :          0 :         datum.n = 1;
    2649                 :          0 :         datum.keys = &key;
    2650                 :          0 :         key.string = CONST_CAST(char *, dest_ip);
    2651                 :            :     } else {
    2652                 :          0 :         datum.n = 0;
    2653                 :          0 :         datum.keys = NULL;
    2654                 :            :     }
    2655                 :          0 :     datum.values = NULL;
    2656                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP], &datum);
    2657                 :          0 : }
    2658                 :            : 
    2659                 :            : /* Sets the "dest_mac" column from the "ACL_entry" table in 'row' to
    2660                 :            :  * the 'dest_mac' set.
    2661                 :            :  *
    2662                 :            :  * If "dest_mac" is null, the column will be the empty set,
    2663                 :            :  * otherwise it will contain the specified value.
    2664                 :            :  *
    2665                 :            :  * The caller retains ownership of the arguments. */
    2666                 :            : void
    2667                 :          0 : vteprec_acl_entry_set_dest_mac(const struct vteprec_acl_entry *row, const char *dest_mac)
    2668                 :            : {
    2669                 :            :     struct ovsdb_datum datum;
    2670                 :            :     union ovsdb_atom key;
    2671                 :            : 
    2672         [ #  # ]:          0 :     ovs_assert(inited);
    2673         [ #  # ]:          0 :     if (dest_mac) {
    2674                 :          0 :         datum.n = 1;
    2675                 :          0 :         datum.keys = &key;
    2676                 :          0 :         key.string = CONST_CAST(char *, dest_mac);
    2677                 :            :     } else {
    2678                 :          0 :         datum.n = 0;
    2679                 :          0 :         datum.keys = NULL;
    2680                 :            :     }
    2681                 :          0 :     datum.values = NULL;
    2682                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC], &datum);
    2683                 :          0 : }
    2684                 :            : 
    2685                 :            : /* Sets the "dest_mask" column from the "ACL_entry" table in 'row' to
    2686                 :            :  * the 'dest_mask' set.
    2687                 :            :  *
    2688                 :            :  * If "dest_mask" is null, the column will be the empty set,
    2689                 :            :  * otherwise it will contain the specified value.
    2690                 :            :  *
    2691                 :            :  * The caller retains ownership of the arguments. */
    2692                 :            : void
    2693                 :          0 : vteprec_acl_entry_set_dest_mask(const struct vteprec_acl_entry *row, const char *dest_mask)
    2694                 :            : {
    2695                 :            :     struct ovsdb_datum datum;
    2696                 :            :     union ovsdb_atom key;
    2697                 :            : 
    2698         [ #  # ]:          0 :     ovs_assert(inited);
    2699         [ #  # ]:          0 :     if (dest_mask) {
    2700                 :          0 :         datum.n = 1;
    2701                 :          0 :         datum.keys = &key;
    2702                 :          0 :         key.string = CONST_CAST(char *, dest_mask);
    2703                 :            :     } else {
    2704                 :          0 :         datum.n = 0;
    2705                 :          0 :         datum.keys = NULL;
    2706                 :            :     }
    2707                 :          0 :     datum.values = NULL;
    2708                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK], &datum);
    2709                 :          0 : }
    2710                 :            : 
    2711                 :            : /* Sets the "dest_port_max" column from the "ACL_entry" table in 'row' to
    2712                 :            :  * the 'dest_port_max' set with 'n_dest_port_max' entries.
    2713                 :            :  *
    2714                 :            :  * 'n_dest_port_max' may be 0 or 1; if it is 0, then 'dest_port_max'
    2715                 :            :  * may be NULL.
    2716                 :            :  *
    2717                 :            :  * The caller retains ownership of the arguments. */
    2718                 :            : void
    2719                 :          0 : vteprec_acl_entry_set_dest_port_max(const struct vteprec_acl_entry *row, const int64_t *dest_port_max, size_t n_dest_port_max)
    2720                 :            : {
    2721                 :            :     struct ovsdb_datum datum;
    2722                 :            :     union ovsdb_atom key;
    2723                 :            : 
    2724         [ #  # ]:          0 :     ovs_assert(inited);
    2725         [ #  # ]:          0 :     if (n_dest_port_max) {
    2726                 :          0 :         datum.n = 1;
    2727                 :          0 :         datum.keys = &key;
    2728                 :          0 :         key.integer = *dest_port_max;
    2729                 :            :     } else {
    2730                 :          0 :         datum.n = 0;
    2731                 :          0 :         datum.keys = NULL;
    2732                 :            :     }
    2733                 :          0 :     datum.values = NULL;
    2734                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX], &datum);
    2735                 :          0 : }
    2736                 :            : 
    2737                 :            : /* Sets the "dest_port_min" column from the "ACL_entry" table in 'row' to
    2738                 :            :  * the 'dest_port_min' set with 'n_dest_port_min' entries.
    2739                 :            :  *
    2740                 :            :  * 'n_dest_port_min' may be 0 or 1; if it is 0, then 'dest_port_min'
    2741                 :            :  * may be NULL.
    2742                 :            :  *
    2743                 :            :  * The caller retains ownership of the arguments. */
    2744                 :            : void
    2745                 :          0 : vteprec_acl_entry_set_dest_port_min(const struct vteprec_acl_entry *row, const int64_t *dest_port_min, size_t n_dest_port_min)
    2746                 :            : {
    2747                 :            :     struct ovsdb_datum datum;
    2748                 :            :     union ovsdb_atom key;
    2749                 :            : 
    2750         [ #  # ]:          0 :     ovs_assert(inited);
    2751         [ #  # ]:          0 :     if (n_dest_port_min) {
    2752                 :          0 :         datum.n = 1;
    2753                 :          0 :         datum.keys = &key;
    2754                 :          0 :         key.integer = *dest_port_min;
    2755                 :            :     } else {
    2756                 :          0 :         datum.n = 0;
    2757                 :          0 :         datum.keys = NULL;
    2758                 :            :     }
    2759                 :          0 :     datum.values = NULL;
    2760                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN], &datum);
    2761                 :          0 : }
    2762                 :            : 
    2763                 :            : /* Sets the "direction" column from the "ACL_entry" table in 'row' to
    2764                 :            :  * 'direction'.
    2765                 :            :  *
    2766                 :            :  * Argument constraints: either "ingress" or "egress"
    2767                 :            :  *
    2768                 :            :  * The caller retains ownership of the arguments. */
    2769                 :            : void
    2770                 :          0 : vteprec_acl_entry_set_direction(const struct vteprec_acl_entry *row, const char *direction)
    2771                 :            : {
    2772                 :            :     struct ovsdb_datum datum;
    2773                 :            :     union ovsdb_atom key;
    2774                 :            : 
    2775         [ #  # ]:          0 :     ovs_assert(inited);
    2776                 :          0 :     datum.n = 1;
    2777                 :          0 :     datum.keys = &key;
    2778                 :          0 :     key.string = CONST_CAST(char *, direction);
    2779                 :          0 :     datum.values = NULL;
    2780                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DIRECTION], &datum);
    2781                 :          0 : }
    2782                 :            : 
    2783                 :            : /* Sets the "ethertype" column from the "ACL_entry" table in 'row' to
    2784                 :            :  * the 'ethertype' set.
    2785                 :            :  *
    2786                 :            :  * If "ethertype" is null, the column will be the empty set,
    2787                 :            :  * otherwise it will contain the specified value.
    2788                 :            :  *
    2789                 :            :  * The caller retains ownership of the arguments. */
    2790                 :            : void
    2791                 :          0 : vteprec_acl_entry_set_ethertype(const struct vteprec_acl_entry *row, const char *ethertype)
    2792                 :            : {
    2793                 :            :     struct ovsdb_datum datum;
    2794                 :            :     union ovsdb_atom key;
    2795                 :            : 
    2796         [ #  # ]:          0 :     ovs_assert(inited);
    2797         [ #  # ]:          0 :     if (ethertype) {
    2798                 :          0 :         datum.n = 1;
    2799                 :          0 :         datum.keys = &key;
    2800                 :          0 :         key.string = CONST_CAST(char *, ethertype);
    2801                 :            :     } else {
    2802                 :          0 :         datum.n = 0;
    2803                 :          0 :         datum.keys = NULL;
    2804                 :            :     }
    2805                 :          0 :     datum.values = NULL;
    2806                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE], &datum);
    2807                 :          0 : }
    2808                 :            : 
    2809                 :            : /* Sets the "icmp_code" column from the "ACL_entry" table in 'row' to
    2810                 :            :  * the 'icmp_code' set with 'n_icmp_code' entries.
    2811                 :            :  *
    2812                 :            :  * 'n_icmp_code' may be 0 or 1; if it is 0, then 'icmp_code'
    2813                 :            :  * may be NULL.
    2814                 :            :  *
    2815                 :            :  * The caller retains ownership of the arguments. */
    2816                 :            : void
    2817                 :          0 : vteprec_acl_entry_set_icmp_code(const struct vteprec_acl_entry *row, const int64_t *icmp_code, size_t n_icmp_code)
    2818                 :            : {
    2819                 :            :     struct ovsdb_datum datum;
    2820                 :            :     union ovsdb_atom key;
    2821                 :            : 
    2822         [ #  # ]:          0 :     ovs_assert(inited);
    2823         [ #  # ]:          0 :     if (n_icmp_code) {
    2824                 :          0 :         datum.n = 1;
    2825                 :          0 :         datum.keys = &key;
    2826                 :          0 :         key.integer = *icmp_code;
    2827                 :            :     } else {
    2828                 :          0 :         datum.n = 0;
    2829                 :          0 :         datum.keys = NULL;
    2830                 :            :     }
    2831                 :          0 :     datum.values = NULL;
    2832                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE], &datum);
    2833                 :          0 : }
    2834                 :            : 
    2835                 :            : /* Sets the "icmp_type" column from the "ACL_entry" table in 'row' to
    2836                 :            :  * the 'icmp_type' set with 'n_icmp_type' entries.
    2837                 :            :  *
    2838                 :            :  * 'n_icmp_type' may be 0 or 1; if it is 0, then 'icmp_type'
    2839                 :            :  * may be NULL.
    2840                 :            :  *
    2841                 :            :  * The caller retains ownership of the arguments. */
    2842                 :            : void
    2843                 :          0 : vteprec_acl_entry_set_icmp_type(const struct vteprec_acl_entry *row, const int64_t *icmp_type, size_t n_icmp_type)
    2844                 :            : {
    2845                 :            :     struct ovsdb_datum datum;
    2846                 :            :     union ovsdb_atom key;
    2847                 :            : 
    2848         [ #  # ]:          0 :     ovs_assert(inited);
    2849         [ #  # ]:          0 :     if (n_icmp_type) {
    2850                 :          0 :         datum.n = 1;
    2851                 :          0 :         datum.keys = &key;
    2852                 :          0 :         key.integer = *icmp_type;
    2853                 :            :     } else {
    2854                 :          0 :         datum.n = 0;
    2855                 :          0 :         datum.keys = NULL;
    2856                 :            :     }
    2857                 :          0 :     datum.values = NULL;
    2858                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE], &datum);
    2859                 :          0 : }
    2860                 :            : 
    2861                 :            : /* Sets the "protocol" column from the "ACL_entry" table in 'row' to
    2862                 :            :  * the 'protocol' set with 'n_protocol' entries.
    2863                 :            :  *
    2864                 :            :  * 'n_protocol' may be 0 or 1; if it is 0, then 'protocol'
    2865                 :            :  * may be NULL.
    2866                 :            :  *
    2867                 :            :  * The caller retains ownership of the arguments. */
    2868                 :            : void
    2869                 :          0 : vteprec_acl_entry_set_protocol(const struct vteprec_acl_entry *row, const int64_t *protocol, size_t n_protocol)
    2870                 :            : {
    2871                 :            :     struct ovsdb_datum datum;
    2872                 :            :     union ovsdb_atom key;
    2873                 :            : 
    2874         [ #  # ]:          0 :     ovs_assert(inited);
    2875         [ #  # ]:          0 :     if (n_protocol) {
    2876                 :          0 :         datum.n = 1;
    2877                 :          0 :         datum.keys = &key;
    2878                 :          0 :         key.integer = *protocol;
    2879                 :            :     } else {
    2880                 :          0 :         datum.n = 0;
    2881                 :          0 :         datum.keys = NULL;
    2882                 :            :     }
    2883                 :          0 :     datum.values = NULL;
    2884                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL], &datum);
    2885                 :          0 : }
    2886                 :            : 
    2887                 :            : /* Sets the "sequence" column from the "ACL_entry" table in 'row' to
    2888                 :            :  * 'sequence'.
    2889                 :            :  *
    2890                 :            :  * The caller retains ownership of the arguments. */
    2891                 :            : void
    2892                 :          0 : vteprec_acl_entry_set_sequence(const struct vteprec_acl_entry *row, int64_t sequence)
    2893                 :            : {
    2894                 :            :     struct ovsdb_datum datum;
    2895                 :            :     union ovsdb_atom key;
    2896                 :            : 
    2897         [ #  # ]:          0 :     ovs_assert(inited);
    2898                 :          0 :     datum.n = 1;
    2899                 :          0 :     datum.keys = &key;
    2900                 :          0 :     key.integer = sequence;
    2901                 :          0 :     datum.values = NULL;
    2902                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SEQUENCE], &datum);
    2903                 :          0 : }
    2904                 :            : 
    2905                 :            : /* Sets the "source_ip" column from the "ACL_entry" table in 'row' to
    2906                 :            :  * the 'source_ip' set.
    2907                 :            :  *
    2908                 :            :  * If "source_ip" is null, the column will be the empty set,
    2909                 :            :  * otherwise it will contain the specified value.
    2910                 :            :  *
    2911                 :            :  * The caller retains ownership of the arguments. */
    2912                 :            : void
    2913                 :          0 : vteprec_acl_entry_set_source_ip(const struct vteprec_acl_entry *row, const char *source_ip)
    2914                 :            : {
    2915                 :            :     struct ovsdb_datum datum;
    2916                 :            :     union ovsdb_atom key;
    2917                 :            : 
    2918         [ #  # ]:          0 :     ovs_assert(inited);
    2919         [ #  # ]:          0 :     if (source_ip) {
    2920                 :          0 :         datum.n = 1;
    2921                 :          0 :         datum.keys = &key;
    2922                 :          0 :         key.string = CONST_CAST(char *, source_ip);
    2923                 :            :     } else {
    2924                 :          0 :         datum.n = 0;
    2925                 :          0 :         datum.keys = NULL;
    2926                 :            :     }
    2927                 :          0 :     datum.values = NULL;
    2928                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP], &datum);
    2929                 :          0 : }
    2930                 :            : 
    2931                 :            : /* Sets the "source_mac" column from the "ACL_entry" table in 'row' to
    2932                 :            :  * the 'source_mac' set.
    2933                 :            :  *
    2934                 :            :  * If "source_mac" is null, the column will be the empty set,
    2935                 :            :  * otherwise it will contain the specified value.
    2936                 :            :  *
    2937                 :            :  * The caller retains ownership of the arguments. */
    2938                 :            : void
    2939                 :          0 : vteprec_acl_entry_set_source_mac(const struct vteprec_acl_entry *row, const char *source_mac)
    2940                 :            : {
    2941                 :            :     struct ovsdb_datum datum;
    2942                 :            :     union ovsdb_atom key;
    2943                 :            : 
    2944         [ #  # ]:          0 :     ovs_assert(inited);
    2945         [ #  # ]:          0 :     if (source_mac) {
    2946                 :          0 :         datum.n = 1;
    2947                 :          0 :         datum.keys = &key;
    2948                 :          0 :         key.string = CONST_CAST(char *, source_mac);
    2949                 :            :     } else {
    2950                 :          0 :         datum.n = 0;
    2951                 :          0 :         datum.keys = NULL;
    2952                 :            :     }
    2953                 :          0 :     datum.values = NULL;
    2954                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC], &datum);
    2955                 :          0 : }
    2956                 :            : 
    2957                 :            : /* Sets the "source_mask" column from the "ACL_entry" table in 'row' to
    2958                 :            :  * the 'source_mask' set.
    2959                 :            :  *
    2960                 :            :  * If "source_mask" is null, the column will be the empty set,
    2961                 :            :  * otherwise it will contain the specified value.
    2962                 :            :  *
    2963                 :            :  * The caller retains ownership of the arguments. */
    2964                 :            : void
    2965                 :          0 : vteprec_acl_entry_set_source_mask(const struct vteprec_acl_entry *row, const char *source_mask)
    2966                 :            : {
    2967                 :            :     struct ovsdb_datum datum;
    2968                 :            :     union ovsdb_atom key;
    2969                 :            : 
    2970         [ #  # ]:          0 :     ovs_assert(inited);
    2971         [ #  # ]:          0 :     if (source_mask) {
    2972                 :          0 :         datum.n = 1;
    2973                 :          0 :         datum.keys = &key;
    2974                 :          0 :         key.string = CONST_CAST(char *, source_mask);
    2975                 :            :     } else {
    2976                 :          0 :         datum.n = 0;
    2977                 :          0 :         datum.keys = NULL;
    2978                 :            :     }
    2979                 :          0 :     datum.values = NULL;
    2980                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK], &datum);
    2981                 :          0 : }
    2982                 :            : 
    2983                 :            : /* Sets the "source_port_max" column from the "ACL_entry" table in 'row' to
    2984                 :            :  * the 'source_port_max' set with 'n_source_port_max' entries.
    2985                 :            :  *
    2986                 :            :  * 'n_source_port_max' may be 0 or 1; if it is 0, then 'source_port_max'
    2987                 :            :  * may be NULL.
    2988                 :            :  *
    2989                 :            :  * The caller retains ownership of the arguments. */
    2990                 :            : void
    2991                 :          0 : vteprec_acl_entry_set_source_port_max(const struct vteprec_acl_entry *row, const int64_t *source_port_max, size_t n_source_port_max)
    2992                 :            : {
    2993                 :            :     struct ovsdb_datum datum;
    2994                 :            :     union ovsdb_atom key;
    2995                 :            : 
    2996         [ #  # ]:          0 :     ovs_assert(inited);
    2997         [ #  # ]:          0 :     if (n_source_port_max) {
    2998                 :          0 :         datum.n = 1;
    2999                 :          0 :         datum.keys = &key;
    3000                 :          0 :         key.integer = *source_port_max;
    3001                 :            :     } else {
    3002                 :          0 :         datum.n = 0;
    3003                 :          0 :         datum.keys = NULL;
    3004                 :            :     }
    3005                 :          0 :     datum.values = NULL;
    3006                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX], &datum);
    3007                 :          0 : }
    3008                 :            : 
    3009                 :            : /* Sets the "source_port_min" column from the "ACL_entry" table in 'row' to
    3010                 :            :  * the 'source_port_min' set with 'n_source_port_min' entries.
    3011                 :            :  *
    3012                 :            :  * 'n_source_port_min' may be 0 or 1; if it is 0, then 'source_port_min'
    3013                 :            :  * may be NULL.
    3014                 :            :  *
    3015                 :            :  * The caller retains ownership of the arguments. */
    3016                 :            : void
    3017                 :          0 : vteprec_acl_entry_set_source_port_min(const struct vteprec_acl_entry *row, const int64_t *source_port_min, size_t n_source_port_min)
    3018                 :            : {
    3019                 :            :     struct ovsdb_datum datum;
    3020                 :            :     union ovsdb_atom key;
    3021                 :            : 
    3022         [ #  # ]:          0 :     ovs_assert(inited);
    3023         [ #  # ]:          0 :     if (n_source_port_min) {
    3024                 :          0 :         datum.n = 1;
    3025                 :          0 :         datum.keys = &key;
    3026                 :          0 :         key.integer = *source_port_min;
    3027                 :            :     } else {
    3028                 :          0 :         datum.n = 0;
    3029                 :          0 :         datum.keys = NULL;
    3030                 :            :     }
    3031                 :          0 :     datum.values = NULL;
    3032                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN], &datum);
    3033                 :          0 : }
    3034                 :            : 
    3035                 :            : /* Sets the "tcp_flags" column from the "ACL_entry" table in 'row' to
    3036                 :            :  * the 'tcp_flags' set with 'n_tcp_flags' entries.
    3037                 :            :  *
    3038                 :            :  * 'n_tcp_flags' may be 0 or 1; if it is 0, then 'tcp_flags'
    3039                 :            :  * may be NULL.
    3040                 :            :  *
    3041                 :            :  * The caller retains ownership of the arguments. */
    3042                 :            : void
    3043                 :          0 : vteprec_acl_entry_set_tcp_flags(const struct vteprec_acl_entry *row, const int64_t *tcp_flags, size_t n_tcp_flags)
    3044                 :            : {
    3045                 :            :     struct ovsdb_datum datum;
    3046                 :            :     union ovsdb_atom key;
    3047                 :            : 
    3048         [ #  # ]:          0 :     ovs_assert(inited);
    3049         [ #  # ]:          0 :     if (n_tcp_flags) {
    3050                 :          0 :         datum.n = 1;
    3051                 :          0 :         datum.keys = &key;
    3052                 :          0 :         key.integer = *tcp_flags;
    3053                 :            :     } else {
    3054                 :          0 :         datum.n = 0;
    3055                 :          0 :         datum.keys = NULL;
    3056                 :            :     }
    3057                 :          0 :     datum.values = NULL;
    3058                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS], &datum);
    3059                 :          0 : }
    3060                 :            : 
    3061                 :            : /* Sets the "tcp_flags_mask" column from the "ACL_entry" table in 'row' to
    3062                 :            :  * the 'tcp_flags_mask' set with 'n_tcp_flags_mask' entries.
    3063                 :            :  *
    3064                 :            :  * 'n_tcp_flags_mask' may be 0 or 1; if it is 0, then 'tcp_flags_mask'
    3065                 :            :  * may be NULL.
    3066                 :            :  *
    3067                 :            :  * The caller retains ownership of the arguments. */
    3068                 :            : void
    3069                 :          0 : vteprec_acl_entry_set_tcp_flags_mask(const struct vteprec_acl_entry *row, const int64_t *tcp_flags_mask, size_t n_tcp_flags_mask)
    3070                 :            : {
    3071                 :            :     struct ovsdb_datum datum;
    3072                 :            :     union ovsdb_atom key;
    3073                 :            : 
    3074         [ #  # ]:          0 :     ovs_assert(inited);
    3075         [ #  # ]:          0 :     if (n_tcp_flags_mask) {
    3076                 :          0 :         datum.n = 1;
    3077                 :          0 :         datum.keys = &key;
    3078                 :          0 :         key.integer = *tcp_flags_mask;
    3079                 :            :     } else {
    3080                 :          0 :         datum.n = 0;
    3081                 :          0 :         datum.keys = NULL;
    3082                 :            :     }
    3083                 :          0 :     datum.values = NULL;
    3084                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK], &datum);
    3085                 :          0 : }
    3086                 :            : 
    3087                 :            : /* Adds the value 'new_value' to the "acle_fault_status" set column from the "ACL_entry" table
    3088                 :            :  * in 'row'.
    3089                 :            :  *
    3090                 :            :  */
    3091                 :            : void
    3092                 :          0 : vteprec_acl_entry_update_acle_fault_status_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3093                 :            : {
    3094                 :            :     struct ovsdb_datum *datum;
    3095                 :            : 
    3096         [ #  # ]:          0 :     ovs_assert(inited);
    3097                 :            : 
    3098                 :          0 :     datum = xmalloc(sizeof *datum);
    3099                 :          0 :     datum->n = 1;
    3100                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3101                 :          0 :     datum->values = NULL;
    3102                 :            : 
    3103                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3104                 :            : 
    3105                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3106                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS],
    3107                 :            :                                     datum);
    3108                 :          0 : }
    3109                 :            : 
    3110                 :            : /* Deletes the value 'delete_value' from the "acle_fault_status" set column from the
    3111                 :            :  * "ACL_entry" table in 'row'.
    3112                 :            :  *
    3113                 :            :  */
    3114                 :            : void
    3115                 :          0 : vteprec_acl_entry_update_acle_fault_status_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3116                 :            : {
    3117                 :            :     struct ovsdb_datum *datum;
    3118                 :            : 
    3119         [ #  # ]:          0 :     ovs_assert(inited);
    3120                 :            : 
    3121                 :          0 :     datum = xmalloc(sizeof *datum);
    3122                 :          0 :     datum->n = 1;
    3123                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3124                 :          0 :     datum->values = NULL;
    3125                 :            : 
    3126                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3127                 :            : 
    3128                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3129                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS],
    3130                 :            :                                     datum);
    3131                 :          0 : }
    3132                 :            : 
    3133                 :            : /* Adds the value 'new_value' to the "dest_ip" set column from the "ACL_entry" table
    3134                 :            :  * in 'row'.
    3135                 :            :  *
    3136                 :            :  */
    3137                 :            : void
    3138                 :          0 : vteprec_acl_entry_update_dest_ip_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3139                 :            : {
    3140                 :            :     struct ovsdb_datum *datum;
    3141                 :            : 
    3142         [ #  # ]:          0 :     ovs_assert(inited);
    3143                 :            : 
    3144                 :          0 :     datum = xmalloc(sizeof *datum);
    3145                 :          0 :     datum->n = 1;
    3146                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3147                 :          0 :     datum->values = NULL;
    3148                 :            : 
    3149                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3150                 :            : 
    3151                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3152                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP],
    3153                 :            :                                     datum);
    3154                 :          0 : }
    3155                 :            : 
    3156                 :            : /* Deletes the value 'delete_value' from the "dest_ip" set column from the
    3157                 :            :  * "ACL_entry" table in 'row'.
    3158                 :            :  *
    3159                 :            :  */
    3160                 :            : void
    3161                 :          0 : vteprec_acl_entry_update_dest_ip_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3162                 :            : {
    3163                 :            :     struct ovsdb_datum *datum;
    3164                 :            : 
    3165         [ #  # ]:          0 :     ovs_assert(inited);
    3166                 :            : 
    3167                 :          0 :     datum = xmalloc(sizeof *datum);
    3168                 :          0 :     datum->n = 1;
    3169                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3170                 :          0 :     datum->values = NULL;
    3171                 :            : 
    3172                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3173                 :            : 
    3174                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3175                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP],
    3176                 :            :                                     datum);
    3177                 :          0 : }
    3178                 :            : 
    3179                 :            : /* Adds the value 'new_value' to the "dest_mac" set column from the "ACL_entry" table
    3180                 :            :  * in 'row'.
    3181                 :            :  *
    3182                 :            :  */
    3183                 :            : void
    3184                 :          0 : vteprec_acl_entry_update_dest_mac_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3185                 :            : {
    3186                 :            :     struct ovsdb_datum *datum;
    3187                 :            : 
    3188         [ #  # ]:          0 :     ovs_assert(inited);
    3189                 :            : 
    3190                 :          0 :     datum = xmalloc(sizeof *datum);
    3191                 :          0 :     datum->n = 1;
    3192                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3193                 :          0 :     datum->values = NULL;
    3194                 :            : 
    3195                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3196                 :            : 
    3197                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3198                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC],
    3199                 :            :                                     datum);
    3200                 :          0 : }
    3201                 :            : 
    3202                 :            : /* Deletes the value 'delete_value' from the "dest_mac" set column from the
    3203                 :            :  * "ACL_entry" table in 'row'.
    3204                 :            :  *
    3205                 :            :  */
    3206                 :            : void
    3207                 :          0 : vteprec_acl_entry_update_dest_mac_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3208                 :            : {
    3209                 :            :     struct ovsdb_datum *datum;
    3210                 :            : 
    3211         [ #  # ]:          0 :     ovs_assert(inited);
    3212                 :            : 
    3213                 :          0 :     datum = xmalloc(sizeof *datum);
    3214                 :          0 :     datum->n = 1;
    3215                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3216                 :          0 :     datum->values = NULL;
    3217                 :            : 
    3218                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3219                 :            : 
    3220                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3221                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC],
    3222                 :            :                                     datum);
    3223                 :          0 : }
    3224                 :            : 
    3225                 :            : /* Adds the value 'new_value' to the "dest_mask" set column from the "ACL_entry" table
    3226                 :            :  * in 'row'.
    3227                 :            :  *
    3228                 :            :  */
    3229                 :            : void
    3230                 :          0 : vteprec_acl_entry_update_dest_mask_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3231                 :            : {
    3232                 :            :     struct ovsdb_datum *datum;
    3233                 :            : 
    3234         [ #  # ]:          0 :     ovs_assert(inited);
    3235                 :            : 
    3236                 :          0 :     datum = xmalloc(sizeof *datum);
    3237                 :          0 :     datum->n = 1;
    3238                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3239                 :          0 :     datum->values = NULL;
    3240                 :            : 
    3241                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3242                 :            : 
    3243                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3244                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK],
    3245                 :            :                                     datum);
    3246                 :          0 : }
    3247                 :            : 
    3248                 :            : /* Deletes the value 'delete_value' from the "dest_mask" set column from the
    3249                 :            :  * "ACL_entry" table in 'row'.
    3250                 :            :  *
    3251                 :            :  */
    3252                 :            : void
    3253                 :          0 : vteprec_acl_entry_update_dest_mask_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3254                 :            : {
    3255                 :            :     struct ovsdb_datum *datum;
    3256                 :            : 
    3257         [ #  # ]:          0 :     ovs_assert(inited);
    3258                 :            : 
    3259                 :          0 :     datum = xmalloc(sizeof *datum);
    3260                 :          0 :     datum->n = 1;
    3261                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3262                 :          0 :     datum->values = NULL;
    3263                 :            : 
    3264                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3265                 :            : 
    3266                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3267                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK],
    3268                 :            :                                     datum);
    3269                 :          0 : }
    3270                 :            : 
    3271                 :            : /* Adds the value 'new_value' to the "dest_port_max" set column from the "ACL_entry" table
    3272                 :            :  * in 'row'.
    3273                 :            :  *
    3274                 :            :  */
    3275                 :            : void
    3276                 :          0 : vteprec_acl_entry_update_dest_port_max_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3277                 :            : {
    3278                 :            :     struct ovsdb_datum *datum;
    3279                 :            : 
    3280         [ #  # ]:          0 :     ovs_assert(inited);
    3281                 :            : 
    3282                 :          0 :     datum = xmalloc(sizeof *datum);
    3283                 :          0 :     datum->n = 1;
    3284                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3285                 :          0 :     datum->values = NULL;
    3286                 :            : 
    3287                 :          0 :     datum->keys[0].integer = new_value;
    3288                 :            : 
    3289                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3290                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX],
    3291                 :            :                                     datum);
    3292                 :          0 : }
    3293                 :            : 
    3294                 :            : /* Deletes the value 'delete_value' from the "dest_port_max" set column from the
    3295                 :            :  * "ACL_entry" table in 'row'.
    3296                 :            :  *
    3297                 :            :  */
    3298                 :            : void
    3299                 :          0 : vteprec_acl_entry_update_dest_port_max_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3300                 :            : {
    3301                 :            :     struct ovsdb_datum *datum;
    3302                 :            : 
    3303         [ #  # ]:          0 :     ovs_assert(inited);
    3304                 :            : 
    3305                 :          0 :     datum = xmalloc(sizeof *datum);
    3306                 :          0 :     datum->n = 1;
    3307                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3308                 :          0 :     datum->values = NULL;
    3309                 :            : 
    3310                 :          0 :     datum->keys[0].integer = delete_value;
    3311                 :            : 
    3312                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3313                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX],
    3314                 :            :                                     datum);
    3315                 :          0 : }
    3316                 :            : 
    3317                 :            : /* Adds the value 'new_value' to the "dest_port_min" set column from the "ACL_entry" table
    3318                 :            :  * in 'row'.
    3319                 :            :  *
    3320                 :            :  */
    3321                 :            : void
    3322                 :          0 : vteprec_acl_entry_update_dest_port_min_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3323                 :            : {
    3324                 :            :     struct ovsdb_datum *datum;
    3325                 :            : 
    3326         [ #  # ]:          0 :     ovs_assert(inited);
    3327                 :            : 
    3328                 :          0 :     datum = xmalloc(sizeof *datum);
    3329                 :          0 :     datum->n = 1;
    3330                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3331                 :          0 :     datum->values = NULL;
    3332                 :            : 
    3333                 :          0 :     datum->keys[0].integer = new_value;
    3334                 :            : 
    3335                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3336                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN],
    3337                 :            :                                     datum);
    3338                 :          0 : }
    3339                 :            : 
    3340                 :            : /* Deletes the value 'delete_value' from the "dest_port_min" set column from the
    3341                 :            :  * "ACL_entry" table in 'row'.
    3342                 :            :  *
    3343                 :            :  */
    3344                 :            : void
    3345                 :          0 : vteprec_acl_entry_update_dest_port_min_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3346                 :            : {
    3347                 :            :     struct ovsdb_datum *datum;
    3348                 :            : 
    3349         [ #  # ]:          0 :     ovs_assert(inited);
    3350                 :            : 
    3351                 :          0 :     datum = xmalloc(sizeof *datum);
    3352                 :          0 :     datum->n = 1;
    3353                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3354                 :          0 :     datum->values = NULL;
    3355                 :            : 
    3356                 :          0 :     datum->keys[0].integer = delete_value;
    3357                 :            : 
    3358                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3359                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN],
    3360                 :            :                                     datum);
    3361                 :          0 : }
    3362                 :            : 
    3363                 :            : /* Adds the value 'new_value' to the "ethertype" set column from the "ACL_entry" table
    3364                 :            :  * in 'row'.
    3365                 :            :  *
    3366                 :            :  */
    3367                 :            : void
    3368                 :          0 : vteprec_acl_entry_update_ethertype_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3369                 :            : {
    3370                 :            :     struct ovsdb_datum *datum;
    3371                 :            : 
    3372         [ #  # ]:          0 :     ovs_assert(inited);
    3373                 :            : 
    3374                 :          0 :     datum = xmalloc(sizeof *datum);
    3375                 :          0 :     datum->n = 1;
    3376                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3377                 :          0 :     datum->values = NULL;
    3378                 :            : 
    3379                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3380                 :            : 
    3381                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3382                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE],
    3383                 :            :                                     datum);
    3384                 :          0 : }
    3385                 :            : 
    3386                 :            : /* Deletes the value 'delete_value' from the "ethertype" set column from the
    3387                 :            :  * "ACL_entry" table in 'row'.
    3388                 :            :  *
    3389                 :            :  */
    3390                 :            : void
    3391                 :          0 : vteprec_acl_entry_update_ethertype_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3392                 :            : {
    3393                 :            :     struct ovsdb_datum *datum;
    3394                 :            : 
    3395         [ #  # ]:          0 :     ovs_assert(inited);
    3396                 :            : 
    3397                 :          0 :     datum = xmalloc(sizeof *datum);
    3398                 :          0 :     datum->n = 1;
    3399                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3400                 :          0 :     datum->values = NULL;
    3401                 :            : 
    3402                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3403                 :            : 
    3404                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3405                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE],
    3406                 :            :                                     datum);
    3407                 :          0 : }
    3408                 :            : 
    3409                 :            : /* Adds the value 'new_value' to the "icmp_code" set column from the "ACL_entry" table
    3410                 :            :  * in 'row'.
    3411                 :            :  *
    3412                 :            :  */
    3413                 :            : void
    3414                 :          0 : vteprec_acl_entry_update_icmp_code_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3415                 :            : {
    3416                 :            :     struct ovsdb_datum *datum;
    3417                 :            : 
    3418         [ #  # ]:          0 :     ovs_assert(inited);
    3419                 :            : 
    3420                 :          0 :     datum = xmalloc(sizeof *datum);
    3421                 :          0 :     datum->n = 1;
    3422                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3423                 :          0 :     datum->values = NULL;
    3424                 :            : 
    3425                 :          0 :     datum->keys[0].integer = new_value;
    3426                 :            : 
    3427                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3428                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE],
    3429                 :            :                                     datum);
    3430                 :          0 : }
    3431                 :            : 
    3432                 :            : /* Deletes the value 'delete_value' from the "icmp_code" set column from the
    3433                 :            :  * "ACL_entry" table in 'row'.
    3434                 :            :  *
    3435                 :            :  */
    3436                 :            : void
    3437                 :          0 : vteprec_acl_entry_update_icmp_code_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3438                 :            : {
    3439                 :            :     struct ovsdb_datum *datum;
    3440                 :            : 
    3441         [ #  # ]:          0 :     ovs_assert(inited);
    3442                 :            : 
    3443                 :          0 :     datum = xmalloc(sizeof *datum);
    3444                 :          0 :     datum->n = 1;
    3445                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3446                 :          0 :     datum->values = NULL;
    3447                 :            : 
    3448                 :          0 :     datum->keys[0].integer = delete_value;
    3449                 :            : 
    3450                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3451                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE],
    3452                 :            :                                     datum);
    3453                 :          0 : }
    3454                 :            : 
    3455                 :            : /* Adds the value 'new_value' to the "icmp_type" set column from the "ACL_entry" table
    3456                 :            :  * in 'row'.
    3457                 :            :  *
    3458                 :            :  */
    3459                 :            : void
    3460                 :          0 : vteprec_acl_entry_update_icmp_type_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3461                 :            : {
    3462                 :            :     struct ovsdb_datum *datum;
    3463                 :            : 
    3464         [ #  # ]:          0 :     ovs_assert(inited);
    3465                 :            : 
    3466                 :          0 :     datum = xmalloc(sizeof *datum);
    3467                 :          0 :     datum->n = 1;
    3468                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3469                 :          0 :     datum->values = NULL;
    3470                 :            : 
    3471                 :          0 :     datum->keys[0].integer = new_value;
    3472                 :            : 
    3473                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3474                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE],
    3475                 :            :                                     datum);
    3476                 :          0 : }
    3477                 :            : 
    3478                 :            : /* Deletes the value 'delete_value' from the "icmp_type" set column from the
    3479                 :            :  * "ACL_entry" table in 'row'.
    3480                 :            :  *
    3481                 :            :  */
    3482                 :            : void
    3483                 :          0 : vteprec_acl_entry_update_icmp_type_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3484                 :            : {
    3485                 :            :     struct ovsdb_datum *datum;
    3486                 :            : 
    3487         [ #  # ]:          0 :     ovs_assert(inited);
    3488                 :            : 
    3489                 :          0 :     datum = xmalloc(sizeof *datum);
    3490                 :          0 :     datum->n = 1;
    3491                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3492                 :          0 :     datum->values = NULL;
    3493                 :            : 
    3494                 :          0 :     datum->keys[0].integer = delete_value;
    3495                 :            : 
    3496                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3497                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE],
    3498                 :            :                                     datum);
    3499                 :          0 : }
    3500                 :            : 
    3501                 :            : /* Adds the value 'new_value' to the "protocol" set column from the "ACL_entry" table
    3502                 :            :  * in 'row'.
    3503                 :            :  *
    3504                 :            :  */
    3505                 :            : void
    3506                 :          0 : vteprec_acl_entry_update_protocol_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3507                 :            : {
    3508                 :            :     struct ovsdb_datum *datum;
    3509                 :            : 
    3510         [ #  # ]:          0 :     ovs_assert(inited);
    3511                 :            : 
    3512                 :          0 :     datum = xmalloc(sizeof *datum);
    3513                 :          0 :     datum->n = 1;
    3514                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3515                 :          0 :     datum->values = NULL;
    3516                 :            : 
    3517                 :          0 :     datum->keys[0].integer = new_value;
    3518                 :            : 
    3519                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3520                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL],
    3521                 :            :                                     datum);
    3522                 :          0 : }
    3523                 :            : 
    3524                 :            : /* Deletes the value 'delete_value' from the "protocol" set column from the
    3525                 :            :  * "ACL_entry" table in 'row'.
    3526                 :            :  *
    3527                 :            :  */
    3528                 :            : void
    3529                 :          0 : vteprec_acl_entry_update_protocol_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3530                 :            : {
    3531                 :            :     struct ovsdb_datum *datum;
    3532                 :            : 
    3533         [ #  # ]:          0 :     ovs_assert(inited);
    3534                 :            : 
    3535                 :          0 :     datum = xmalloc(sizeof *datum);
    3536                 :          0 :     datum->n = 1;
    3537                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3538                 :          0 :     datum->values = NULL;
    3539                 :            : 
    3540                 :          0 :     datum->keys[0].integer = delete_value;
    3541                 :            : 
    3542                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3543                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL],
    3544                 :            :                                     datum);
    3545                 :          0 : }
    3546                 :            : 
    3547                 :            : /* Adds the value 'new_value' to the "source_ip" set column from the "ACL_entry" table
    3548                 :            :  * in 'row'.
    3549                 :            :  *
    3550                 :            :  */
    3551                 :            : void
    3552                 :          0 : vteprec_acl_entry_update_source_ip_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3553                 :            : {
    3554                 :            :     struct ovsdb_datum *datum;
    3555                 :            : 
    3556         [ #  # ]:          0 :     ovs_assert(inited);
    3557                 :            : 
    3558                 :          0 :     datum = xmalloc(sizeof *datum);
    3559                 :          0 :     datum->n = 1;
    3560                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3561                 :          0 :     datum->values = NULL;
    3562                 :            : 
    3563                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3564                 :            : 
    3565                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3566                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP],
    3567                 :            :                                     datum);
    3568                 :          0 : }
    3569                 :            : 
    3570                 :            : /* Deletes the value 'delete_value' from the "source_ip" set column from the
    3571                 :            :  * "ACL_entry" table in 'row'.
    3572                 :            :  *
    3573                 :            :  */
    3574                 :            : void
    3575                 :          0 : vteprec_acl_entry_update_source_ip_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3576                 :            : {
    3577                 :            :     struct ovsdb_datum *datum;
    3578                 :            : 
    3579         [ #  # ]:          0 :     ovs_assert(inited);
    3580                 :            : 
    3581                 :          0 :     datum = xmalloc(sizeof *datum);
    3582                 :          0 :     datum->n = 1;
    3583                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3584                 :          0 :     datum->values = NULL;
    3585                 :            : 
    3586                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3587                 :            : 
    3588                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3589                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP],
    3590                 :            :                                     datum);
    3591                 :          0 : }
    3592                 :            : 
    3593                 :            : /* Adds the value 'new_value' to the "source_mac" set column from the "ACL_entry" table
    3594                 :            :  * in 'row'.
    3595                 :            :  *
    3596                 :            :  */
    3597                 :            : void
    3598                 :          0 : vteprec_acl_entry_update_source_mac_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3599                 :            : {
    3600                 :            :     struct ovsdb_datum *datum;
    3601                 :            : 
    3602         [ #  # ]:          0 :     ovs_assert(inited);
    3603                 :            : 
    3604                 :          0 :     datum = xmalloc(sizeof *datum);
    3605                 :          0 :     datum->n = 1;
    3606                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3607                 :          0 :     datum->values = NULL;
    3608                 :            : 
    3609                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3610                 :            : 
    3611                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3612                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC],
    3613                 :            :                                     datum);
    3614                 :          0 : }
    3615                 :            : 
    3616                 :            : /* Deletes the value 'delete_value' from the "source_mac" set column from the
    3617                 :            :  * "ACL_entry" table in 'row'.
    3618                 :            :  *
    3619                 :            :  */
    3620                 :            : void
    3621                 :          0 : vteprec_acl_entry_update_source_mac_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3622                 :            : {
    3623                 :            :     struct ovsdb_datum *datum;
    3624                 :            : 
    3625         [ #  # ]:          0 :     ovs_assert(inited);
    3626                 :            : 
    3627                 :          0 :     datum = xmalloc(sizeof *datum);
    3628                 :          0 :     datum->n = 1;
    3629                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3630                 :          0 :     datum->values = NULL;
    3631                 :            : 
    3632                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3633                 :            : 
    3634                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3635                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC],
    3636                 :            :                                     datum);
    3637                 :          0 : }
    3638                 :            : 
    3639                 :            : /* Adds the value 'new_value' to the "source_mask" set column from the "ACL_entry" table
    3640                 :            :  * in 'row'.
    3641                 :            :  *
    3642                 :            :  */
    3643                 :            : void
    3644                 :          0 : vteprec_acl_entry_update_source_mask_addvalue(const struct vteprec_acl_entry *row, const char *new_value)
    3645                 :            : {
    3646                 :            :     struct ovsdb_datum *datum;
    3647                 :            : 
    3648         [ #  # ]:          0 :     ovs_assert(inited);
    3649                 :            : 
    3650                 :          0 :     datum = xmalloc(sizeof *datum);
    3651                 :          0 :     datum->n = 1;
    3652                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3653                 :          0 :     datum->values = NULL;
    3654                 :            : 
    3655                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    3656                 :            : 
    3657                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3658                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK],
    3659                 :            :                                     datum);
    3660                 :          0 : }
    3661                 :            : 
    3662                 :            : /* Deletes the value 'delete_value' from the "source_mask" set column from the
    3663                 :            :  * "ACL_entry" table in 'row'.
    3664                 :            :  *
    3665                 :            :  */
    3666                 :            : void
    3667                 :          0 : vteprec_acl_entry_update_source_mask_delvalue(const struct vteprec_acl_entry *row, const char *delete_value)
    3668                 :            : {
    3669                 :            :     struct ovsdb_datum *datum;
    3670                 :            : 
    3671         [ #  # ]:          0 :     ovs_assert(inited);
    3672                 :            : 
    3673                 :          0 :     datum = xmalloc(sizeof *datum);
    3674                 :          0 :     datum->n = 1;
    3675                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3676                 :          0 :     datum->values = NULL;
    3677                 :            : 
    3678                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    3679                 :            : 
    3680                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3681                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK],
    3682                 :            :                                     datum);
    3683                 :          0 : }
    3684                 :            : 
    3685                 :            : /* Adds the value 'new_value' to the "source_port_max" set column from the "ACL_entry" table
    3686                 :            :  * in 'row'.
    3687                 :            :  *
    3688                 :            :  */
    3689                 :            : void
    3690                 :          0 : vteprec_acl_entry_update_source_port_max_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3691                 :            : {
    3692                 :            :     struct ovsdb_datum *datum;
    3693                 :            : 
    3694         [ #  # ]:          0 :     ovs_assert(inited);
    3695                 :            : 
    3696                 :          0 :     datum = xmalloc(sizeof *datum);
    3697                 :          0 :     datum->n = 1;
    3698                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3699                 :          0 :     datum->values = NULL;
    3700                 :            : 
    3701                 :          0 :     datum->keys[0].integer = new_value;
    3702                 :            : 
    3703                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3704                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX],
    3705                 :            :                                     datum);
    3706                 :          0 : }
    3707                 :            : 
    3708                 :            : /* Deletes the value 'delete_value' from the "source_port_max" set column from the
    3709                 :            :  * "ACL_entry" table in 'row'.
    3710                 :            :  *
    3711                 :            :  */
    3712                 :            : void
    3713                 :          0 : vteprec_acl_entry_update_source_port_max_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3714                 :            : {
    3715                 :            :     struct ovsdb_datum *datum;
    3716                 :            : 
    3717         [ #  # ]:          0 :     ovs_assert(inited);
    3718                 :            : 
    3719                 :          0 :     datum = xmalloc(sizeof *datum);
    3720                 :          0 :     datum->n = 1;
    3721                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3722                 :          0 :     datum->values = NULL;
    3723                 :            : 
    3724                 :          0 :     datum->keys[0].integer = delete_value;
    3725                 :            : 
    3726                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3727                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX],
    3728                 :            :                                     datum);
    3729                 :          0 : }
    3730                 :            : 
    3731                 :            : /* Adds the value 'new_value' to the "source_port_min" set column from the "ACL_entry" table
    3732                 :            :  * in 'row'.
    3733                 :            :  *
    3734                 :            :  */
    3735                 :            : void
    3736                 :          0 : vteprec_acl_entry_update_source_port_min_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3737                 :            : {
    3738                 :            :     struct ovsdb_datum *datum;
    3739                 :            : 
    3740         [ #  # ]:          0 :     ovs_assert(inited);
    3741                 :            : 
    3742                 :          0 :     datum = xmalloc(sizeof *datum);
    3743                 :          0 :     datum->n = 1;
    3744                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3745                 :          0 :     datum->values = NULL;
    3746                 :            : 
    3747                 :          0 :     datum->keys[0].integer = new_value;
    3748                 :            : 
    3749                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3750                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN],
    3751                 :            :                                     datum);
    3752                 :          0 : }
    3753                 :            : 
    3754                 :            : /* Deletes the value 'delete_value' from the "source_port_min" set column from the
    3755                 :            :  * "ACL_entry" table in 'row'.
    3756                 :            :  *
    3757                 :            :  */
    3758                 :            : void
    3759                 :          0 : vteprec_acl_entry_update_source_port_min_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3760                 :            : {
    3761                 :            :     struct ovsdb_datum *datum;
    3762                 :            : 
    3763         [ #  # ]:          0 :     ovs_assert(inited);
    3764                 :            : 
    3765                 :          0 :     datum = xmalloc(sizeof *datum);
    3766                 :          0 :     datum->n = 1;
    3767                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3768                 :          0 :     datum->values = NULL;
    3769                 :            : 
    3770                 :          0 :     datum->keys[0].integer = delete_value;
    3771                 :            : 
    3772                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3773                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN],
    3774                 :            :                                     datum);
    3775                 :          0 : }
    3776                 :            : 
    3777                 :            : /* Adds the value 'new_value' to the "tcp_flags" set column from the "ACL_entry" table
    3778                 :            :  * in 'row'.
    3779                 :            :  *
    3780                 :            :  */
    3781                 :            : void
    3782                 :          0 : vteprec_acl_entry_update_tcp_flags_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3783                 :            : {
    3784                 :            :     struct ovsdb_datum *datum;
    3785                 :            : 
    3786         [ #  # ]:          0 :     ovs_assert(inited);
    3787                 :            : 
    3788                 :          0 :     datum = xmalloc(sizeof *datum);
    3789                 :          0 :     datum->n = 1;
    3790                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3791                 :          0 :     datum->values = NULL;
    3792                 :            : 
    3793                 :          0 :     datum->keys[0].integer = new_value;
    3794                 :            : 
    3795                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3796                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS],
    3797                 :            :                                     datum);
    3798                 :          0 : }
    3799                 :            : 
    3800                 :            : /* Deletes the value 'delete_value' from the "tcp_flags" set column from the
    3801                 :            :  * "ACL_entry" table in 'row'.
    3802                 :            :  *
    3803                 :            :  */
    3804                 :            : void
    3805                 :          0 : vteprec_acl_entry_update_tcp_flags_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3806                 :            : {
    3807                 :            :     struct ovsdb_datum *datum;
    3808                 :            : 
    3809         [ #  # ]:          0 :     ovs_assert(inited);
    3810                 :            : 
    3811                 :          0 :     datum = xmalloc(sizeof *datum);
    3812                 :          0 :     datum->n = 1;
    3813                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3814                 :          0 :     datum->values = NULL;
    3815                 :            : 
    3816                 :          0 :     datum->keys[0].integer = delete_value;
    3817                 :            : 
    3818                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3819                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS],
    3820                 :            :                                     datum);
    3821                 :          0 : }
    3822                 :            : 
    3823                 :            : /* Adds the value 'new_value' to the "tcp_flags_mask" set column from the "ACL_entry" table
    3824                 :            :  * in 'row'.
    3825                 :            :  *
    3826                 :            :  */
    3827                 :            : void
    3828                 :          0 : vteprec_acl_entry_update_tcp_flags_mask_addvalue(const struct vteprec_acl_entry *row, int64_t new_value)
    3829                 :            : {
    3830                 :            :     struct ovsdb_datum *datum;
    3831                 :            : 
    3832         [ #  # ]:          0 :     ovs_assert(inited);
    3833                 :            : 
    3834                 :          0 :     datum = xmalloc(sizeof *datum);
    3835                 :          0 :     datum->n = 1;
    3836                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3837                 :          0 :     datum->values = NULL;
    3838                 :            : 
    3839                 :          0 :     datum->keys[0].integer = new_value;
    3840                 :            : 
    3841                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    3842                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK],
    3843                 :            :                                     datum);
    3844                 :          0 : }
    3845                 :            : 
    3846                 :            : /* Deletes the value 'delete_value' from the "tcp_flags_mask" set column from the
    3847                 :            :  * "ACL_entry" table in 'row'.
    3848                 :            :  *
    3849                 :            :  */
    3850                 :            : void
    3851                 :          0 : vteprec_acl_entry_update_tcp_flags_mask_delvalue(const struct vteprec_acl_entry *row, int64_t delete_value)
    3852                 :            : {
    3853                 :            :     struct ovsdb_datum *datum;
    3854                 :            : 
    3855         [ #  # ]:          0 :     ovs_assert(inited);
    3856                 :            : 
    3857                 :          0 :     datum = xmalloc(sizeof *datum);
    3858                 :          0 :     datum->n = 1;
    3859                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    3860                 :          0 :     datum->values = NULL;
    3861                 :            : 
    3862                 :          0 :     datum->keys[0].integer = delete_value;
    3863                 :            : 
    3864                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    3865                 :            :                                     &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK],
    3866                 :            :                                     datum);
    3867                 :          0 : }
    3868                 :            : 
    3869                 :            : /* Sets the "acle_fault_status" column from the "ACL_entry" table in 'row' to
    3870                 :            :  * the 'acle_fault_status' set with 'n_acle_fault_status' entries.
    3871                 :            :  *
    3872                 :            :  * The caller retains ownership of the arguments. */
    3873                 :            : void
    3874                 :          0 : vteprec_acl_entry_add_clause_acle_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **acle_fault_status, size_t n_acle_fault_status)
    3875                 :            : {
    3876                 :            :     struct ovsdb_datum datum;
    3877                 :            :     size_t i;
    3878                 :            : 
    3879         [ #  # ]:          0 :     ovs_assert(inited);
    3880                 :          0 :     datum.n = n_acle_fault_status;
    3881         [ #  # ]:          0 :     datum.keys = n_acle_fault_status ? xmalloc(n_acle_fault_status * sizeof *datum.keys) : NULL;
    3882                 :          0 :     datum.values = NULL;
    3883         [ #  # ]:          0 :     for (i = 0; i < n_acle_fault_status; i++) {
    3884                 :          0 :         datum.keys[i].string = CONST_CAST(char *, acle_fault_status[i]);
    3885                 :            :     }
    3886                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    3887                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    3888                 :            :                           function,
    3889                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS],
    3890                 :            :                           &datum);
    3891                 :          0 :     free(datum.keys);
    3892                 :          0 : }
    3893                 :            : 
    3894                 :            : /* Sets the "action" column from the "ACL_entry" table in 'row' to
    3895                 :            :  * 'action'.
    3896                 :            :  *
    3897                 :            :  * Argument constraints: either "deny" or "permit"
    3898                 :            :  *
    3899                 :            :  * The caller retains ownership of the arguments. */
    3900                 :            : void
    3901                 :          0 : vteprec_acl_entry_add_clause_action(struct ovsdb_idl *idl, enum ovsdb_function function, const char *action)
    3902                 :            : {
    3903                 :            :     struct ovsdb_datum datum;
    3904                 :            :     union ovsdb_atom key;
    3905                 :            : 
    3906         [ #  # ]:          0 :     ovs_assert(inited);
    3907                 :          0 :     datum.n = 1;
    3908                 :          0 :     datum.keys = &key;
    3909                 :          0 :     key.string = CONST_CAST(char *, action);
    3910                 :          0 :     datum.values = NULL;
    3911                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    3912                 :            :                           function,
    3913                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACTION],
    3914                 :            :                           &datum);
    3915                 :          0 : }
    3916                 :            : 
    3917                 :            : /* Sets the "dest_ip" column from the "ACL_entry" table in 'row' to
    3918                 :            :  * the 'dest_ip' set.
    3919                 :            :  *
    3920                 :            :  * If "dest_ip" is null, the column will be the empty set,
    3921                 :            :  * otherwise it will contain the specified value.
    3922                 :            :  *
    3923                 :            :  * The caller retains ownership of the arguments. */
    3924                 :            : void
    3925                 :          0 : vteprec_acl_entry_add_clause_dest_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_ip)
    3926                 :            : {
    3927                 :            :     struct ovsdb_datum datum;
    3928                 :            :     union ovsdb_atom key;
    3929                 :            : 
    3930         [ #  # ]:          0 :     ovs_assert(inited);
    3931         [ #  # ]:          0 :     if (dest_ip) {
    3932                 :          0 :         datum.n = 1;
    3933                 :          0 :         datum.keys = &key;
    3934                 :          0 :         key.string = CONST_CAST(char *, dest_ip);
    3935                 :            :     } else {
    3936                 :          0 :         datum.n = 0;
    3937                 :          0 :         datum.keys = NULL;
    3938                 :            :     }
    3939                 :          0 :     datum.values = NULL;
    3940                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    3941                 :            :                           function,
    3942                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP],
    3943                 :            :                           &datum);
    3944                 :          0 : }
    3945                 :            : 
    3946                 :            : /* Sets the "dest_mac" column from the "ACL_entry" table in 'row' to
    3947                 :            :  * the 'dest_mac' set.
    3948                 :            :  *
    3949                 :            :  * If "dest_mac" is null, the column will be the empty set,
    3950                 :            :  * otherwise it will contain the specified value.
    3951                 :            :  *
    3952                 :            :  * The caller retains ownership of the arguments. */
    3953                 :            : void
    3954                 :          0 : vteprec_acl_entry_add_clause_dest_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_mac)
    3955                 :            : {
    3956                 :            :     struct ovsdb_datum datum;
    3957                 :            :     union ovsdb_atom key;
    3958                 :            : 
    3959         [ #  # ]:          0 :     ovs_assert(inited);
    3960         [ #  # ]:          0 :     if (dest_mac) {
    3961                 :          0 :         datum.n = 1;
    3962                 :          0 :         datum.keys = &key;
    3963                 :          0 :         key.string = CONST_CAST(char *, dest_mac);
    3964                 :            :     } else {
    3965                 :          0 :         datum.n = 0;
    3966                 :          0 :         datum.keys = NULL;
    3967                 :            :     }
    3968                 :          0 :     datum.values = NULL;
    3969                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    3970                 :            :                           function,
    3971                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC],
    3972                 :            :                           &datum);
    3973                 :          0 : }
    3974                 :            : 
    3975                 :            : /* Sets the "dest_mask" column from the "ACL_entry" table in 'row' to
    3976                 :            :  * the 'dest_mask' set.
    3977                 :            :  *
    3978                 :            :  * If "dest_mask" is null, the column will be the empty set,
    3979                 :            :  * otherwise it will contain the specified value.
    3980                 :            :  *
    3981                 :            :  * The caller retains ownership of the arguments. */
    3982                 :            : void
    3983                 :          0 : vteprec_acl_entry_add_clause_dest_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_mask)
    3984                 :            : {
    3985                 :            :     struct ovsdb_datum datum;
    3986                 :            :     union ovsdb_atom key;
    3987                 :            : 
    3988         [ #  # ]:          0 :     ovs_assert(inited);
    3989         [ #  # ]:          0 :     if (dest_mask) {
    3990                 :          0 :         datum.n = 1;
    3991                 :          0 :         datum.keys = &key;
    3992                 :          0 :         key.string = CONST_CAST(char *, dest_mask);
    3993                 :            :     } else {
    3994                 :          0 :         datum.n = 0;
    3995                 :          0 :         datum.keys = NULL;
    3996                 :            :     }
    3997                 :          0 :     datum.values = NULL;
    3998                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    3999                 :            :                           function,
    4000                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK],
    4001                 :            :                           &datum);
    4002                 :          0 : }
    4003                 :            : 
    4004                 :            : /* Sets the "dest_port_max" column from the "ACL_entry" table in 'row' to
    4005                 :            :  * the 'dest_port_max' set with 'n_dest_port_max' entries.
    4006                 :            :  *
    4007                 :            :  * 'n_dest_port_max' may be 0 or 1; if it is 0, then 'dest_port_max'
    4008                 :            :  * may be NULL.
    4009                 :            :  *
    4010                 :            :  * The caller retains ownership of the arguments. */
    4011                 :            : void
    4012                 :          0 : vteprec_acl_entry_add_clause_dest_port_max(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *dest_port_max, size_t n_dest_port_max)
    4013                 :            : {
    4014                 :            :     struct ovsdb_datum datum;
    4015                 :            :     union ovsdb_atom key;
    4016                 :            : 
    4017         [ #  # ]:          0 :     ovs_assert(inited);
    4018         [ #  # ]:          0 :     if (n_dest_port_max) {
    4019                 :          0 :         datum.n = 1;
    4020                 :          0 :         datum.keys = &key;
    4021                 :          0 :         key.integer = *dest_port_max;
    4022                 :            :     } else {
    4023                 :          0 :         datum.n = 0;
    4024                 :          0 :         datum.keys = NULL;
    4025                 :            :     }
    4026                 :          0 :     datum.values = NULL;
    4027                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4028                 :            :                           function,
    4029                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX],
    4030                 :            :                           &datum);
    4031                 :          0 : }
    4032                 :            : 
    4033                 :            : /* Sets the "dest_port_min" column from the "ACL_entry" table in 'row' to
    4034                 :            :  * the 'dest_port_min' set with 'n_dest_port_min' entries.
    4035                 :            :  *
    4036                 :            :  * 'n_dest_port_min' may be 0 or 1; if it is 0, then 'dest_port_min'
    4037                 :            :  * may be NULL.
    4038                 :            :  *
    4039                 :            :  * The caller retains ownership of the arguments. */
    4040                 :            : void
    4041                 :          0 : vteprec_acl_entry_add_clause_dest_port_min(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *dest_port_min, size_t n_dest_port_min)
    4042                 :            : {
    4043                 :            :     struct ovsdb_datum datum;
    4044                 :            :     union ovsdb_atom key;
    4045                 :            : 
    4046         [ #  # ]:          0 :     ovs_assert(inited);
    4047         [ #  # ]:          0 :     if (n_dest_port_min) {
    4048                 :          0 :         datum.n = 1;
    4049                 :          0 :         datum.keys = &key;
    4050                 :          0 :         key.integer = *dest_port_min;
    4051                 :            :     } else {
    4052                 :          0 :         datum.n = 0;
    4053                 :          0 :         datum.keys = NULL;
    4054                 :            :     }
    4055                 :          0 :     datum.values = NULL;
    4056                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4057                 :            :                           function,
    4058                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN],
    4059                 :            :                           &datum);
    4060                 :          0 : }
    4061                 :            : 
    4062                 :            : /* Sets the "direction" column from the "ACL_entry" table in 'row' to
    4063                 :            :  * 'direction'.
    4064                 :            :  *
    4065                 :            :  * Argument constraints: either "ingress" or "egress"
    4066                 :            :  *
    4067                 :            :  * The caller retains ownership of the arguments. */
    4068                 :            : void
    4069                 :          0 : vteprec_acl_entry_add_clause_direction(struct ovsdb_idl *idl, enum ovsdb_function function, const char *direction)
    4070                 :            : {
    4071                 :            :     struct ovsdb_datum datum;
    4072                 :            :     union ovsdb_atom key;
    4073                 :            : 
    4074         [ #  # ]:          0 :     ovs_assert(inited);
    4075                 :          0 :     datum.n = 1;
    4076                 :          0 :     datum.keys = &key;
    4077                 :          0 :     key.string = CONST_CAST(char *, direction);
    4078                 :          0 :     datum.values = NULL;
    4079                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4080                 :            :                           function,
    4081                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DIRECTION],
    4082                 :            :                           &datum);
    4083                 :          0 : }
    4084                 :            : 
    4085                 :            : /* Sets the "ethertype" column from the "ACL_entry" table in 'row' to
    4086                 :            :  * the 'ethertype' set.
    4087                 :            :  *
    4088                 :            :  * If "ethertype" is null, the column will be the empty set,
    4089                 :            :  * otherwise it will contain the specified value.
    4090                 :            :  *
    4091                 :            :  * The caller retains ownership of the arguments. */
    4092                 :            : void
    4093                 :          0 : vteprec_acl_entry_add_clause_ethertype(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ethertype)
    4094                 :            : {
    4095                 :            :     struct ovsdb_datum datum;
    4096                 :            :     union ovsdb_atom key;
    4097                 :            : 
    4098         [ #  # ]:          0 :     ovs_assert(inited);
    4099         [ #  # ]:          0 :     if (ethertype) {
    4100                 :          0 :         datum.n = 1;
    4101                 :          0 :         datum.keys = &key;
    4102                 :          0 :         key.string = CONST_CAST(char *, ethertype);
    4103                 :            :     } else {
    4104                 :          0 :         datum.n = 0;
    4105                 :          0 :         datum.keys = NULL;
    4106                 :            :     }
    4107                 :          0 :     datum.values = NULL;
    4108                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4109                 :            :                           function,
    4110                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE],
    4111                 :            :                           &datum);
    4112                 :          0 : }
    4113                 :            : 
    4114                 :            : /* Sets the "icmp_code" column from the "ACL_entry" table in 'row' to
    4115                 :            :  * the 'icmp_code' set with 'n_icmp_code' entries.
    4116                 :            :  *
    4117                 :            :  * 'n_icmp_code' may be 0 or 1; if it is 0, then 'icmp_code'
    4118                 :            :  * may be NULL.
    4119                 :            :  *
    4120                 :            :  * The caller retains ownership of the arguments. */
    4121                 :            : void
    4122                 :          0 : vteprec_acl_entry_add_clause_icmp_code(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *icmp_code, size_t n_icmp_code)
    4123                 :            : {
    4124                 :            :     struct ovsdb_datum datum;
    4125                 :            :     union ovsdb_atom key;
    4126                 :            : 
    4127         [ #  # ]:          0 :     ovs_assert(inited);
    4128         [ #  # ]:          0 :     if (n_icmp_code) {
    4129                 :          0 :         datum.n = 1;
    4130                 :          0 :         datum.keys = &key;
    4131                 :          0 :         key.integer = *icmp_code;
    4132                 :            :     } else {
    4133                 :          0 :         datum.n = 0;
    4134                 :          0 :         datum.keys = NULL;
    4135                 :            :     }
    4136                 :          0 :     datum.values = NULL;
    4137                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4138                 :            :                           function,
    4139                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE],
    4140                 :            :                           &datum);
    4141                 :          0 : }
    4142                 :            : 
    4143                 :            : /* Sets the "icmp_type" column from the "ACL_entry" table in 'row' to
    4144                 :            :  * the 'icmp_type' set with 'n_icmp_type' entries.
    4145                 :            :  *
    4146                 :            :  * 'n_icmp_type' may be 0 or 1; if it is 0, then 'icmp_type'
    4147                 :            :  * may be NULL.
    4148                 :            :  *
    4149                 :            :  * The caller retains ownership of the arguments. */
    4150                 :            : void
    4151                 :          0 : vteprec_acl_entry_add_clause_icmp_type(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *icmp_type, size_t n_icmp_type)
    4152                 :            : {
    4153                 :            :     struct ovsdb_datum datum;
    4154                 :            :     union ovsdb_atom key;
    4155                 :            : 
    4156         [ #  # ]:          0 :     ovs_assert(inited);
    4157         [ #  # ]:          0 :     if (n_icmp_type) {
    4158                 :          0 :         datum.n = 1;
    4159                 :          0 :         datum.keys = &key;
    4160                 :          0 :         key.integer = *icmp_type;
    4161                 :            :     } else {
    4162                 :          0 :         datum.n = 0;
    4163                 :          0 :         datum.keys = NULL;
    4164                 :            :     }
    4165                 :          0 :     datum.values = NULL;
    4166                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4167                 :            :                           function,
    4168                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE],
    4169                 :            :                           &datum);
    4170                 :          0 : }
    4171                 :            : 
    4172                 :            : /* Sets the "protocol" column from the "ACL_entry" table in 'row' to
    4173                 :            :  * the 'protocol' set with 'n_protocol' entries.
    4174                 :            :  *
    4175                 :            :  * 'n_protocol' may be 0 or 1; if it is 0, then 'protocol'
    4176                 :            :  * may be NULL.
    4177                 :            :  *
    4178                 :            :  * The caller retains ownership of the arguments. */
    4179                 :            : void
    4180                 :          0 : vteprec_acl_entry_add_clause_protocol(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *protocol, size_t n_protocol)
    4181                 :            : {
    4182                 :            :     struct ovsdb_datum datum;
    4183                 :            :     union ovsdb_atom key;
    4184                 :            : 
    4185         [ #  # ]:          0 :     ovs_assert(inited);
    4186         [ #  # ]:          0 :     if (n_protocol) {
    4187                 :          0 :         datum.n = 1;
    4188                 :          0 :         datum.keys = &key;
    4189                 :          0 :         key.integer = *protocol;
    4190                 :            :     } else {
    4191                 :          0 :         datum.n = 0;
    4192                 :          0 :         datum.keys = NULL;
    4193                 :            :     }
    4194                 :          0 :     datum.values = NULL;
    4195                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4196                 :            :                           function,
    4197                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL],
    4198                 :            :                           &datum);
    4199                 :          0 : }
    4200                 :            : 
    4201                 :            : /* Sets the "sequence" column from the "ACL_entry" table in 'row' to
    4202                 :            :  * 'sequence'.
    4203                 :            :  *
    4204                 :            :  * The caller retains ownership of the arguments. */
    4205                 :            : void
    4206                 :          0 : vteprec_acl_entry_add_clause_sequence(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t sequence)
    4207                 :            : {
    4208                 :            :     struct ovsdb_datum datum;
    4209                 :            :     union ovsdb_atom key;
    4210                 :            : 
    4211         [ #  # ]:          0 :     ovs_assert(inited);
    4212                 :          0 :     datum.n = 1;
    4213                 :          0 :     datum.keys = &key;
    4214                 :          0 :     key.integer = sequence;
    4215                 :          0 :     datum.values = NULL;
    4216                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4217                 :            :                           function,
    4218                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SEQUENCE],
    4219                 :            :                           &datum);
    4220                 :          0 : }
    4221                 :            : 
    4222                 :            : /* Sets the "source_ip" column from the "ACL_entry" table in 'row' to
    4223                 :            :  * the 'source_ip' set.
    4224                 :            :  *
    4225                 :            :  * If "source_ip" is null, the column will be the empty set,
    4226                 :            :  * otherwise it will contain the specified value.
    4227                 :            :  *
    4228                 :            :  * The caller retains ownership of the arguments. */
    4229                 :            : void
    4230                 :          0 : vteprec_acl_entry_add_clause_source_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_ip)
    4231                 :            : {
    4232                 :            :     struct ovsdb_datum datum;
    4233                 :            :     union ovsdb_atom key;
    4234                 :            : 
    4235         [ #  # ]:          0 :     ovs_assert(inited);
    4236         [ #  # ]:          0 :     if (source_ip) {
    4237                 :          0 :         datum.n = 1;
    4238                 :          0 :         datum.keys = &key;
    4239                 :          0 :         key.string = CONST_CAST(char *, source_ip);
    4240                 :            :     } else {
    4241                 :          0 :         datum.n = 0;
    4242                 :          0 :         datum.keys = NULL;
    4243                 :            :     }
    4244                 :          0 :     datum.values = NULL;
    4245                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4246                 :            :                           function,
    4247                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP],
    4248                 :            :                           &datum);
    4249                 :          0 : }
    4250                 :            : 
    4251                 :            : /* Sets the "source_mac" column from the "ACL_entry" table in 'row' to
    4252                 :            :  * the 'source_mac' set.
    4253                 :            :  *
    4254                 :            :  * If "source_mac" is null, the column will be the empty set,
    4255                 :            :  * otherwise it will contain the specified value.
    4256                 :            :  *
    4257                 :            :  * The caller retains ownership of the arguments. */
    4258                 :            : void
    4259                 :          0 : vteprec_acl_entry_add_clause_source_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_mac)
    4260                 :            : {
    4261                 :            :     struct ovsdb_datum datum;
    4262                 :            :     union ovsdb_atom key;
    4263                 :            : 
    4264         [ #  # ]:          0 :     ovs_assert(inited);
    4265         [ #  # ]:          0 :     if (source_mac) {
    4266                 :          0 :         datum.n = 1;
    4267                 :          0 :         datum.keys = &key;
    4268                 :          0 :         key.string = CONST_CAST(char *, source_mac);
    4269                 :            :     } else {
    4270                 :          0 :         datum.n = 0;
    4271                 :          0 :         datum.keys = NULL;
    4272                 :            :     }
    4273                 :          0 :     datum.values = NULL;
    4274                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4275                 :            :                           function,
    4276                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC],
    4277                 :            :                           &datum);
    4278                 :          0 : }
    4279                 :            : 
    4280                 :            : /* Sets the "source_mask" column from the "ACL_entry" table in 'row' to
    4281                 :            :  * the 'source_mask' set.
    4282                 :            :  *
    4283                 :            :  * If "source_mask" is null, the column will be the empty set,
    4284                 :            :  * otherwise it will contain the specified value.
    4285                 :            :  *
    4286                 :            :  * The caller retains ownership of the arguments. */
    4287                 :            : void
    4288                 :          0 : vteprec_acl_entry_add_clause_source_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_mask)
    4289                 :            : {
    4290                 :            :     struct ovsdb_datum datum;
    4291                 :            :     union ovsdb_atom key;
    4292                 :            : 
    4293         [ #  # ]:          0 :     ovs_assert(inited);
    4294         [ #  # ]:          0 :     if (source_mask) {
    4295                 :          0 :         datum.n = 1;
    4296                 :          0 :         datum.keys = &key;
    4297                 :          0 :         key.string = CONST_CAST(char *, source_mask);
    4298                 :            :     } else {
    4299                 :          0 :         datum.n = 0;
    4300                 :          0 :         datum.keys = NULL;
    4301                 :            :     }
    4302                 :          0 :     datum.values = NULL;
    4303                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4304                 :            :                           function,
    4305                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK],
    4306                 :            :                           &datum);
    4307                 :          0 : }
    4308                 :            : 
    4309                 :            : /* Sets the "source_port_max" column from the "ACL_entry" table in 'row' to
    4310                 :            :  * the 'source_port_max' set with 'n_source_port_max' entries.
    4311                 :            :  *
    4312                 :            :  * 'n_source_port_max' may be 0 or 1; if it is 0, then 'source_port_max'
    4313                 :            :  * may be NULL.
    4314                 :            :  *
    4315                 :            :  * The caller retains ownership of the arguments. */
    4316                 :            : void
    4317                 :          0 : vteprec_acl_entry_add_clause_source_port_max(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *source_port_max, size_t n_source_port_max)
    4318                 :            : {
    4319                 :            :     struct ovsdb_datum datum;
    4320                 :            :     union ovsdb_atom key;
    4321                 :            : 
    4322         [ #  # ]:          0 :     ovs_assert(inited);
    4323         [ #  # ]:          0 :     if (n_source_port_max) {
    4324                 :          0 :         datum.n = 1;
    4325                 :          0 :         datum.keys = &key;
    4326                 :          0 :         key.integer = *source_port_max;
    4327                 :            :     } else {
    4328                 :          0 :         datum.n = 0;
    4329                 :          0 :         datum.keys = NULL;
    4330                 :            :     }
    4331                 :          0 :     datum.values = NULL;
    4332                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4333                 :            :                           function,
    4334                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX],
    4335                 :            :                           &datum);
    4336                 :          0 : }
    4337                 :            : 
    4338                 :            : /* Sets the "source_port_min" column from the "ACL_entry" table in 'row' to
    4339                 :            :  * the 'source_port_min' set with 'n_source_port_min' entries.
    4340                 :            :  *
    4341                 :            :  * 'n_source_port_min' may be 0 or 1; if it is 0, then 'source_port_min'
    4342                 :            :  * may be NULL.
    4343                 :            :  *
    4344                 :            :  * The caller retains ownership of the arguments. */
    4345                 :            : void
    4346                 :          0 : vteprec_acl_entry_add_clause_source_port_min(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *source_port_min, size_t n_source_port_min)
    4347                 :            : {
    4348                 :            :     struct ovsdb_datum datum;
    4349                 :            :     union ovsdb_atom key;
    4350                 :            : 
    4351         [ #  # ]:          0 :     ovs_assert(inited);
    4352         [ #  # ]:          0 :     if (n_source_port_min) {
    4353                 :          0 :         datum.n = 1;
    4354                 :          0 :         datum.keys = &key;
    4355                 :          0 :         key.integer = *source_port_min;
    4356                 :            :     } else {
    4357                 :          0 :         datum.n = 0;
    4358                 :          0 :         datum.keys = NULL;
    4359                 :            :     }
    4360                 :          0 :     datum.values = NULL;
    4361                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4362                 :            :                           function,
    4363                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN],
    4364                 :            :                           &datum);
    4365                 :          0 : }
    4366                 :            : 
    4367                 :            : /* Sets the "tcp_flags" column from the "ACL_entry" table in 'row' to
    4368                 :            :  * the 'tcp_flags' set with 'n_tcp_flags' entries.
    4369                 :            :  *
    4370                 :            :  * 'n_tcp_flags' may be 0 or 1; if it is 0, then 'tcp_flags'
    4371                 :            :  * may be NULL.
    4372                 :            :  *
    4373                 :            :  * The caller retains ownership of the arguments. */
    4374                 :            : void
    4375                 :          0 : vteprec_acl_entry_add_clause_tcp_flags(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tcp_flags, size_t n_tcp_flags)
    4376                 :            : {
    4377                 :            :     struct ovsdb_datum datum;
    4378                 :            :     union ovsdb_atom key;
    4379                 :            : 
    4380         [ #  # ]:          0 :     ovs_assert(inited);
    4381         [ #  # ]:          0 :     if (n_tcp_flags) {
    4382                 :          0 :         datum.n = 1;
    4383                 :          0 :         datum.keys = &key;
    4384                 :          0 :         key.integer = *tcp_flags;
    4385                 :            :     } else {
    4386                 :          0 :         datum.n = 0;
    4387                 :          0 :         datum.keys = NULL;
    4388                 :            :     }
    4389                 :          0 :     datum.values = NULL;
    4390                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4391                 :            :                           function,
    4392                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS],
    4393                 :            :                           &datum);
    4394                 :          0 : }
    4395                 :            : 
    4396                 :            : /* Sets the "tcp_flags_mask" column from the "ACL_entry" table in 'row' to
    4397                 :            :  * the 'tcp_flags_mask' set with 'n_tcp_flags_mask' entries.
    4398                 :            :  *
    4399                 :            :  * 'n_tcp_flags_mask' may be 0 or 1; if it is 0, then 'tcp_flags_mask'
    4400                 :            :  * may be NULL.
    4401                 :            :  *
    4402                 :            :  * The caller retains ownership of the arguments. */
    4403                 :            : void
    4404                 :          0 : vteprec_acl_entry_add_clause_tcp_flags_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tcp_flags_mask, size_t n_tcp_flags_mask)
    4405                 :            : {
    4406                 :            :     struct ovsdb_datum datum;
    4407                 :            :     union ovsdb_atom key;
    4408                 :            : 
    4409         [ #  # ]:          0 :     ovs_assert(inited);
    4410         [ #  # ]:          0 :     if (n_tcp_flags_mask) {
    4411                 :          0 :         datum.n = 1;
    4412                 :          0 :         datum.keys = &key;
    4413                 :          0 :         key.integer = *tcp_flags_mask;
    4414                 :            :     } else {
    4415                 :          0 :         datum.n = 0;
    4416                 :          0 :         datum.keys = NULL;
    4417                 :            :     }
    4418                 :          0 :     datum.values = NULL;
    4419                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4420                 :            :                           function,
    4421                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK],
    4422                 :            :                           &datum);
    4423                 :          0 : }
    4424                 :            : void
    4425                 :          0 : vteprec_acl_entry_add_clause_false(struct ovsdb_idl *idl)
    4426                 :            : {
    4427                 :            :     struct ovsdb_datum datum;
    4428                 :            : 
    4429                 :          0 :     ovsdb_datum_init_empty(&datum);
    4430                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], OVSDB_F_FALSE, NULL, &datum);
    4431                 :          0 : }
    4432                 :            : void
    4433                 :          0 : vteprec_acl_entry_add_clause_true(struct ovsdb_idl *idl)
    4434                 :            : {
    4435                 :            :     struct ovsdb_datum datum;
    4436                 :            : 
    4437                 :          0 :     ovsdb_datum_init_empty(&datum);
    4438                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], OVSDB_F_TRUE, NULL, &datum);
    4439                 :          0 : }
    4440                 :            : 
    4441                 :            : /* Sets the "acle_fault_status" column from the "ACL_entry" table in 'row' to
    4442                 :            :  * the 'acle_fault_status' set with 'n_acle_fault_status' entries.
    4443                 :            :  *
    4444                 :            :  * The caller retains ownership of the arguments. */
    4445                 :            : void
    4446                 :          0 : vteprec_acl_entry_remove_clause_acle_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **acle_fault_status, size_t n_acle_fault_status)
    4447                 :            : {
    4448                 :            :     struct ovsdb_datum datum;
    4449                 :            :     size_t i;
    4450                 :            : 
    4451         [ #  # ]:          0 :     ovs_assert(inited);
    4452                 :          0 :     datum.n = n_acle_fault_status;
    4453         [ #  # ]:          0 :     datum.keys = n_acle_fault_status ? xmalloc(n_acle_fault_status * sizeof *datum.keys) : NULL;
    4454                 :          0 :     datum.values = NULL;
    4455         [ #  # ]:          0 :     for (i = 0; i < n_acle_fault_status; i++) {
    4456                 :          0 :         datum.keys[i].string = CONST_CAST(char *, acle_fault_status[i]);
    4457                 :            :     }
    4458                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    4459                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4460                 :            :                           function,
    4461                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACLE_FAULT_STATUS],
    4462                 :            :                           &datum);
    4463                 :          0 :     free(datum.keys);
    4464                 :          0 : }
    4465                 :            : 
    4466                 :            : /* Sets the "action" column from the "ACL_entry" table in 'row' to
    4467                 :            :  * 'action'.
    4468                 :            :  *
    4469                 :            :  * Argument constraints: either "deny" or "permit"
    4470                 :            :  *
    4471                 :            :  * The caller retains ownership of the arguments. */
    4472                 :            : void
    4473                 :          0 : vteprec_acl_entry_remove_clause_action(struct ovsdb_idl *idl, enum ovsdb_function function, const char *action)
    4474                 :            : {
    4475                 :            :     struct ovsdb_datum datum;
    4476                 :            :     union ovsdb_atom key;
    4477                 :            : 
    4478         [ #  # ]:          0 :     ovs_assert(inited);
    4479                 :          0 :     datum.n = 1;
    4480                 :          0 :     datum.keys = &key;
    4481                 :          0 :     key.string = CONST_CAST(char *, action);
    4482                 :          0 :     datum.values = NULL;
    4483                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4484                 :            :                           function,
    4485                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ACTION],
    4486                 :            :                           &datum);
    4487                 :          0 : }
    4488                 :            : 
    4489                 :            : /* Sets the "dest_ip" column from the "ACL_entry" table in 'row' to
    4490                 :            :  * the 'dest_ip' set.
    4491                 :            :  *
    4492                 :            :  * If "dest_ip" is null, the column will be the empty set,
    4493                 :            :  * otherwise it will contain the specified value.
    4494                 :            :  *
    4495                 :            :  * The caller retains ownership of the arguments. */
    4496                 :            : void
    4497                 :          0 : vteprec_acl_entry_remove_clause_dest_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_ip)
    4498                 :            : {
    4499                 :            :     struct ovsdb_datum datum;
    4500                 :            :     union ovsdb_atom key;
    4501                 :            : 
    4502         [ #  # ]:          0 :     ovs_assert(inited);
    4503         [ #  # ]:          0 :     if (dest_ip) {
    4504                 :          0 :         datum.n = 1;
    4505                 :          0 :         datum.keys = &key;
    4506                 :          0 :         key.string = CONST_CAST(char *, dest_ip);
    4507                 :            :     } else {
    4508                 :          0 :         datum.n = 0;
    4509                 :          0 :         datum.keys = NULL;
    4510                 :            :     }
    4511                 :          0 :     datum.values = NULL;
    4512                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4513                 :            :                           function,
    4514                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_IP],
    4515                 :            :                           &datum);
    4516                 :          0 : }
    4517                 :            : 
    4518                 :            : /* Sets the "dest_mac" column from the "ACL_entry" table in 'row' to
    4519                 :            :  * the 'dest_mac' set.
    4520                 :            :  *
    4521                 :            :  * If "dest_mac" is null, the column will be the empty set,
    4522                 :            :  * otherwise it will contain the specified value.
    4523                 :            :  *
    4524                 :            :  * The caller retains ownership of the arguments. */
    4525                 :            : void
    4526                 :          0 : vteprec_acl_entry_remove_clause_dest_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_mac)
    4527                 :            : {
    4528                 :            :     struct ovsdb_datum datum;
    4529                 :            :     union ovsdb_atom key;
    4530                 :            : 
    4531         [ #  # ]:          0 :     ovs_assert(inited);
    4532         [ #  # ]:          0 :     if (dest_mac) {
    4533                 :          0 :         datum.n = 1;
    4534                 :          0 :         datum.keys = &key;
    4535                 :          0 :         key.string = CONST_CAST(char *, dest_mac);
    4536                 :            :     } else {
    4537                 :          0 :         datum.n = 0;
    4538                 :          0 :         datum.keys = NULL;
    4539                 :            :     }
    4540                 :          0 :     datum.values = NULL;
    4541                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4542                 :            :                           function,
    4543                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MAC],
    4544                 :            :                           &datum);
    4545                 :          0 : }
    4546                 :            : 
    4547                 :            : /* Sets the "dest_mask" column from the "ACL_entry" table in 'row' to
    4548                 :            :  * the 'dest_mask' set.
    4549                 :            :  *
    4550                 :            :  * If "dest_mask" is null, the column will be the empty set,
    4551                 :            :  * otherwise it will contain the specified value.
    4552                 :            :  *
    4553                 :            :  * The caller retains ownership of the arguments. */
    4554                 :            : void
    4555                 :          0 : vteprec_acl_entry_remove_clause_dest_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dest_mask)
    4556                 :            : {
    4557                 :            :     struct ovsdb_datum datum;
    4558                 :            :     union ovsdb_atom key;
    4559                 :            : 
    4560         [ #  # ]:          0 :     ovs_assert(inited);
    4561         [ #  # ]:          0 :     if (dest_mask) {
    4562                 :          0 :         datum.n = 1;
    4563                 :          0 :         datum.keys = &key;
    4564                 :          0 :         key.string = CONST_CAST(char *, dest_mask);
    4565                 :            :     } else {
    4566                 :          0 :         datum.n = 0;
    4567                 :          0 :         datum.keys = NULL;
    4568                 :            :     }
    4569                 :          0 :     datum.values = NULL;
    4570                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4571                 :            :                           function,
    4572                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_MASK],
    4573                 :            :                           &datum);
    4574                 :          0 : }
    4575                 :            : 
    4576                 :            : /* Sets the "dest_port_max" column from the "ACL_entry" table in 'row' to
    4577                 :            :  * the 'dest_port_max' set with 'n_dest_port_max' entries.
    4578                 :            :  *
    4579                 :            :  * 'n_dest_port_max' may be 0 or 1; if it is 0, then 'dest_port_max'
    4580                 :            :  * may be NULL.
    4581                 :            :  *
    4582                 :            :  * The caller retains ownership of the arguments. */
    4583                 :            : void
    4584                 :          0 : vteprec_acl_entry_remove_clause_dest_port_max(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *dest_port_max, size_t n_dest_port_max)
    4585                 :            : {
    4586                 :            :     struct ovsdb_datum datum;
    4587                 :            :     union ovsdb_atom key;
    4588                 :            : 
    4589         [ #  # ]:          0 :     ovs_assert(inited);
    4590         [ #  # ]:          0 :     if (n_dest_port_max) {
    4591                 :          0 :         datum.n = 1;
    4592                 :          0 :         datum.keys = &key;
    4593                 :          0 :         key.integer = *dest_port_max;
    4594                 :            :     } else {
    4595                 :          0 :         datum.n = 0;
    4596                 :          0 :         datum.keys = NULL;
    4597                 :            :     }
    4598                 :          0 :     datum.values = NULL;
    4599                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4600                 :            :                           function,
    4601                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MAX],
    4602                 :            :                           &datum);
    4603                 :          0 : }
    4604                 :            : 
    4605                 :            : /* Sets the "dest_port_min" column from the "ACL_entry" table in 'row' to
    4606                 :            :  * the 'dest_port_min' set with 'n_dest_port_min' entries.
    4607                 :            :  *
    4608                 :            :  * 'n_dest_port_min' may be 0 or 1; if it is 0, then 'dest_port_min'
    4609                 :            :  * may be NULL.
    4610                 :            :  *
    4611                 :            :  * The caller retains ownership of the arguments. */
    4612                 :            : void
    4613                 :          0 : vteprec_acl_entry_remove_clause_dest_port_min(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *dest_port_min, size_t n_dest_port_min)
    4614                 :            : {
    4615                 :            :     struct ovsdb_datum datum;
    4616                 :            :     union ovsdb_atom key;
    4617                 :            : 
    4618         [ #  # ]:          0 :     ovs_assert(inited);
    4619         [ #  # ]:          0 :     if (n_dest_port_min) {
    4620                 :          0 :         datum.n = 1;
    4621                 :          0 :         datum.keys = &key;
    4622                 :          0 :         key.integer = *dest_port_min;
    4623                 :            :     } else {
    4624                 :          0 :         datum.n = 0;
    4625                 :          0 :         datum.keys = NULL;
    4626                 :            :     }
    4627                 :          0 :     datum.values = NULL;
    4628                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4629                 :            :                           function,
    4630                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DEST_PORT_MIN],
    4631                 :            :                           &datum);
    4632                 :          0 : }
    4633                 :            : 
    4634                 :            : /* Sets the "direction" column from the "ACL_entry" table in 'row' to
    4635                 :            :  * 'direction'.
    4636                 :            :  *
    4637                 :            :  * Argument constraints: either "ingress" or "egress"
    4638                 :            :  *
    4639                 :            :  * The caller retains ownership of the arguments. */
    4640                 :            : void
    4641                 :          0 : vteprec_acl_entry_remove_clause_direction(struct ovsdb_idl *idl, enum ovsdb_function function, const char *direction)
    4642                 :            : {
    4643                 :            :     struct ovsdb_datum datum;
    4644                 :            :     union ovsdb_atom key;
    4645                 :            : 
    4646         [ #  # ]:          0 :     ovs_assert(inited);
    4647                 :          0 :     datum.n = 1;
    4648                 :          0 :     datum.keys = &key;
    4649                 :          0 :     key.string = CONST_CAST(char *, direction);
    4650                 :          0 :     datum.values = NULL;
    4651                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4652                 :            :                           function,
    4653                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_DIRECTION],
    4654                 :            :                           &datum);
    4655                 :          0 : }
    4656                 :            : 
    4657                 :            : /* Sets the "ethertype" column from the "ACL_entry" table in 'row' to
    4658                 :            :  * the 'ethertype' set.
    4659                 :            :  *
    4660                 :            :  * If "ethertype" is null, the column will be the empty set,
    4661                 :            :  * otherwise it will contain the specified value.
    4662                 :            :  *
    4663                 :            :  * The caller retains ownership of the arguments. */
    4664                 :            : void
    4665                 :          0 : vteprec_acl_entry_remove_clause_ethertype(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ethertype)
    4666                 :            : {
    4667                 :            :     struct ovsdb_datum datum;
    4668                 :            :     union ovsdb_atom key;
    4669                 :            : 
    4670         [ #  # ]:          0 :     ovs_assert(inited);
    4671         [ #  # ]:          0 :     if (ethertype) {
    4672                 :          0 :         datum.n = 1;
    4673                 :          0 :         datum.keys = &key;
    4674                 :          0 :         key.string = CONST_CAST(char *, ethertype);
    4675                 :            :     } else {
    4676                 :          0 :         datum.n = 0;
    4677                 :          0 :         datum.keys = NULL;
    4678                 :            :     }
    4679                 :          0 :     datum.values = NULL;
    4680                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4681                 :            :                           function,
    4682                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ETHERTYPE],
    4683                 :            :                           &datum);
    4684                 :          0 : }
    4685                 :            : 
    4686                 :            : /* Sets the "icmp_code" column from the "ACL_entry" table in 'row' to
    4687                 :            :  * the 'icmp_code' set with 'n_icmp_code' entries.
    4688                 :            :  *
    4689                 :            :  * 'n_icmp_code' may be 0 or 1; if it is 0, then 'icmp_code'
    4690                 :            :  * may be NULL.
    4691                 :            :  *
    4692                 :            :  * The caller retains ownership of the arguments. */
    4693                 :            : void
    4694                 :          0 : vteprec_acl_entry_remove_clause_icmp_code(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *icmp_code, size_t n_icmp_code)
    4695                 :            : {
    4696                 :            :     struct ovsdb_datum datum;
    4697                 :            :     union ovsdb_atom key;
    4698                 :            : 
    4699         [ #  # ]:          0 :     ovs_assert(inited);
    4700         [ #  # ]:          0 :     if (n_icmp_code) {
    4701                 :          0 :         datum.n = 1;
    4702                 :          0 :         datum.keys = &key;
    4703                 :          0 :         key.integer = *icmp_code;
    4704                 :            :     } else {
    4705                 :          0 :         datum.n = 0;
    4706                 :          0 :         datum.keys = NULL;
    4707                 :            :     }
    4708                 :          0 :     datum.values = NULL;
    4709                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4710                 :            :                           function,
    4711                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_CODE],
    4712                 :            :                           &datum);
    4713                 :          0 : }
    4714                 :            : 
    4715                 :            : /* Sets the "icmp_type" column from the "ACL_entry" table in 'row' to
    4716                 :            :  * the 'icmp_type' set with 'n_icmp_type' entries.
    4717                 :            :  *
    4718                 :            :  * 'n_icmp_type' may be 0 or 1; if it is 0, then 'icmp_type'
    4719                 :            :  * may be NULL.
    4720                 :            :  *
    4721                 :            :  * The caller retains ownership of the arguments. */
    4722                 :            : void
    4723                 :          0 : vteprec_acl_entry_remove_clause_icmp_type(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *icmp_type, size_t n_icmp_type)
    4724                 :            : {
    4725                 :            :     struct ovsdb_datum datum;
    4726                 :            :     union ovsdb_atom key;
    4727                 :            : 
    4728         [ #  # ]:          0 :     ovs_assert(inited);
    4729         [ #  # ]:          0 :     if (n_icmp_type) {
    4730                 :          0 :         datum.n = 1;
    4731                 :          0 :         datum.keys = &key;
    4732                 :          0 :         key.integer = *icmp_type;
    4733                 :            :     } else {
    4734                 :          0 :         datum.n = 0;
    4735                 :          0 :         datum.keys = NULL;
    4736                 :            :     }
    4737                 :          0 :     datum.values = NULL;
    4738                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4739                 :            :                           function,
    4740                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_ICMP_TYPE],
    4741                 :            :                           &datum);
    4742                 :          0 : }
    4743                 :            : 
    4744                 :            : /* Sets the "protocol" column from the "ACL_entry" table in 'row' to
    4745                 :            :  * the 'protocol' set with 'n_protocol' entries.
    4746                 :            :  *
    4747                 :            :  * 'n_protocol' may be 0 or 1; if it is 0, then 'protocol'
    4748                 :            :  * may be NULL.
    4749                 :            :  *
    4750                 :            :  * The caller retains ownership of the arguments. */
    4751                 :            : void
    4752                 :          0 : vteprec_acl_entry_remove_clause_protocol(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *protocol, size_t n_protocol)
    4753                 :            : {
    4754                 :            :     struct ovsdb_datum datum;
    4755                 :            :     union ovsdb_atom key;
    4756                 :            : 
    4757         [ #  # ]:          0 :     ovs_assert(inited);
    4758         [ #  # ]:          0 :     if (n_protocol) {
    4759                 :          0 :         datum.n = 1;
    4760                 :          0 :         datum.keys = &key;
    4761                 :          0 :         key.integer = *protocol;
    4762                 :            :     } else {
    4763                 :          0 :         datum.n = 0;
    4764                 :          0 :         datum.keys = NULL;
    4765                 :            :     }
    4766                 :          0 :     datum.values = NULL;
    4767                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4768                 :            :                           function,
    4769                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_PROTOCOL],
    4770                 :            :                           &datum);
    4771                 :          0 : }
    4772                 :            : 
    4773                 :            : /* Sets the "sequence" column from the "ACL_entry" table in 'row' to
    4774                 :            :  * 'sequence'.
    4775                 :            :  *
    4776                 :            :  * The caller retains ownership of the arguments. */
    4777                 :            : void
    4778                 :          0 : vteprec_acl_entry_remove_clause_sequence(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t sequence)
    4779                 :            : {
    4780                 :            :     struct ovsdb_datum datum;
    4781                 :            :     union ovsdb_atom key;
    4782                 :            : 
    4783         [ #  # ]:          0 :     ovs_assert(inited);
    4784                 :          0 :     datum.n = 1;
    4785                 :          0 :     datum.keys = &key;
    4786                 :          0 :     key.integer = sequence;
    4787                 :          0 :     datum.values = NULL;
    4788                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4789                 :            :                           function,
    4790                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SEQUENCE],
    4791                 :            :                           &datum);
    4792                 :          0 : }
    4793                 :            : 
    4794                 :            : /* Sets the "source_ip" column from the "ACL_entry" table in 'row' to
    4795                 :            :  * the 'source_ip' set.
    4796                 :            :  *
    4797                 :            :  * If "source_ip" is null, the column will be the empty set,
    4798                 :            :  * otherwise it will contain the specified value.
    4799                 :            :  *
    4800                 :            :  * The caller retains ownership of the arguments. */
    4801                 :            : void
    4802                 :          0 : vteprec_acl_entry_remove_clause_source_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_ip)
    4803                 :            : {
    4804                 :            :     struct ovsdb_datum datum;
    4805                 :            :     union ovsdb_atom key;
    4806                 :            : 
    4807         [ #  # ]:          0 :     ovs_assert(inited);
    4808         [ #  # ]:          0 :     if (source_ip) {
    4809                 :          0 :         datum.n = 1;
    4810                 :          0 :         datum.keys = &key;
    4811                 :          0 :         key.string = CONST_CAST(char *, source_ip);
    4812                 :            :     } else {
    4813                 :          0 :         datum.n = 0;
    4814                 :          0 :         datum.keys = NULL;
    4815                 :            :     }
    4816                 :          0 :     datum.values = NULL;
    4817                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4818                 :            :                           function,
    4819                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_IP],
    4820                 :            :                           &datum);
    4821                 :          0 : }
    4822                 :            : 
    4823                 :            : /* Sets the "source_mac" column from the "ACL_entry" table in 'row' to
    4824                 :            :  * the 'source_mac' set.
    4825                 :            :  *
    4826                 :            :  * If "source_mac" is null, the column will be the empty set,
    4827                 :            :  * otherwise it will contain the specified value.
    4828                 :            :  *
    4829                 :            :  * The caller retains ownership of the arguments. */
    4830                 :            : void
    4831                 :          0 : vteprec_acl_entry_remove_clause_source_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_mac)
    4832                 :            : {
    4833                 :            :     struct ovsdb_datum datum;
    4834                 :            :     union ovsdb_atom key;
    4835                 :            : 
    4836         [ #  # ]:          0 :     ovs_assert(inited);
    4837         [ #  # ]:          0 :     if (source_mac) {
    4838                 :          0 :         datum.n = 1;
    4839                 :          0 :         datum.keys = &key;
    4840                 :          0 :         key.string = CONST_CAST(char *, source_mac);
    4841                 :            :     } else {
    4842                 :          0 :         datum.n = 0;
    4843                 :          0 :         datum.keys = NULL;
    4844                 :            :     }
    4845                 :          0 :     datum.values = NULL;
    4846                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4847                 :            :                           function,
    4848                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MAC],
    4849                 :            :                           &datum);
    4850                 :          0 : }
    4851                 :            : 
    4852                 :            : /* Sets the "source_mask" column from the "ACL_entry" table in 'row' to
    4853                 :            :  * the 'source_mask' set.
    4854                 :            :  *
    4855                 :            :  * If "source_mask" is null, the column will be the empty set,
    4856                 :            :  * otherwise it will contain the specified value.
    4857                 :            :  *
    4858                 :            :  * The caller retains ownership of the arguments. */
    4859                 :            : void
    4860                 :          0 : vteprec_acl_entry_remove_clause_source_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const char *source_mask)
    4861                 :            : {
    4862                 :            :     struct ovsdb_datum datum;
    4863                 :            :     union ovsdb_atom key;
    4864                 :            : 
    4865         [ #  # ]:          0 :     ovs_assert(inited);
    4866         [ #  # ]:          0 :     if (source_mask) {
    4867                 :          0 :         datum.n = 1;
    4868                 :          0 :         datum.keys = &key;
    4869                 :          0 :         key.string = CONST_CAST(char *, source_mask);
    4870                 :            :     } else {
    4871                 :          0 :         datum.n = 0;
    4872                 :          0 :         datum.keys = NULL;
    4873                 :            :     }
    4874                 :          0 :     datum.values = NULL;
    4875                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4876                 :            :                           function,
    4877                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_MASK],
    4878                 :            :                           &datum);
    4879                 :          0 : }
    4880                 :            : 
    4881                 :            : /* Sets the "source_port_max" column from the "ACL_entry" table in 'row' to
    4882                 :            :  * the 'source_port_max' set with 'n_source_port_max' entries.
    4883                 :            :  *
    4884                 :            :  * 'n_source_port_max' may be 0 or 1; if it is 0, then 'source_port_max'
    4885                 :            :  * may be NULL.
    4886                 :            :  *
    4887                 :            :  * The caller retains ownership of the arguments. */
    4888                 :            : void
    4889                 :          0 : vteprec_acl_entry_remove_clause_source_port_max(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *source_port_max, size_t n_source_port_max)
    4890                 :            : {
    4891                 :            :     struct ovsdb_datum datum;
    4892                 :            :     union ovsdb_atom key;
    4893                 :            : 
    4894         [ #  # ]:          0 :     ovs_assert(inited);
    4895         [ #  # ]:          0 :     if (n_source_port_max) {
    4896                 :          0 :         datum.n = 1;
    4897                 :          0 :         datum.keys = &key;
    4898                 :          0 :         key.integer = *source_port_max;
    4899                 :            :     } else {
    4900                 :          0 :         datum.n = 0;
    4901                 :          0 :         datum.keys = NULL;
    4902                 :            :     }
    4903                 :          0 :     datum.values = NULL;
    4904                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4905                 :            :                           function,
    4906                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MAX],
    4907                 :            :                           &datum);
    4908                 :          0 : }
    4909                 :            : 
    4910                 :            : /* Sets the "source_port_min" column from the "ACL_entry" table in 'row' to
    4911                 :            :  * the 'source_port_min' set with 'n_source_port_min' entries.
    4912                 :            :  *
    4913                 :            :  * 'n_source_port_min' may be 0 or 1; if it is 0, then 'source_port_min'
    4914                 :            :  * may be NULL.
    4915                 :            :  *
    4916                 :            :  * The caller retains ownership of the arguments. */
    4917                 :            : void
    4918                 :          0 : vteprec_acl_entry_remove_clause_source_port_min(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *source_port_min, size_t n_source_port_min)
    4919                 :            : {
    4920                 :            :     struct ovsdb_datum datum;
    4921                 :            :     union ovsdb_atom key;
    4922                 :            : 
    4923         [ #  # ]:          0 :     ovs_assert(inited);
    4924         [ #  # ]:          0 :     if (n_source_port_min) {
    4925                 :          0 :         datum.n = 1;
    4926                 :          0 :         datum.keys = &key;
    4927                 :          0 :         key.integer = *source_port_min;
    4928                 :            :     } else {
    4929                 :          0 :         datum.n = 0;
    4930                 :          0 :         datum.keys = NULL;
    4931                 :            :     }
    4932                 :          0 :     datum.values = NULL;
    4933                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4934                 :            :                           function,
    4935                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_SOURCE_PORT_MIN],
    4936                 :            :                           &datum);
    4937                 :          0 : }
    4938                 :            : 
    4939                 :            : /* Sets the "tcp_flags" column from the "ACL_entry" table in 'row' to
    4940                 :            :  * the 'tcp_flags' set with 'n_tcp_flags' entries.
    4941                 :            :  *
    4942                 :            :  * 'n_tcp_flags' may be 0 or 1; if it is 0, then 'tcp_flags'
    4943                 :            :  * may be NULL.
    4944                 :            :  *
    4945                 :            :  * The caller retains ownership of the arguments. */
    4946                 :            : void
    4947                 :          0 : vteprec_acl_entry_remove_clause_tcp_flags(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tcp_flags, size_t n_tcp_flags)
    4948                 :            : {
    4949                 :            :     struct ovsdb_datum datum;
    4950                 :            :     union ovsdb_atom key;
    4951                 :            : 
    4952         [ #  # ]:          0 :     ovs_assert(inited);
    4953         [ #  # ]:          0 :     if (n_tcp_flags) {
    4954                 :          0 :         datum.n = 1;
    4955                 :          0 :         datum.keys = &key;
    4956                 :          0 :         key.integer = *tcp_flags;
    4957                 :            :     } else {
    4958                 :          0 :         datum.n = 0;
    4959                 :          0 :         datum.keys = NULL;
    4960                 :            :     }
    4961                 :          0 :     datum.values = NULL;
    4962                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4963                 :            :                           function,
    4964                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS],
    4965                 :            :                           &datum);
    4966                 :          0 : }
    4967                 :            : 
    4968                 :            : /* Sets the "tcp_flags_mask" column from the "ACL_entry" table in 'row' to
    4969                 :            :  * the 'tcp_flags_mask' set with 'n_tcp_flags_mask' entries.
    4970                 :            :  *
    4971                 :            :  * 'n_tcp_flags_mask' may be 0 or 1; if it is 0, then 'tcp_flags_mask'
    4972                 :            :  * may be NULL.
    4973                 :            :  *
    4974                 :            :  * The caller retains ownership of the arguments. */
    4975                 :            : void
    4976                 :          0 : vteprec_acl_entry_remove_clause_tcp_flags_mask(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tcp_flags_mask, size_t n_tcp_flags_mask)
    4977                 :            : {
    4978                 :            :     struct ovsdb_datum datum;
    4979                 :            :     union ovsdb_atom key;
    4980                 :            : 
    4981         [ #  # ]:          0 :     ovs_assert(inited);
    4982         [ #  # ]:          0 :     if (n_tcp_flags_mask) {
    4983                 :          0 :         datum.n = 1;
    4984                 :          0 :         datum.keys = &key;
    4985                 :          0 :         key.integer = *tcp_flags_mask;
    4986                 :            :     } else {
    4987                 :          0 :         datum.n = 0;
    4988                 :          0 :         datum.keys = NULL;
    4989                 :            :     }
    4990                 :          0 :     datum.values = NULL;
    4991                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY],
    4992                 :            :                           function,
    4993                 :            :                           &vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_COL_TCP_FLAGS_MASK],
    4994                 :            :                           &datum);
    4995                 :          0 : }
    4996                 :            : void
    4997                 :          0 : vteprec_acl_entry_remove_clause_false(struct ovsdb_idl *idl)
    4998                 :            : {
    4999                 :            :     struct ovsdb_datum datum;
    5000                 :            : 
    5001                 :          0 :     ovsdb_datum_init_empty(&datum);
    5002                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], OVSDB_F_FALSE, NULL, &datum);
    5003                 :          0 : }
    5004                 :            : void
    5005                 :          0 : vteprec_acl_entry_remove_clause_true(struct ovsdb_idl *idl)
    5006                 :            : {
    5007                 :            :     struct ovsdb_datum datum;
    5008                 :            : 
    5009                 :          0 :     ovsdb_datum_init_empty(&datum);
    5010                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ACL_ENTRY], OVSDB_F_TRUE, NULL, &datum);
    5011                 :          0 : }
    5012                 :            : 
    5013                 :            : struct ovsdb_idl_column vteprec_acl_entry_columns[VTEPREC_ACL_ENTRY_N_COLUMNS];
    5014                 :            : 
    5015                 :            : static void
    5016                 :        741 : vteprec_acl_entry_columns_init(void)
    5017                 :            : {
    5018                 :            :     struct ovsdb_idl_column *c;
    5019                 :            : 
    5020                 :            :     /* Initialize vteprec_acl_entry_col_acle_fault_status. */
    5021                 :        741 :     c = &vteprec_acl_entry_col_acle_fault_status;
    5022                 :        741 :     c->name = "acle_fault_status";
    5023                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5024                 :        741 :     c->type.key.u.string.minLen = 0;
    5025                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5026                 :        741 :     c->type.n_min = 0;
    5027                 :        741 :     c->type.n_max = UINT_MAX;
    5028                 :        741 :     c->mutable = true;
    5029                 :        741 :     c->parse = vteprec_acl_entry_parse_acle_fault_status;
    5030                 :        741 :     c->unparse = vteprec_acl_entry_unparse_acle_fault_status;
    5031                 :            : 
    5032                 :            :     /* Initialize vteprec_acl_entry_col_action. */
    5033                 :        741 :     c = &vteprec_acl_entry_col_action;
    5034                 :        741 :     c->name = "action";
    5035                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5036                 :        741 :     c->type.key.enum_ = xmalloc(sizeof *c->type.key.enum_);
    5037                 :        741 :     c->type.key.enum_->n = 2;
    5038                 :        741 :     c->type.key.enum_->keys = xmalloc(2 * sizeof *c->type.key.enum_->keys);
    5039                 :        741 :     c->type.key.enum_->keys[0].string = xstrdup("deny");
    5040                 :        741 :     c->type.key.enum_->keys[1].string = xstrdup("permit");
    5041                 :        741 :     c->type.key.enum_->values = NULL;
    5042                 :        741 :     ovsdb_datum_sort_assert(c->type.key.enum_, OVSDB_TYPE_STRING);
    5043                 :        741 :     c->type.key.u.string.minLen = 0;
    5044                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5045                 :        741 :     c->type.n_min = 1;
    5046                 :        741 :     c->type.n_max = 1;
    5047                 :        741 :     c->mutable = true;
    5048                 :        741 :     c->parse = vteprec_acl_entry_parse_action;
    5049                 :        741 :     c->unparse = vteprec_acl_entry_unparse_action;
    5050                 :            : 
    5051                 :            :     /* Initialize vteprec_acl_entry_col_dest_ip. */
    5052                 :        741 :     c = &vteprec_acl_entry_col_dest_ip;
    5053                 :        741 :     c->name = "dest_ip";
    5054                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5055                 :        741 :     c->type.key.u.string.minLen = 0;
    5056                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5057                 :        741 :     c->type.n_min = 0;
    5058                 :        741 :     c->type.n_max = 1;
    5059                 :        741 :     c->mutable = true;
    5060                 :        741 :     c->parse = vteprec_acl_entry_parse_dest_ip;
    5061                 :        741 :     c->unparse = vteprec_acl_entry_unparse_dest_ip;
    5062                 :            : 
    5063                 :            :     /* Initialize vteprec_acl_entry_col_dest_mac. */
    5064                 :        741 :     c = &vteprec_acl_entry_col_dest_mac;
    5065                 :        741 :     c->name = "dest_mac";
    5066                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5067                 :        741 :     c->type.key.u.string.minLen = 0;
    5068                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5069                 :        741 :     c->type.n_min = 0;
    5070                 :        741 :     c->type.n_max = 1;
    5071                 :        741 :     c->mutable = true;
    5072                 :        741 :     c->parse = vteprec_acl_entry_parse_dest_mac;
    5073                 :        741 :     c->unparse = vteprec_acl_entry_unparse_dest_mac;
    5074                 :            : 
    5075                 :            :     /* Initialize vteprec_acl_entry_col_dest_mask. */
    5076                 :        741 :     c = &vteprec_acl_entry_col_dest_mask;
    5077                 :        741 :     c->name = "dest_mask";
    5078                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5079                 :        741 :     c->type.key.u.string.minLen = 0;
    5080                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5081                 :        741 :     c->type.n_min = 0;
    5082                 :        741 :     c->type.n_max = 1;
    5083                 :        741 :     c->mutable = true;
    5084                 :        741 :     c->parse = vteprec_acl_entry_parse_dest_mask;
    5085                 :        741 :     c->unparse = vteprec_acl_entry_unparse_dest_mask;
    5086                 :            : 
    5087                 :            :     /* Initialize vteprec_acl_entry_col_dest_port_max. */
    5088                 :        741 :     c = &vteprec_acl_entry_col_dest_port_max;
    5089                 :        741 :     c->name = "dest_port_max";
    5090                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5091                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5092                 :        741 :     c->type.n_min = 0;
    5093                 :        741 :     c->type.n_max = 1;
    5094                 :        741 :     c->mutable = true;
    5095                 :        741 :     c->parse = vteprec_acl_entry_parse_dest_port_max;
    5096                 :        741 :     c->unparse = vteprec_acl_entry_unparse_dest_port_max;
    5097                 :            : 
    5098                 :            :     /* Initialize vteprec_acl_entry_col_dest_port_min. */
    5099                 :        741 :     c = &vteprec_acl_entry_col_dest_port_min;
    5100                 :        741 :     c->name = "dest_port_min";
    5101                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5102                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5103                 :        741 :     c->type.n_min = 0;
    5104                 :        741 :     c->type.n_max = 1;
    5105                 :        741 :     c->mutable = true;
    5106                 :        741 :     c->parse = vteprec_acl_entry_parse_dest_port_min;
    5107                 :        741 :     c->unparse = vteprec_acl_entry_unparse_dest_port_min;
    5108                 :            : 
    5109                 :            :     /* Initialize vteprec_acl_entry_col_direction. */
    5110                 :        741 :     c = &vteprec_acl_entry_col_direction;
    5111                 :        741 :     c->name = "direction";
    5112                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5113                 :        741 :     c->type.key.enum_ = xmalloc(sizeof *c->type.key.enum_);
    5114                 :        741 :     c->type.key.enum_->n = 2;
    5115                 :        741 :     c->type.key.enum_->keys = xmalloc(2 * sizeof *c->type.key.enum_->keys);
    5116                 :        741 :     c->type.key.enum_->keys[0].string = xstrdup("egress");
    5117                 :        741 :     c->type.key.enum_->keys[1].string = xstrdup("ingress");
    5118                 :        741 :     c->type.key.enum_->values = NULL;
    5119                 :        741 :     ovsdb_datum_sort_assert(c->type.key.enum_, OVSDB_TYPE_STRING);
    5120                 :        741 :     c->type.key.u.string.minLen = 0;
    5121                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5122                 :        741 :     c->type.n_min = 1;
    5123                 :        741 :     c->type.n_max = 1;
    5124                 :        741 :     c->mutable = true;
    5125                 :        741 :     c->parse = vteprec_acl_entry_parse_direction;
    5126                 :        741 :     c->unparse = vteprec_acl_entry_unparse_direction;
    5127                 :            : 
    5128                 :            :     /* Initialize vteprec_acl_entry_col_ethertype. */
    5129                 :        741 :     c = &vteprec_acl_entry_col_ethertype;
    5130                 :        741 :     c->name = "ethertype";
    5131                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5132                 :        741 :     c->type.key.u.string.minLen = 0;
    5133                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5134                 :        741 :     c->type.n_min = 0;
    5135                 :        741 :     c->type.n_max = 1;
    5136                 :        741 :     c->mutable = true;
    5137                 :        741 :     c->parse = vteprec_acl_entry_parse_ethertype;
    5138                 :        741 :     c->unparse = vteprec_acl_entry_unparse_ethertype;
    5139                 :            : 
    5140                 :            :     /* Initialize vteprec_acl_entry_col_icmp_code. */
    5141                 :        741 :     c = &vteprec_acl_entry_col_icmp_code;
    5142                 :        741 :     c->name = "icmp_code";
    5143                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5144                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5145                 :        741 :     c->type.n_min = 0;
    5146                 :        741 :     c->type.n_max = 1;
    5147                 :        741 :     c->mutable = true;
    5148                 :        741 :     c->parse = vteprec_acl_entry_parse_icmp_code;
    5149                 :        741 :     c->unparse = vteprec_acl_entry_unparse_icmp_code;
    5150                 :            : 
    5151                 :            :     /* Initialize vteprec_acl_entry_col_icmp_type. */
    5152                 :        741 :     c = &vteprec_acl_entry_col_icmp_type;
    5153                 :        741 :     c->name = "icmp_type";
    5154                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5155                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5156                 :        741 :     c->type.n_min = 0;
    5157                 :        741 :     c->type.n_max = 1;
    5158                 :        741 :     c->mutable = true;
    5159                 :        741 :     c->parse = vteprec_acl_entry_parse_icmp_type;
    5160                 :        741 :     c->unparse = vteprec_acl_entry_unparse_icmp_type;
    5161                 :            : 
    5162                 :            :     /* Initialize vteprec_acl_entry_col_protocol. */
    5163                 :        741 :     c = &vteprec_acl_entry_col_protocol;
    5164                 :        741 :     c->name = "protocol";
    5165                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5166                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5167                 :        741 :     c->type.n_min = 0;
    5168                 :        741 :     c->type.n_max = 1;
    5169                 :        741 :     c->mutable = true;
    5170                 :        741 :     c->parse = vteprec_acl_entry_parse_protocol;
    5171                 :        741 :     c->unparse = vteprec_acl_entry_unparse_protocol;
    5172                 :            : 
    5173                 :            :     /* Initialize vteprec_acl_entry_col_sequence. */
    5174                 :        741 :     c = &vteprec_acl_entry_col_sequence;
    5175                 :        741 :     c->name = "sequence";
    5176                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5177                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5178                 :        741 :     c->type.n_min = 1;
    5179                 :        741 :     c->type.n_max = 1;
    5180                 :        741 :     c->mutable = true;
    5181                 :        741 :     c->parse = vteprec_acl_entry_parse_sequence;
    5182                 :        741 :     c->unparse = vteprec_acl_entry_unparse_sequence;
    5183                 :            : 
    5184                 :            :     /* Initialize vteprec_acl_entry_col_source_ip. */
    5185                 :        741 :     c = &vteprec_acl_entry_col_source_ip;
    5186                 :        741 :     c->name = "source_ip";
    5187                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5188                 :        741 :     c->type.key.u.string.minLen = 0;
    5189                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5190                 :        741 :     c->type.n_min = 0;
    5191                 :        741 :     c->type.n_max = 1;
    5192                 :        741 :     c->mutable = true;
    5193                 :        741 :     c->parse = vteprec_acl_entry_parse_source_ip;
    5194                 :        741 :     c->unparse = vteprec_acl_entry_unparse_source_ip;
    5195                 :            : 
    5196                 :            :     /* Initialize vteprec_acl_entry_col_source_mac. */
    5197                 :        741 :     c = &vteprec_acl_entry_col_source_mac;
    5198                 :        741 :     c->name = "source_mac";
    5199                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5200                 :        741 :     c->type.key.u.string.minLen = 0;
    5201                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5202                 :        741 :     c->type.n_min = 0;
    5203                 :        741 :     c->type.n_max = 1;
    5204                 :        741 :     c->mutable = true;
    5205                 :        741 :     c->parse = vteprec_acl_entry_parse_source_mac;
    5206                 :        741 :     c->unparse = vteprec_acl_entry_unparse_source_mac;
    5207                 :            : 
    5208                 :            :     /* Initialize vteprec_acl_entry_col_source_mask. */
    5209                 :        741 :     c = &vteprec_acl_entry_col_source_mask;
    5210                 :        741 :     c->name = "source_mask";
    5211                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5212                 :        741 :     c->type.key.u.string.minLen = 0;
    5213                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5214                 :        741 :     c->type.n_min = 0;
    5215                 :        741 :     c->type.n_max = 1;
    5216                 :        741 :     c->mutable = true;
    5217                 :        741 :     c->parse = vteprec_acl_entry_parse_source_mask;
    5218                 :        741 :     c->unparse = vteprec_acl_entry_unparse_source_mask;
    5219                 :            : 
    5220                 :            :     /* Initialize vteprec_acl_entry_col_source_port_max. */
    5221                 :        741 :     c = &vteprec_acl_entry_col_source_port_max;
    5222                 :        741 :     c->name = "source_port_max";
    5223                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5224                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5225                 :        741 :     c->type.n_min = 0;
    5226                 :        741 :     c->type.n_max = 1;
    5227                 :        741 :     c->mutable = true;
    5228                 :        741 :     c->parse = vteprec_acl_entry_parse_source_port_max;
    5229                 :        741 :     c->unparse = vteprec_acl_entry_unparse_source_port_max;
    5230                 :            : 
    5231                 :            :     /* Initialize vteprec_acl_entry_col_source_port_min. */
    5232                 :        741 :     c = &vteprec_acl_entry_col_source_port_min;
    5233                 :        741 :     c->name = "source_port_min";
    5234                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5235                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5236                 :        741 :     c->type.n_min = 0;
    5237                 :        741 :     c->type.n_max = 1;
    5238                 :        741 :     c->mutable = true;
    5239                 :        741 :     c->parse = vteprec_acl_entry_parse_source_port_min;
    5240                 :        741 :     c->unparse = vteprec_acl_entry_unparse_source_port_min;
    5241                 :            : 
    5242                 :            :     /* Initialize vteprec_acl_entry_col_tcp_flags. */
    5243                 :        741 :     c = &vteprec_acl_entry_col_tcp_flags;
    5244                 :        741 :     c->name = "tcp_flags";
    5245                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5246                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5247                 :        741 :     c->type.n_min = 0;
    5248                 :        741 :     c->type.n_max = 1;
    5249                 :        741 :     c->mutable = true;
    5250                 :        741 :     c->parse = vteprec_acl_entry_parse_tcp_flags;
    5251                 :        741 :     c->unparse = vteprec_acl_entry_unparse_tcp_flags;
    5252                 :            : 
    5253                 :            :     /* Initialize vteprec_acl_entry_col_tcp_flags_mask. */
    5254                 :        741 :     c = &vteprec_acl_entry_col_tcp_flags_mask;
    5255                 :        741 :     c->name = "tcp_flags_mask";
    5256                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    5257                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5258                 :        741 :     c->type.n_min = 0;
    5259                 :        741 :     c->type.n_max = 1;
    5260                 :        741 :     c->mutable = true;
    5261                 :        741 :     c->parse = vteprec_acl_entry_parse_tcp_flags_mask;
    5262                 :        741 :     c->unparse = vteprec_acl_entry_unparse_tcp_flags_mask;
    5263                 :        741 : }
    5264                 :            : 
    5265                 :            : /* Arp_Sources_Local table. */
    5266                 :            : 
    5267                 :            : static void
    5268                 :          0 : vteprec_arp_sources_local_parse_locator(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    5269                 :            : {
    5270                 :          0 :     struct vteprec_arp_sources_local *row = vteprec_arp_sources_local_cast(row_);
    5271                 :            : 
    5272         [ #  # ]:          0 :     ovs_assert(inited);
    5273         [ #  # ]:          0 :     if (datum->n >= 1) {
    5274                 :          0 :         row->locator = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
    5275                 :            :     } else {
    5276                 :          0 :         row->locator = NULL;
    5277                 :            :     }
    5278                 :          0 : }
    5279                 :            : 
    5280                 :            : static void
    5281                 :          0 : vteprec_arp_sources_local_parse_src_mac(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    5282                 :            : {
    5283                 :          0 :     struct vteprec_arp_sources_local *row = vteprec_arp_sources_local_cast(row_);
    5284                 :            : 
    5285         [ #  # ]:          0 :     ovs_assert(inited);
    5286         [ #  # ]:          0 :     if (datum->n >= 1) {
    5287                 :          0 :         row->src_mac = datum->keys[0].string;
    5288                 :            :     } else {
    5289                 :          0 :         row->src_mac = "";
    5290                 :            :     }
    5291                 :          0 : }
    5292                 :            : 
    5293                 :            : static void
    5294                 :          0 : vteprec_arp_sources_local_unparse_locator(struct ovsdb_idl_row *row OVS_UNUSED)
    5295                 :            : {
    5296                 :            :     /* Nothing to do. */
    5297                 :          0 : }
    5298                 :            : 
    5299                 :            : static void
    5300                 :          0 : vteprec_arp_sources_local_unparse_src_mac(struct ovsdb_idl_row *row OVS_UNUSED)
    5301                 :            : {
    5302                 :            :     /* Nothing to do. */
    5303                 :          0 : }
    5304                 :            : 
    5305                 :            : static void
    5306                 :          0 : vteprec_arp_sources_local_init__(struct ovsdb_idl_row *row)
    5307                 :            : {
    5308                 :          0 :     vteprec_arp_sources_local_init(vteprec_arp_sources_local_cast(row));
    5309                 :          0 : }
    5310                 :            : 
    5311                 :            : /* Clears the contents of 'row' in table "Arp_Sources_Local". */
    5312                 :            : void
    5313                 :          0 : vteprec_arp_sources_local_init(struct vteprec_arp_sources_local *row)
    5314                 :            : {
    5315                 :          0 :     memset(row, 0, sizeof *row); 
    5316                 :          0 : }
    5317                 :            : 
    5318                 :            : /* Searches table "Arp_Sources_Local" in 'idl' for a row with UUID 'uuid'.  Returns
    5319                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    5320                 :            : const struct vteprec_arp_sources_local *
    5321                 :          0 : vteprec_arp_sources_local_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    5322                 :            : {
    5323                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], uuid));
    5324                 :            : }
    5325                 :            : 
    5326                 :            : /* Returns a row in table "Arp_Sources_Local" in 'idl', or a null pointer if that
    5327                 :            :  * table is empty.
    5328                 :            :  *
    5329                 :            :  * Database tables are internally maintained as hash tables, so adding or
    5330                 :            :  * removing rows while traversing the same table can cause some rows to be
    5331                 :            :  * visited twice or not at apply. */
    5332                 :            : const struct vteprec_arp_sources_local *
    5333                 :          0 : vteprec_arp_sources_local_first(const struct ovsdb_idl *idl)
    5334                 :            : {
    5335                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL]));
    5336                 :            : }
    5337                 :            : 
    5338                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    5339                 :            :  * is the last row in its table. */
    5340                 :            : const struct vteprec_arp_sources_local *
    5341                 :          0 : vteprec_arp_sources_local_next(const struct vteprec_arp_sources_local *row)
    5342                 :            : {
    5343                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_next_row(&row->header_));
    5344                 :            : }
    5345                 :            : 
    5346                 :          0 : unsigned int vteprec_arp_sources_local_get_seqno(const struct ovsdb_idl *idl)
    5347                 :            : {
    5348                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL]);
    5349                 :            : }
    5350                 :            : 
    5351                 :          0 : unsigned int vteprec_arp_sources_local_row_get_seqno(const struct vteprec_arp_sources_local *row, enum ovsdb_idl_change change)
    5352                 :            : {
    5353                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    5354                 :            : }
    5355                 :            : 
    5356                 :            : const struct vteprec_arp_sources_local *
    5357                 :          0 : vteprec_arp_sources_local_track_get_first(const struct ovsdb_idl *idl)
    5358                 :            : {
    5359                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL]));
    5360                 :            : }
    5361                 :            : 
    5362                 :            : const struct vteprec_arp_sources_local
    5363                 :          0 : *vteprec_arp_sources_local_track_get_next(const struct vteprec_arp_sources_local *row)
    5364                 :            : {
    5365                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_track_get_next(&row->header_));
    5366                 :            : }
    5367                 :            : 
    5368                 :            : 
    5369                 :            : /* Deletes 'row' from table "Arp_Sources_Local".  'row' may be freed, so it must not be
    5370                 :            :  * accessed afterward.
    5371                 :            :  *
    5372                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5373                 :            : void
    5374                 :          0 : vteprec_arp_sources_local_delete(const struct vteprec_arp_sources_local *row)
    5375                 :            : {
    5376                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    5377                 :          0 : }
    5378                 :            : 
    5379                 :            : /* Inserts and returns a new row in the table "Arp_Sources_Local" in the database
    5380                 :            :  * with open transaction 'txn'.
    5381                 :            :  *
    5382                 :            :  * The new row is assigned a randomly generated provisional UUID.
    5383                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    5384                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    5385                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    5386                 :            : struct vteprec_arp_sources_local *
    5387                 :          0 : vteprec_arp_sources_local_insert(struct ovsdb_idl_txn *txn)
    5388                 :            : {
    5389                 :          0 :     return vteprec_arp_sources_local_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], NULL));
    5390                 :            : }
    5391                 :            : 
    5392                 :            : bool
    5393                 :          0 : vteprec_arp_sources_local_is_updated(const struct vteprec_arp_sources_local *row, enum vteprec_arp_sources_local_column_id column)
    5394                 :            : {
    5395                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_arp_sources_local_columns[column]);
    5396                 :            : }
    5397                 :            : 
    5398                 :            : /* Causes the original contents of column "locator" in 'row' to be
    5399                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    5400                 :            :  * "locator" in 'row' changed (or if 'row' was deleted) between the
    5401                 :            :  * time that the IDL originally read its contents and the time that the
    5402                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    5403                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    5404                 :            :  * change has already been received).
    5405                 :            :  *
    5406                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    5407                 :            :  * reads, an application should call this function any time "locator" is
    5408                 :            :  * read as part of a read-modify-write operation.
    5409                 :            :  *
    5410                 :            :  * In some cases this function reduces to a no-op, because the current value
    5411                 :            :  * of "locator" is already known:
    5412                 :            :  *
    5413                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    5414                 :            :  *     vteprec_arp_sources_local_insert()).
    5415                 :            :  *
    5416                 :            :  *   - If "locator" has already been modified (with
    5417                 :            :  *     vteprec_arp_sources_local_set_locator()) within the current transaction.
    5418                 :            :  *
    5419                 :            :  * Because of the latter property, always call this function *before*
    5420                 :            :  * vteprec_arp_sources_local_set_locator() for a given read-modify-write.
    5421                 :            :  *
    5422                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5423                 :            : void
    5424                 :          0 : vteprec_arp_sources_local_verify_locator(const struct vteprec_arp_sources_local *row)
    5425                 :            : {
    5426         [ #  # ]:          0 :     ovs_assert(inited);
    5427                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_LOCATOR]);
    5428                 :          0 : }
    5429                 :            : 
    5430                 :            : /* Causes the original contents of column "src_mac" in 'row' to be
    5431                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    5432                 :            :  * "src_mac" in 'row' changed (or if 'row' was deleted) between the
    5433                 :            :  * time that the IDL originally read its contents and the time that the
    5434                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    5435                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    5436                 :            :  * change has already been received).
    5437                 :            :  *
    5438                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    5439                 :            :  * reads, an application should call this function any time "src_mac" is
    5440                 :            :  * read as part of a read-modify-write operation.
    5441                 :            :  *
    5442                 :            :  * In some cases this function reduces to a no-op, because the current value
    5443                 :            :  * of "src_mac" is already known:
    5444                 :            :  *
    5445                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    5446                 :            :  *     vteprec_arp_sources_local_insert()).
    5447                 :            :  *
    5448                 :            :  *   - If "src_mac" has already been modified (with
    5449                 :            :  *     vteprec_arp_sources_local_set_src_mac()) within the current transaction.
    5450                 :            :  *
    5451                 :            :  * Because of the latter property, always call this function *before*
    5452                 :            :  * vteprec_arp_sources_local_set_src_mac() for a given read-modify-write.
    5453                 :            :  *
    5454                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5455                 :            : void
    5456                 :          0 : vteprec_arp_sources_local_verify_src_mac(const struct vteprec_arp_sources_local *row)
    5457                 :            : {
    5458         [ #  # ]:          0 :     ovs_assert(inited);
    5459                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_SRC_MAC]);
    5460                 :          0 : }
    5461                 :            : 
    5462                 :            : /* Returns the "locator" column's value from the "Arp_Sources_Local" table in 'row'
    5463                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    5464                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    5465                 :            :  * for a given key than implementing the same operation on the "cooked"
    5466                 :            :  * form in 'row'.
    5467                 :            :  *
    5468                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
    5469                 :            :  * (This helps to avoid silent bugs if someone changes locator's
    5470                 :            :  * type without updating the caller.)
    5471                 :            :  *
    5472                 :            :  * The caller must not modify or free the returned value.
    5473                 :            :  *
    5474                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    5475                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    5476                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    5477                 :            :  * of it with ovsdb_datum_clone().
    5478                 :            :  *
    5479                 :            :  * This function is rarely useful, since it is easier to access the value
    5480                 :            :  * directly through the "locator" member in vteprec_arp_sources_local. */
    5481                 :            : const struct ovsdb_datum *
    5482                 :          0 : vteprec_arp_sources_local_get_locator(const struct vteprec_arp_sources_local *row,
    5483                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    5484                 :            : {
    5485         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
    5486                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_arp_sources_local_col_locator);
    5487                 :            : }
    5488                 :            : 
    5489                 :            : /* Returns the "src_mac" column's value from the "Arp_Sources_Local" table in 'row'
    5490                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    5491                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    5492                 :            :  * for a given key than implementing the same operation on the "cooked"
    5493                 :            :  * form in 'row'.
    5494                 :            :  *
    5495                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    5496                 :            :  * (This helps to avoid silent bugs if someone changes src_mac's
    5497                 :            :  * type without updating the caller.)
    5498                 :            :  *
    5499                 :            :  * The caller must not modify or free the returned value.
    5500                 :            :  *
    5501                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    5502                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    5503                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    5504                 :            :  * of it with ovsdb_datum_clone().
    5505                 :            :  *
    5506                 :            :  * This function is rarely useful, since it is easier to access the value
    5507                 :            :  * directly through the "src_mac" member in vteprec_arp_sources_local. */
    5508                 :            : const struct ovsdb_datum *
    5509                 :          0 : vteprec_arp_sources_local_get_src_mac(const struct vteprec_arp_sources_local *row,
    5510                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    5511                 :            : {
    5512         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    5513                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_arp_sources_local_col_src_mac);
    5514                 :            : }
    5515                 :            : 
    5516                 :            : /* Sets the "locator" column from the "Arp_Sources_Local" table in 'row' to
    5517                 :            :  * 'locator'.
    5518                 :            :  *
    5519                 :            :  * The caller retains ownership of the arguments. */
    5520                 :            : void
    5521                 :          0 : vteprec_arp_sources_local_set_locator(const struct vteprec_arp_sources_local *row, const struct vteprec_physical_locator *locator)
    5522                 :            : {
    5523                 :            :     struct ovsdb_datum datum;
    5524                 :            :     union ovsdb_atom key;
    5525                 :            : 
    5526         [ #  # ]:          0 :     ovs_assert(inited);
    5527                 :          0 :     datum.n = 1;
    5528                 :          0 :     datum.keys = &key;
    5529                 :          0 :     key.uuid = locator->header_.uuid;
    5530                 :          0 :     datum.values = NULL;
    5531                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_LOCATOR], &datum);
    5532                 :          0 : }
    5533                 :            : 
    5534                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Local" table in 'row' to
    5535                 :            :  * 'src_mac'.
    5536                 :            :  *
    5537                 :            :  * The caller retains ownership of the arguments. */
    5538                 :            : void
    5539                 :          0 : vteprec_arp_sources_local_set_src_mac(const struct vteprec_arp_sources_local *row, const char *src_mac)
    5540                 :            : {
    5541                 :            :     struct ovsdb_datum datum;
    5542                 :            :     union ovsdb_atom key;
    5543                 :            : 
    5544         [ #  # ]:          0 :     ovs_assert(inited);
    5545                 :          0 :     datum.n = 1;
    5546                 :          0 :     datum.keys = &key;
    5547                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    5548                 :          0 :     datum.values = NULL;
    5549                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_SRC_MAC], &datum);
    5550                 :          0 : }
    5551                 :            : 
    5552                 :            : /* Sets the "locator" column from the "Arp_Sources_Local" table in 'row' to
    5553                 :            :  * 'locator'.
    5554                 :            :  *
    5555                 :            :  * The caller retains ownership of the arguments. */
    5556                 :            : void
    5557                 :          0 : vteprec_arp_sources_local_add_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
    5558                 :            : {
    5559                 :            :     struct ovsdb_datum datum;
    5560                 :            :     union ovsdb_atom key;
    5561                 :            : 
    5562         [ #  # ]:          0 :     ovs_assert(inited);
    5563                 :          0 :     datum.n = 1;
    5564                 :          0 :     datum.keys = &key;
    5565                 :          0 :     key.uuid = *locator;
    5566                 :          0 :     datum.values = NULL;
    5567                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL],
    5568                 :            :                           function,
    5569                 :            :                           &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_LOCATOR],
    5570                 :            :                           &datum);
    5571                 :          0 : }
    5572                 :            : 
    5573                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Local" table in 'row' to
    5574                 :            :  * 'src_mac'.
    5575                 :            :  *
    5576                 :            :  * The caller retains ownership of the arguments. */
    5577                 :            : void
    5578                 :          0 : vteprec_arp_sources_local_add_clause_src_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *src_mac)
    5579                 :            : {
    5580                 :            :     struct ovsdb_datum datum;
    5581                 :            :     union ovsdb_atom key;
    5582                 :            : 
    5583         [ #  # ]:          0 :     ovs_assert(inited);
    5584                 :          0 :     datum.n = 1;
    5585                 :          0 :     datum.keys = &key;
    5586                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    5587                 :          0 :     datum.values = NULL;
    5588                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL],
    5589                 :            :                           function,
    5590                 :            :                           &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_SRC_MAC],
    5591                 :            :                           &datum);
    5592                 :          0 : }
    5593                 :            : void
    5594                 :          0 : vteprec_arp_sources_local_add_clause_false(struct ovsdb_idl *idl)
    5595                 :            : {
    5596                 :            :     struct ovsdb_datum datum;
    5597                 :            : 
    5598                 :          0 :     ovsdb_datum_init_empty(&datum);
    5599                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], OVSDB_F_FALSE, NULL, &datum);
    5600                 :          0 : }
    5601                 :            : void
    5602                 :          0 : vteprec_arp_sources_local_add_clause_true(struct ovsdb_idl *idl)
    5603                 :            : {
    5604                 :            :     struct ovsdb_datum datum;
    5605                 :            : 
    5606                 :          0 :     ovsdb_datum_init_empty(&datum);
    5607                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], OVSDB_F_TRUE, NULL, &datum);
    5608                 :          0 : }
    5609                 :            : 
    5610                 :            : /* Sets the "locator" column from the "Arp_Sources_Local" table in 'row' to
    5611                 :            :  * 'locator'.
    5612                 :            :  *
    5613                 :            :  * The caller retains ownership of the arguments. */
    5614                 :            : void
    5615                 :          0 : vteprec_arp_sources_local_remove_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
    5616                 :            : {
    5617                 :            :     struct ovsdb_datum datum;
    5618                 :            :     union ovsdb_atom key;
    5619                 :            : 
    5620         [ #  # ]:          0 :     ovs_assert(inited);
    5621                 :          0 :     datum.n = 1;
    5622                 :          0 :     datum.keys = &key;
    5623                 :          0 :     key.uuid = *locator;
    5624                 :          0 :     datum.values = NULL;
    5625                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL],
    5626                 :            :                           function,
    5627                 :            :                           &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_LOCATOR],
    5628                 :            :                           &datum);
    5629                 :          0 : }
    5630                 :            : 
    5631                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Local" table in 'row' to
    5632                 :            :  * 'src_mac'.
    5633                 :            :  *
    5634                 :            :  * The caller retains ownership of the arguments. */
    5635                 :            : void
    5636                 :          0 : vteprec_arp_sources_local_remove_clause_src_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *src_mac)
    5637                 :            : {
    5638                 :            :     struct ovsdb_datum datum;
    5639                 :            :     union ovsdb_atom key;
    5640                 :            : 
    5641         [ #  # ]:          0 :     ovs_assert(inited);
    5642                 :          0 :     datum.n = 1;
    5643                 :          0 :     datum.keys = &key;
    5644                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    5645                 :          0 :     datum.values = NULL;
    5646                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL],
    5647                 :            :                           function,
    5648                 :            :                           &vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_COL_SRC_MAC],
    5649                 :            :                           &datum);
    5650                 :          0 : }
    5651                 :            : void
    5652                 :          0 : vteprec_arp_sources_local_remove_clause_false(struct ovsdb_idl *idl)
    5653                 :            : {
    5654                 :            :     struct ovsdb_datum datum;
    5655                 :            : 
    5656                 :          0 :     ovsdb_datum_init_empty(&datum);
    5657                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], OVSDB_F_FALSE, NULL, &datum);
    5658                 :          0 : }
    5659                 :            : void
    5660                 :          0 : vteprec_arp_sources_local_remove_clause_true(struct ovsdb_idl *idl)
    5661                 :            : {
    5662                 :            :     struct ovsdb_datum datum;
    5663                 :            : 
    5664                 :          0 :     ovsdb_datum_init_empty(&datum);
    5665                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_LOCAL], OVSDB_F_TRUE, NULL, &datum);
    5666                 :          0 : }
    5667                 :            : 
    5668                 :            : struct ovsdb_idl_column vteprec_arp_sources_local_columns[VTEPREC_ARP_SOURCES_LOCAL_N_COLUMNS];
    5669                 :            : 
    5670                 :            : static void
    5671                 :        741 : vteprec_arp_sources_local_columns_init(void)
    5672                 :            : {
    5673                 :            :     struct ovsdb_idl_column *c;
    5674                 :            : 
    5675                 :            :     /* Initialize vteprec_arp_sources_local_col_locator. */
    5676                 :        741 :     c = &vteprec_arp_sources_local_col_locator;
    5677                 :        741 :     c->name = "locator";
    5678                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
    5679                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
    5680                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
    5681                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5682                 :        741 :     c->type.n_min = 1;
    5683                 :        741 :     c->type.n_max = 1;
    5684                 :        741 :     c->mutable = true;
    5685                 :        741 :     c->parse = vteprec_arp_sources_local_parse_locator;
    5686                 :        741 :     c->unparse = vteprec_arp_sources_local_unparse_locator;
    5687                 :            : 
    5688                 :            :     /* Initialize vteprec_arp_sources_local_col_src_mac. */
    5689                 :        741 :     c = &vteprec_arp_sources_local_col_src_mac;
    5690                 :        741 :     c->name = "src_mac";
    5691                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    5692                 :        741 :     c->type.key.u.string.minLen = 0;
    5693                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    5694                 :        741 :     c->type.n_min = 1;
    5695                 :        741 :     c->type.n_max = 1;
    5696                 :        741 :     c->mutable = true;
    5697                 :        741 :     c->parse = vteprec_arp_sources_local_parse_src_mac;
    5698                 :        741 :     c->unparse = vteprec_arp_sources_local_unparse_src_mac;
    5699                 :        741 : }
    5700                 :            : 
    5701                 :            : /* Arp_Sources_Remote table. */
    5702                 :            : 
    5703                 :            : static void
    5704                 :          0 : vteprec_arp_sources_remote_parse_locator(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    5705                 :            : {
    5706                 :          0 :     struct vteprec_arp_sources_remote *row = vteprec_arp_sources_remote_cast(row_);
    5707                 :            : 
    5708         [ #  # ]:          0 :     ovs_assert(inited);
    5709         [ #  # ]:          0 :     if (datum->n >= 1) {
    5710                 :          0 :         row->locator = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
    5711                 :            :     } else {
    5712                 :          0 :         row->locator = NULL;
    5713                 :            :     }
    5714                 :          0 : }
    5715                 :            : 
    5716                 :            : static void
    5717                 :          0 : vteprec_arp_sources_remote_parse_src_mac(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    5718                 :            : {
    5719                 :          0 :     struct vteprec_arp_sources_remote *row = vteprec_arp_sources_remote_cast(row_);
    5720                 :            : 
    5721         [ #  # ]:          0 :     ovs_assert(inited);
    5722         [ #  # ]:          0 :     if (datum->n >= 1) {
    5723                 :          0 :         row->src_mac = datum->keys[0].string;
    5724                 :            :     } else {
    5725                 :          0 :         row->src_mac = "";
    5726                 :            :     }
    5727                 :          0 : }
    5728                 :            : 
    5729                 :            : static void
    5730                 :          0 : vteprec_arp_sources_remote_unparse_locator(struct ovsdb_idl_row *row OVS_UNUSED)
    5731                 :            : {
    5732                 :            :     /* Nothing to do. */
    5733                 :          0 : }
    5734                 :            : 
    5735                 :            : static void
    5736                 :          0 : vteprec_arp_sources_remote_unparse_src_mac(struct ovsdb_idl_row *row OVS_UNUSED)
    5737                 :            : {
    5738                 :            :     /* Nothing to do. */
    5739                 :          0 : }
    5740                 :            : 
    5741                 :            : static void
    5742                 :          0 : vteprec_arp_sources_remote_init__(struct ovsdb_idl_row *row)
    5743                 :            : {
    5744                 :          0 :     vteprec_arp_sources_remote_init(vteprec_arp_sources_remote_cast(row));
    5745                 :          0 : }
    5746                 :            : 
    5747                 :            : /* Clears the contents of 'row' in table "Arp_Sources_Remote". */
    5748                 :            : void
    5749                 :          0 : vteprec_arp_sources_remote_init(struct vteprec_arp_sources_remote *row)
    5750                 :            : {
    5751                 :          0 :     memset(row, 0, sizeof *row); 
    5752                 :          0 : }
    5753                 :            : 
    5754                 :            : /* Searches table "Arp_Sources_Remote" in 'idl' for a row with UUID 'uuid'.  Returns
    5755                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    5756                 :            : const struct vteprec_arp_sources_remote *
    5757                 :          0 : vteprec_arp_sources_remote_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    5758                 :            : {
    5759                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], uuid));
    5760                 :            : }
    5761                 :            : 
    5762                 :            : /* Returns a row in table "Arp_Sources_Remote" in 'idl', or a null pointer if that
    5763                 :            :  * table is empty.
    5764                 :            :  *
    5765                 :            :  * Database tables are internally maintained as hash tables, so adding or
    5766                 :            :  * removing rows while traversing the same table can cause some rows to be
    5767                 :            :  * visited twice or not at apply. */
    5768                 :            : const struct vteprec_arp_sources_remote *
    5769                 :          0 : vteprec_arp_sources_remote_first(const struct ovsdb_idl *idl)
    5770                 :            : {
    5771                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE]));
    5772                 :            : }
    5773                 :            : 
    5774                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    5775                 :            :  * is the last row in its table. */
    5776                 :            : const struct vteprec_arp_sources_remote *
    5777                 :          0 : vteprec_arp_sources_remote_next(const struct vteprec_arp_sources_remote *row)
    5778                 :            : {
    5779                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_next_row(&row->header_));
    5780                 :            : }
    5781                 :            : 
    5782                 :          0 : unsigned int vteprec_arp_sources_remote_get_seqno(const struct ovsdb_idl *idl)
    5783                 :            : {
    5784                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE]);
    5785                 :            : }
    5786                 :            : 
    5787                 :          0 : unsigned int vteprec_arp_sources_remote_row_get_seqno(const struct vteprec_arp_sources_remote *row, enum ovsdb_idl_change change)
    5788                 :            : {
    5789                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    5790                 :            : }
    5791                 :            : 
    5792                 :            : const struct vteprec_arp_sources_remote *
    5793                 :          0 : vteprec_arp_sources_remote_track_get_first(const struct ovsdb_idl *idl)
    5794                 :            : {
    5795                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE]));
    5796                 :            : }
    5797                 :            : 
    5798                 :            : const struct vteprec_arp_sources_remote
    5799                 :          0 : *vteprec_arp_sources_remote_track_get_next(const struct vteprec_arp_sources_remote *row)
    5800                 :            : {
    5801                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_track_get_next(&row->header_));
    5802                 :            : }
    5803                 :            : 
    5804                 :            : 
    5805                 :            : /* Deletes 'row' from table "Arp_Sources_Remote".  'row' may be freed, so it must not be
    5806                 :            :  * accessed afterward.
    5807                 :            :  *
    5808                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5809                 :            : void
    5810                 :          0 : vteprec_arp_sources_remote_delete(const struct vteprec_arp_sources_remote *row)
    5811                 :            : {
    5812                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    5813                 :          0 : }
    5814                 :            : 
    5815                 :            : /* Inserts and returns a new row in the table "Arp_Sources_Remote" in the database
    5816                 :            :  * with open transaction 'txn'.
    5817                 :            :  *
    5818                 :            :  * The new row is assigned a randomly generated provisional UUID.
    5819                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    5820                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    5821                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    5822                 :            : struct vteprec_arp_sources_remote *
    5823                 :          0 : vteprec_arp_sources_remote_insert(struct ovsdb_idl_txn *txn)
    5824                 :            : {
    5825                 :          0 :     return vteprec_arp_sources_remote_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], NULL));
    5826                 :            : }
    5827                 :            : 
    5828                 :            : bool
    5829                 :          0 : vteprec_arp_sources_remote_is_updated(const struct vteprec_arp_sources_remote *row, enum vteprec_arp_sources_remote_column_id column)
    5830                 :            : {
    5831                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_arp_sources_remote_columns[column]);
    5832                 :            : }
    5833                 :            : 
    5834                 :            : /* Causes the original contents of column "locator" in 'row' to be
    5835                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    5836                 :            :  * "locator" in 'row' changed (or if 'row' was deleted) between the
    5837                 :            :  * time that the IDL originally read its contents and the time that the
    5838                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    5839                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    5840                 :            :  * change has already been received).
    5841                 :            :  *
    5842                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    5843                 :            :  * reads, an application should call this function any time "locator" is
    5844                 :            :  * read as part of a read-modify-write operation.
    5845                 :            :  *
    5846                 :            :  * In some cases this function reduces to a no-op, because the current value
    5847                 :            :  * of "locator" is already known:
    5848                 :            :  *
    5849                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    5850                 :            :  *     vteprec_arp_sources_remote_insert()).
    5851                 :            :  *
    5852                 :            :  *   - If "locator" has already been modified (with
    5853                 :            :  *     vteprec_arp_sources_remote_set_locator()) within the current transaction.
    5854                 :            :  *
    5855                 :            :  * Because of the latter property, always call this function *before*
    5856                 :            :  * vteprec_arp_sources_remote_set_locator() for a given read-modify-write.
    5857                 :            :  *
    5858                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5859                 :            : void
    5860                 :          0 : vteprec_arp_sources_remote_verify_locator(const struct vteprec_arp_sources_remote *row)
    5861                 :            : {
    5862         [ #  # ]:          0 :     ovs_assert(inited);
    5863                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_LOCATOR]);
    5864                 :          0 : }
    5865                 :            : 
    5866                 :            : /* Causes the original contents of column "src_mac" in 'row' to be
    5867                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    5868                 :            :  * "src_mac" in 'row' changed (or if 'row' was deleted) between the
    5869                 :            :  * time that the IDL originally read its contents and the time that the
    5870                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    5871                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    5872                 :            :  * change has already been received).
    5873                 :            :  *
    5874                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    5875                 :            :  * reads, an application should call this function any time "src_mac" is
    5876                 :            :  * read as part of a read-modify-write operation.
    5877                 :            :  *
    5878                 :            :  * In some cases this function reduces to a no-op, because the current value
    5879                 :            :  * of "src_mac" is already known:
    5880                 :            :  *
    5881                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    5882                 :            :  *     vteprec_arp_sources_remote_insert()).
    5883                 :            :  *
    5884                 :            :  *   - If "src_mac" has already been modified (with
    5885                 :            :  *     vteprec_arp_sources_remote_set_src_mac()) within the current transaction.
    5886                 :            :  *
    5887                 :            :  * Because of the latter property, always call this function *before*
    5888                 :            :  * vteprec_arp_sources_remote_set_src_mac() for a given read-modify-write.
    5889                 :            :  *
    5890                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    5891                 :            : void
    5892                 :          0 : vteprec_arp_sources_remote_verify_src_mac(const struct vteprec_arp_sources_remote *row)
    5893                 :            : {
    5894         [ #  # ]:          0 :     ovs_assert(inited);
    5895                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_SRC_MAC]);
    5896                 :          0 : }
    5897                 :            : 
    5898                 :            : /* Returns the "locator" column's value from the "Arp_Sources_Remote" table in 'row'
    5899                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    5900                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    5901                 :            :  * for a given key than implementing the same operation on the "cooked"
    5902                 :            :  * form in 'row'.
    5903                 :            :  *
    5904                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
    5905                 :            :  * (This helps to avoid silent bugs if someone changes locator's
    5906                 :            :  * type without updating the caller.)
    5907                 :            :  *
    5908                 :            :  * The caller must not modify or free the returned value.
    5909                 :            :  *
    5910                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    5911                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    5912                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    5913                 :            :  * of it with ovsdb_datum_clone().
    5914                 :            :  *
    5915                 :            :  * This function is rarely useful, since it is easier to access the value
    5916                 :            :  * directly through the "locator" member in vteprec_arp_sources_remote. */
    5917                 :            : const struct ovsdb_datum *
    5918                 :          0 : vteprec_arp_sources_remote_get_locator(const struct vteprec_arp_sources_remote *row,
    5919                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    5920                 :            : {
    5921         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
    5922                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_arp_sources_remote_col_locator);
    5923                 :            : }
    5924                 :            : 
    5925                 :            : /* Returns the "src_mac" column's value from the "Arp_Sources_Remote" table in 'row'
    5926                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    5927                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    5928                 :            :  * for a given key than implementing the same operation on the "cooked"
    5929                 :            :  * form in 'row'.
    5930                 :            :  *
    5931                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    5932                 :            :  * (This helps to avoid silent bugs if someone changes src_mac's
    5933                 :            :  * type without updating the caller.)
    5934                 :            :  *
    5935                 :            :  * The caller must not modify or free the returned value.
    5936                 :            :  *
    5937                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    5938                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    5939                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    5940                 :            :  * of it with ovsdb_datum_clone().
    5941                 :            :  *
    5942                 :            :  * This function is rarely useful, since it is easier to access the value
    5943                 :            :  * directly through the "src_mac" member in vteprec_arp_sources_remote. */
    5944                 :            : const struct ovsdb_datum *
    5945                 :          0 : vteprec_arp_sources_remote_get_src_mac(const struct vteprec_arp_sources_remote *row,
    5946                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    5947                 :            : {
    5948         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    5949                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_arp_sources_remote_col_src_mac);
    5950                 :            : }
    5951                 :            : 
    5952                 :            : /* Sets the "locator" column from the "Arp_Sources_Remote" table in 'row' to
    5953                 :            :  * 'locator'.
    5954                 :            :  *
    5955                 :            :  * The caller retains ownership of the arguments. */
    5956                 :            : void
    5957                 :          0 : vteprec_arp_sources_remote_set_locator(const struct vteprec_arp_sources_remote *row, const struct vteprec_physical_locator *locator)
    5958                 :            : {
    5959                 :            :     struct ovsdb_datum datum;
    5960                 :            :     union ovsdb_atom key;
    5961                 :            : 
    5962         [ #  # ]:          0 :     ovs_assert(inited);
    5963                 :          0 :     datum.n = 1;
    5964                 :          0 :     datum.keys = &key;
    5965                 :          0 :     key.uuid = locator->header_.uuid;
    5966                 :          0 :     datum.values = NULL;
    5967                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_LOCATOR], &datum);
    5968                 :          0 : }
    5969                 :            : 
    5970                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Remote" table in 'row' to
    5971                 :            :  * 'src_mac'.
    5972                 :            :  *
    5973                 :            :  * The caller retains ownership of the arguments. */
    5974                 :            : void
    5975                 :          0 : vteprec_arp_sources_remote_set_src_mac(const struct vteprec_arp_sources_remote *row, const char *src_mac)
    5976                 :            : {
    5977                 :            :     struct ovsdb_datum datum;
    5978                 :            :     union ovsdb_atom key;
    5979                 :            : 
    5980         [ #  # ]:          0 :     ovs_assert(inited);
    5981                 :          0 :     datum.n = 1;
    5982                 :          0 :     datum.keys = &key;
    5983                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    5984                 :          0 :     datum.values = NULL;
    5985                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_SRC_MAC], &datum);
    5986                 :          0 : }
    5987                 :            : 
    5988                 :            : /* Sets the "locator" column from the "Arp_Sources_Remote" table in 'row' to
    5989                 :            :  * 'locator'.
    5990                 :            :  *
    5991                 :            :  * The caller retains ownership of the arguments. */
    5992                 :            : void
    5993                 :          0 : vteprec_arp_sources_remote_add_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
    5994                 :            : {
    5995                 :            :     struct ovsdb_datum datum;
    5996                 :            :     union ovsdb_atom key;
    5997                 :            : 
    5998         [ #  # ]:          0 :     ovs_assert(inited);
    5999                 :          0 :     datum.n = 1;
    6000                 :          0 :     datum.keys = &key;
    6001                 :          0 :     key.uuid = *locator;
    6002                 :          0 :     datum.values = NULL;
    6003                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE],
    6004                 :            :                           function,
    6005                 :            :                           &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_LOCATOR],
    6006                 :            :                           &datum);
    6007                 :          0 : }
    6008                 :            : 
    6009                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Remote" table in 'row' to
    6010                 :            :  * 'src_mac'.
    6011                 :            :  *
    6012                 :            :  * The caller retains ownership of the arguments. */
    6013                 :            : void
    6014                 :          0 : vteprec_arp_sources_remote_add_clause_src_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *src_mac)
    6015                 :            : {
    6016                 :            :     struct ovsdb_datum datum;
    6017                 :            :     union ovsdb_atom key;
    6018                 :            : 
    6019         [ #  # ]:          0 :     ovs_assert(inited);
    6020                 :          0 :     datum.n = 1;
    6021                 :          0 :     datum.keys = &key;
    6022                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    6023                 :          0 :     datum.values = NULL;
    6024                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE],
    6025                 :            :                           function,
    6026                 :            :                           &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_SRC_MAC],
    6027                 :            :                           &datum);
    6028                 :          0 : }
    6029                 :            : void
    6030                 :          0 : vteprec_arp_sources_remote_add_clause_false(struct ovsdb_idl *idl)
    6031                 :            : {
    6032                 :            :     struct ovsdb_datum datum;
    6033                 :            : 
    6034                 :          0 :     ovsdb_datum_init_empty(&datum);
    6035                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], OVSDB_F_FALSE, NULL, &datum);
    6036                 :          0 : }
    6037                 :            : void
    6038                 :          0 : vteprec_arp_sources_remote_add_clause_true(struct ovsdb_idl *idl)
    6039                 :            : {
    6040                 :            :     struct ovsdb_datum datum;
    6041                 :            : 
    6042                 :          0 :     ovsdb_datum_init_empty(&datum);
    6043                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], OVSDB_F_TRUE, NULL, &datum);
    6044                 :          0 : }
    6045                 :            : 
    6046                 :            : /* Sets the "locator" column from the "Arp_Sources_Remote" table in 'row' to
    6047                 :            :  * 'locator'.
    6048                 :            :  *
    6049                 :            :  * The caller retains ownership of the arguments. */
    6050                 :            : void
    6051                 :          0 : vteprec_arp_sources_remote_remove_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
    6052                 :            : {
    6053                 :            :     struct ovsdb_datum datum;
    6054                 :            :     union ovsdb_atom key;
    6055                 :            : 
    6056         [ #  # ]:          0 :     ovs_assert(inited);
    6057                 :          0 :     datum.n = 1;
    6058                 :          0 :     datum.keys = &key;
    6059                 :          0 :     key.uuid = *locator;
    6060                 :          0 :     datum.values = NULL;
    6061                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE],
    6062                 :            :                           function,
    6063                 :            :                           &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_LOCATOR],
    6064                 :            :                           &datum);
    6065                 :          0 : }
    6066                 :            : 
    6067                 :            : /* Sets the "src_mac" column from the "Arp_Sources_Remote" table in 'row' to
    6068                 :            :  * 'src_mac'.
    6069                 :            :  *
    6070                 :            :  * The caller retains ownership of the arguments. */
    6071                 :            : void
    6072                 :          0 : vteprec_arp_sources_remote_remove_clause_src_mac(struct ovsdb_idl *idl, enum ovsdb_function function, const char *src_mac)
    6073                 :            : {
    6074                 :            :     struct ovsdb_datum datum;
    6075                 :            :     union ovsdb_atom key;
    6076                 :            : 
    6077         [ #  # ]:          0 :     ovs_assert(inited);
    6078                 :          0 :     datum.n = 1;
    6079                 :          0 :     datum.keys = &key;
    6080                 :          0 :     key.string = CONST_CAST(char *, src_mac);
    6081                 :          0 :     datum.values = NULL;
    6082                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE],
    6083                 :            :                           function,
    6084                 :            :                           &vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_COL_SRC_MAC],
    6085                 :            :                           &datum);
    6086                 :          0 : }
    6087                 :            : void
    6088                 :          0 : vteprec_arp_sources_remote_remove_clause_false(struct ovsdb_idl *idl)
    6089                 :            : {
    6090                 :            :     struct ovsdb_datum datum;
    6091                 :            : 
    6092                 :          0 :     ovsdb_datum_init_empty(&datum);
    6093                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], OVSDB_F_FALSE, NULL, &datum);
    6094                 :          0 : }
    6095                 :            : void
    6096                 :          0 : vteprec_arp_sources_remote_remove_clause_true(struct ovsdb_idl *idl)
    6097                 :            : {
    6098                 :            :     struct ovsdb_datum datum;
    6099                 :            : 
    6100                 :          0 :     ovsdb_datum_init_empty(&datum);
    6101                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_ARP_SOURCES_REMOTE], OVSDB_F_TRUE, NULL, &datum);
    6102                 :          0 : }
    6103                 :            : 
    6104                 :            : struct ovsdb_idl_column vteprec_arp_sources_remote_columns[VTEPREC_ARP_SOURCES_REMOTE_N_COLUMNS];
    6105                 :            : 
    6106                 :            : static void
    6107                 :        741 : vteprec_arp_sources_remote_columns_init(void)
    6108                 :            : {
    6109                 :            :     struct ovsdb_idl_column *c;
    6110                 :            : 
    6111                 :            :     /* Initialize vteprec_arp_sources_remote_col_locator. */
    6112                 :        741 :     c = &vteprec_arp_sources_remote_col_locator;
    6113                 :        741 :     c->name = "locator";
    6114                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
    6115                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
    6116                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
    6117                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    6118                 :        741 :     c->type.n_min = 1;
    6119                 :        741 :     c->type.n_max = 1;
    6120                 :        741 :     c->mutable = true;
    6121                 :        741 :     c->parse = vteprec_arp_sources_remote_parse_locator;
    6122                 :        741 :     c->unparse = vteprec_arp_sources_remote_unparse_locator;
    6123                 :            : 
    6124                 :            :     /* Initialize vteprec_arp_sources_remote_col_src_mac. */
    6125                 :        741 :     c = &vteprec_arp_sources_remote_col_src_mac;
    6126                 :        741 :     c->name = "src_mac";
    6127                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    6128                 :        741 :     c->type.key.u.string.minLen = 0;
    6129                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    6130                 :        741 :     c->type.n_min = 1;
    6131                 :        741 :     c->type.n_max = 1;
    6132                 :        741 :     c->mutable = true;
    6133                 :        741 :     c->parse = vteprec_arp_sources_remote_parse_src_mac;
    6134                 :        741 :     c->unparse = vteprec_arp_sources_remote_unparse_src_mac;
    6135                 :        741 : }
    6136                 :            : 
    6137                 :            : /* Global table. */
    6138                 :            : 
    6139                 :            : static void
    6140                 :       1157 : vteprec_global_parse_managers(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6141                 :            : {
    6142                 :       1157 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6143                 :            :     size_t i;
    6144                 :            : 
    6145         [ -  + ]:       1157 :     ovs_assert(inited);
    6146                 :       1157 :     row->managers = NULL;
    6147                 :       1157 :     row->n_managers = 0;
    6148         [ +  + ]:       1163 :     for (i = 0; i < datum->n; i++) {
    6149                 :          6 :         struct vteprec_manager *keyRow = vteprec_manager_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], &datum->keys[i].uuid));
    6150         [ +  - ]:          6 :         if (keyRow) {
    6151         [ +  + ]:          6 :             if (!row->n_managers) {
    6152                 :          5 :                 row->managers = xmalloc(datum->n * sizeof *row->managers);
    6153                 :            :             }
    6154                 :          6 :             row->managers[row->n_managers] = keyRow;
    6155                 :          6 :             row->n_managers++;
    6156                 :            :         }
    6157                 :            :     }
    6158                 :       1157 : }
    6159                 :            : 
    6160                 :            : static void
    6161                 :       1149 : vteprec_global_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6162                 :            : {
    6163                 :       1149 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6164                 :            :     size_t i;
    6165                 :            : 
    6166         [ -  + ]:       1149 :     ovs_assert(inited);
    6167                 :       1149 :     smap_init(&row->other_config);
    6168         [ -  + ]:       1149 :     for (i = 0; i < datum->n; i++) {
    6169                 :          0 :         smap_add(&row->other_config,
    6170                 :          0 :                  datum->keys[i].string,
    6171                 :          0 :                  datum->values[i].string);
    6172                 :            :     }
    6173                 :       1149 : }
    6174                 :            : 
    6175                 :            : static void
    6176                 :       1184 : vteprec_global_parse_switches(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6177                 :            : {
    6178                 :       1184 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6179                 :            :     size_t i;
    6180                 :            : 
    6181         [ -  + ]:       1184 :     ovs_assert(inited);
    6182                 :       1184 :     row->switches = NULL;
    6183                 :       1184 :     row->n_switches = 0;
    6184         [ +  + ]:       2125 :     for (i = 0; i < datum->n; i++) {
    6185                 :        941 :         struct vteprec_physical_switch *keyRow = vteprec_physical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], &datum->keys[i].uuid));
    6186         [ +  + ]:        941 :         if (keyRow) {
    6187         [ +  + ]:        520 :             if (!row->n_switches) {
    6188                 :        432 :                 row->switches = xmalloc(datum->n * sizeof *row->switches);
    6189                 :            :             }
    6190                 :        520 :             row->switches[row->n_switches] = keyRow;
    6191                 :        520 :             row->n_switches++;
    6192                 :            :         }
    6193                 :            :     }
    6194                 :       1184 : }
    6195                 :            : 
    6196                 :            : static void
    6197                 :       1164 : vteprec_global_unparse_managers(struct ovsdb_idl_row *row_)
    6198                 :            : {
    6199                 :       1164 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6200                 :            : 
    6201         [ -  + ]:       1164 :     ovs_assert(inited);
    6202                 :       1164 :     free(row->managers);
    6203                 :       1164 : }
    6204                 :            : 
    6205                 :            : static void
    6206                 :       1156 : vteprec_global_unparse_other_config(struct ovsdb_idl_row *row_)
    6207                 :            : {
    6208                 :       1156 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6209                 :            : 
    6210         [ -  + ]:       1156 :     ovs_assert(inited);
    6211                 :       1156 :     smap_destroy(&row->other_config);
    6212                 :       1156 : }
    6213                 :            : 
    6214                 :            : static void
    6215                 :       1191 : vteprec_global_unparse_switches(struct ovsdb_idl_row *row_)
    6216                 :            : {
    6217                 :       1191 :     struct vteprec_global *row = vteprec_global_cast(row_);
    6218                 :            : 
    6219         [ -  + ]:       1191 :     ovs_assert(inited);
    6220                 :       1191 :     free(row->switches);
    6221                 :       1191 : }
    6222                 :            : 
    6223                 :            : static void
    6224                 :        748 : vteprec_global_init__(struct ovsdb_idl_row *row)
    6225                 :            : {
    6226                 :        748 :     vteprec_global_init(vteprec_global_cast(row));
    6227                 :        748 : }
    6228                 :            : 
    6229                 :            : /* Clears the contents of 'row' in table "Global". */
    6230                 :            : void
    6231                 :        748 : vteprec_global_init(struct vteprec_global *row)
    6232                 :            : {
    6233                 :        748 :     memset(row, 0, sizeof *row); 
    6234                 :        748 :     smap_init(&row->other_config);
    6235                 :        748 : }
    6236                 :            : 
    6237                 :            : /* Searches table "Global" in 'idl' for a row with UUID 'uuid'.  Returns
    6238                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    6239                 :            : const struct vteprec_global *
    6240                 :          0 : vteprec_global_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    6241                 :            : {
    6242                 :          0 :     return vteprec_global_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], uuid));
    6243                 :            : }
    6244                 :            : 
    6245                 :            : /* Returns a row in table "Global" in 'idl', or a null pointer if that
    6246                 :            :  * table is empty.
    6247                 :            :  *
    6248                 :            :  * Database tables are internally maintained as hash tables, so adding or
    6249                 :            :  * removing rows while traversing the same table can cause some rows to be
    6250                 :            :  * visited twice or not at apply. */
    6251                 :            : const struct vteprec_global *
    6252                 :        734 : vteprec_global_first(const struct ovsdb_idl *idl)
    6253                 :            : {
    6254                 :        734 :     return vteprec_global_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL]));
    6255                 :            : }
    6256                 :            : 
    6257                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    6258                 :            :  * is the last row in its table. */
    6259                 :            : const struct vteprec_global *
    6260                 :          0 : vteprec_global_next(const struct vteprec_global *row)
    6261                 :            : {
    6262                 :          0 :     return vteprec_global_cast(ovsdb_idl_next_row(&row->header_));
    6263                 :            : }
    6264                 :            : 
    6265                 :          0 : unsigned int vteprec_global_get_seqno(const struct ovsdb_idl *idl)
    6266                 :            : {
    6267                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL]);
    6268                 :            : }
    6269                 :            : 
    6270                 :          0 : unsigned int vteprec_global_row_get_seqno(const struct vteprec_global *row, enum ovsdb_idl_change change)
    6271                 :            : {
    6272                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    6273                 :            : }
    6274                 :            : 
    6275                 :            : const struct vteprec_global *
    6276                 :          0 : vteprec_global_track_get_first(const struct ovsdb_idl *idl)
    6277                 :            : {
    6278                 :          0 :     return vteprec_global_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL]));
    6279                 :            : }
    6280                 :            : 
    6281                 :            : const struct vteprec_global
    6282                 :          0 : *vteprec_global_track_get_next(const struct vteprec_global *row)
    6283                 :            : {
    6284                 :          0 :     return vteprec_global_cast(ovsdb_idl_track_get_next(&row->header_));
    6285                 :            : }
    6286                 :            : 
    6287                 :            : 
    6288                 :            : /* Deletes 'row' from table "Global".  'row' may be freed, so it must not be
    6289                 :            :  * accessed afterward.
    6290                 :            :  *
    6291                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    6292                 :            : void
    6293                 :          0 : vteprec_global_delete(const struct vteprec_global *row)
    6294                 :            : {
    6295                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    6296                 :          0 : }
    6297                 :            : 
    6298                 :            : /* Inserts and returns a new row in the table "Global" in the database
    6299                 :            :  * with open transaction 'txn'.
    6300                 :            :  *
    6301                 :            :  * The new row is assigned a randomly generated provisional UUID.
    6302                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    6303                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    6304                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    6305                 :            : struct vteprec_global *
    6306                 :          7 : vteprec_global_insert(struct ovsdb_idl_txn *txn)
    6307                 :            : {
    6308                 :          7 :     return vteprec_global_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], NULL));
    6309                 :            : }
    6310                 :            : 
    6311                 :            : bool
    6312                 :          0 : vteprec_global_is_updated(const struct vteprec_global *row, enum vteprec_global_column_id column)
    6313                 :            : {
    6314                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_global_columns[column]);
    6315                 :            : }
    6316                 :            : 
    6317                 :            : /* Causes the original contents of column "managers" in 'row' to be
    6318                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    6319                 :            :  * "managers" in 'row' changed (or if 'row' was deleted) between the
    6320                 :            :  * time that the IDL originally read its contents and the time that the
    6321                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    6322                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    6323                 :            :  * change has already been received).
    6324                 :            :  *
    6325                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    6326                 :            :  * reads, an application should call this function any time "managers" is
    6327                 :            :  * read as part of a read-modify-write operation.
    6328                 :            :  *
    6329                 :            :  * In some cases this function reduces to a no-op, because the current value
    6330                 :            :  * of "managers" is already known:
    6331                 :            :  *
    6332                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    6333                 :            :  *     vteprec_global_insert()).
    6334                 :            :  *
    6335                 :            :  *   - If "managers" has already been modified (with
    6336                 :            :  *     vteprec_global_set_managers()) within the current transaction.
    6337                 :            :  *
    6338                 :            :  * Because of the latter property, always call this function *before*
    6339                 :            :  * vteprec_global_set_managers() for a given read-modify-write.
    6340                 :            :  *
    6341                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    6342                 :            : void
    6343                 :          9 : vteprec_global_verify_managers(const struct vteprec_global *row)
    6344                 :            : {
    6345         [ -  + ]:          9 :     ovs_assert(inited);
    6346                 :          9 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS]);
    6347                 :          9 : }
    6348                 :            : 
    6349                 :            : /* Causes the original contents of column "other_config" in 'row' to be
    6350                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    6351                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
    6352                 :            :  * time that the IDL originally read its contents and the time that the
    6353                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    6354                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    6355                 :            :  * change has already been received).
    6356                 :            :  *
    6357                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    6358                 :            :  * reads, an application should call this function any time "other_config" is
    6359                 :            :  * read as part of a read-modify-write operation.
    6360                 :            :  *
    6361                 :            :  * In some cases this function reduces to a no-op, because the current value
    6362                 :            :  * of "other_config" is already known:
    6363                 :            :  *
    6364                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    6365                 :            :  *     vteprec_global_insert()).
    6366                 :            :  *
    6367                 :            :  *   - If "other_config" has already been modified (with
    6368                 :            :  *     vteprec_global_set_other_config()) within the current transaction.
    6369                 :            :  *
    6370                 :            :  * Because of the latter property, always call this function *before*
    6371                 :            :  * vteprec_global_set_other_config() for a given read-modify-write.
    6372                 :            :  *
    6373                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    6374                 :            : void
    6375                 :          0 : vteprec_global_verify_other_config(const struct vteprec_global *row)
    6376                 :            : {
    6377         [ #  # ]:          0 :     ovs_assert(inited);
    6378                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG]);
    6379                 :          0 : }
    6380                 :            : 
    6381                 :            : /* Causes the original contents of column "switches" in 'row' to be
    6382                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    6383                 :            :  * "switches" in 'row' changed (or if 'row' was deleted) between the
    6384                 :            :  * time that the IDL originally read its contents and the time that the
    6385                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    6386                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    6387                 :            :  * change has already been received).
    6388                 :            :  *
    6389                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    6390                 :            :  * reads, an application should call this function any time "switches" is
    6391                 :            :  * read as part of a read-modify-write operation.
    6392                 :            :  *
    6393                 :            :  * In some cases this function reduces to a no-op, because the current value
    6394                 :            :  * of "switches" is already known:
    6395                 :            :  *
    6396                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    6397                 :            :  *     vteprec_global_insert()).
    6398                 :            :  *
    6399                 :            :  *   - If "switches" has already been modified (with
    6400                 :            :  *     vteprec_global_set_switches()) within the current transaction.
    6401                 :            :  *
    6402                 :            :  * Because of the latter property, always call this function *before*
    6403                 :            :  * vteprec_global_set_switches() for a given read-modify-write.
    6404                 :            :  *
    6405                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    6406                 :            : void
    6407                 :        233 : vteprec_global_verify_switches(const struct vteprec_global *row)
    6408                 :            : {
    6409         [ -  + ]:        233 :     ovs_assert(inited);
    6410                 :        233 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES]);
    6411                 :        233 : }
    6412                 :            : 
    6413                 :            : /* Returns the "managers" column's value from the "Global" table in 'row'
    6414                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    6415                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    6416                 :            :  * for a given key than implementing the same operation on the "cooked"
    6417                 :            :  * form in 'row'.
    6418                 :            :  *
    6419                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
    6420                 :            :  * (This helps to avoid silent bugs if someone changes managers's
    6421                 :            :  * type without updating the caller.)
    6422                 :            :  *
    6423                 :            :  * The caller must not modify or free the returned value.
    6424                 :            :  *
    6425                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    6426                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    6427                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    6428                 :            :  * of it with ovsdb_datum_clone().
    6429                 :            :  *
    6430                 :            :  * This function is rarely useful, since it is easier to access the value
    6431                 :            :  * directly through the "managers" member in vteprec_global. */
    6432                 :            : const struct ovsdb_datum *
    6433                 :          0 : vteprec_global_get_managers(const struct vteprec_global *row,
    6434                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    6435                 :            : {
    6436         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
    6437                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_global_col_managers);
    6438                 :            : }
    6439                 :            : 
    6440                 :            : /* Returns the "other_config" column's value from the "Global" table in 'row'
    6441                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    6442                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    6443                 :            :  * for a given key than implementing the same operation on the "cooked"
    6444                 :            :  * form in 'row'.
    6445                 :            :  *
    6446                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    6447                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
    6448                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
    6449                 :            :  * type without updating the caller.)
    6450                 :            :  *
    6451                 :            :  * The caller must not modify or free the returned value.
    6452                 :            :  *
    6453                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    6454                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    6455                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    6456                 :            :  * of it with ovsdb_datum_clone().
    6457                 :            :  *
    6458                 :            :  * This function is rarely useful, since it is easier to access the value
    6459                 :            :  * directly through the "other_config" member in vteprec_global. */
    6460                 :            : const struct ovsdb_datum *
    6461                 :          0 : vteprec_global_get_other_config(const struct vteprec_global *row,
    6462                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    6463                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    6464                 :            : {
    6465         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    6466         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
    6467                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_global_col_other_config);
    6468                 :            : }
    6469                 :            : 
    6470                 :            : /* Returns the "switches" column's value from the "Global" table in 'row'
    6471                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    6472                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    6473                 :            :  * for a given key than implementing the same operation on the "cooked"
    6474                 :            :  * form in 'row'.
    6475                 :            :  *
    6476                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
    6477                 :            :  * (This helps to avoid silent bugs if someone changes switches's
    6478                 :            :  * type without updating the caller.)
    6479                 :            :  *
    6480                 :            :  * The caller must not modify or free the returned value.
    6481                 :            :  *
    6482                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    6483                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    6484                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    6485                 :            :  * of it with ovsdb_datum_clone().
    6486                 :            :  *
    6487                 :            :  * This function is rarely useful, since it is easier to access the value
    6488                 :            :  * directly through the "switches" member in vteprec_global. */
    6489                 :            : const struct ovsdb_datum *
    6490                 :          0 : vteprec_global_get_switches(const struct vteprec_global *row,
    6491                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    6492                 :            : {
    6493         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
    6494                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_global_col_switches);
    6495                 :            : }
    6496                 :            : 
    6497                 :            : /* Sets the "managers" column from the "Global" table in 'row' to
    6498                 :            :  * the 'managers' set with 'n_managers' entries.
    6499                 :            :  *
    6500                 :            :  * The caller retains ownership of the arguments. */
    6501                 :            : void
    6502                 :          8 : vteprec_global_set_managers(const struct vteprec_global *row, struct vteprec_manager **managers, size_t n_managers)
    6503                 :            : {
    6504                 :            :     struct ovsdb_datum datum;
    6505                 :            :     size_t i;
    6506                 :            : 
    6507         [ -  + ]:          8 :     ovs_assert(inited);
    6508                 :          8 :     datum.n = n_managers;
    6509         [ +  + ]:          8 :     datum.keys = n_managers ? xmalloc(n_managers * sizeof *datum.keys) : NULL;
    6510                 :          8 :     datum.values = NULL;
    6511         [ +  + ]:         12 :     for (i = 0; i < n_managers; i++) {
    6512                 :          4 :         datum.keys[i].uuid = managers[i]->header_.uuid;
    6513                 :            :     }
    6514                 :          8 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6515                 :          8 :     ovsdb_idl_txn_write(&row->header_, &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS], &datum);
    6516                 :          8 : }
    6517                 :            : 
    6518                 :            : /* Sets the "other_config" column's value from the "Global" table in 'row'
    6519                 :            :  * to 'other_config'.
    6520                 :            :  *
    6521                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    6522                 :            : void
    6523                 :          0 : vteprec_global_set_other_config(const struct vteprec_global *row, const struct smap *other_config)
    6524                 :            : {
    6525                 :            :     struct ovsdb_datum datum;
    6526                 :            : 
    6527         [ #  # ]:          0 :     ovs_assert(inited);
    6528         [ #  # ]:          0 :     if (other_config) {
    6529                 :            :         struct smap_node *node;
    6530                 :            :         size_t i;
    6531                 :            : 
    6532                 :          0 :         datum.n = smap_count(other_config);
    6533                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    6534                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    6535                 :            : 
    6536                 :          0 :         i = 0;
    6537 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    6538                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    6539                 :          0 :             datum.values[i].string = xstrdup(node->value);
    6540                 :          0 :             i++;
    6541                 :            :         }
    6542                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    6543                 :            :     } else {
    6544                 :          0 :         ovsdb_datum_init_empty(&datum);
    6545                 :            :     }
    6546                 :          0 :     ovsdb_idl_txn_write(&row->header_,
    6547                 :            :                         &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG],
    6548                 :            :                         &datum);
    6549                 :          0 : }
    6550                 :            : 
    6551                 :            : 
    6552                 :            : /* Sets the "switches" column from the "Global" table in 'row' to
    6553                 :            :  * the 'switches' set with 'n_switches' entries.
    6554                 :            :  *
    6555                 :            :  * The caller retains ownership of the arguments. */
    6556                 :            : void
    6557                 :         35 : vteprec_global_set_switches(const struct vteprec_global *row, struct vteprec_physical_switch **switches, size_t n_switches)
    6558                 :            : {
    6559                 :            :     struct ovsdb_datum datum;
    6560                 :            :     size_t i;
    6561                 :            : 
    6562         [ -  + ]:         35 :     ovs_assert(inited);
    6563                 :         35 :     datum.n = n_switches;
    6564         [ +  + ]:         35 :     datum.keys = n_switches ? xmalloc(n_switches * sizeof *datum.keys) : NULL;
    6565                 :         35 :     datum.values = NULL;
    6566         [ +  + ]:         77 :     for (i = 0; i < n_switches; i++) {
    6567                 :         42 :         datum.keys[i].uuid = switches[i]->header_.uuid;
    6568                 :            :     }
    6569                 :         35 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6570                 :         35 :     ovsdb_idl_txn_write(&row->header_, &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES], &datum);
    6571                 :         35 : }
    6572                 :            : 
    6573                 :            : /* Adds the value 'new_value' to the "managers" set column from the "Global" table
    6574                 :            :  * in 'row'.
    6575                 :            :  *
    6576                 :            :  */
    6577                 :            : void
    6578                 :          0 : vteprec_global_update_managers_addvalue(const struct vteprec_global *row, const struct vteprec_manager *new_value)
    6579                 :            : {
    6580                 :            :     struct ovsdb_datum *datum;
    6581                 :            : 
    6582         [ #  # ]:          0 :     ovs_assert(inited);
    6583                 :            : 
    6584                 :          0 :     datum = xmalloc(sizeof *datum);
    6585                 :          0 :     datum->n = 1;
    6586                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    6587                 :          0 :     datum->values = NULL;
    6588                 :            : 
    6589                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
    6590                 :            : 
    6591                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    6592                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS],
    6593                 :            :                                     datum);
    6594                 :          0 : }
    6595                 :            : 
    6596                 :            : /* Deletes the value 'delete_value' from the "managers" set column from the
    6597                 :            :  * "Global" table in 'row'.
    6598                 :            :  *
    6599                 :            :  */
    6600                 :            : void
    6601                 :          0 : vteprec_global_update_managers_delvalue(const struct vteprec_global *row, const struct vteprec_manager *delete_value)
    6602                 :            : {
    6603                 :            :     struct ovsdb_datum *datum;
    6604                 :            : 
    6605         [ #  # ]:          0 :     ovs_assert(inited);
    6606                 :            : 
    6607                 :          0 :     datum = xmalloc(sizeof *datum);
    6608                 :          0 :     datum->n = 1;
    6609                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    6610                 :          0 :     datum->values = NULL;
    6611                 :            : 
    6612                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
    6613                 :            : 
    6614                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    6615                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS],
    6616                 :            :                                     datum);
    6617                 :          0 : }
    6618                 :            : 
    6619                 :            : /* Sets an element of the "other_config" map column from the "Global" table in 'row'
    6620                 :            :  * to 'new_value' given the key value 'new_key'.
    6621                 :            :  *
    6622                 :            :  */
    6623                 :            : void
    6624                 :          0 : vteprec_global_update_other_config_setkey(const struct vteprec_global *row, const char *new_key, const char *new_value)
    6625                 :            : {
    6626                 :            :     struct ovsdb_datum *datum;
    6627                 :            : 
    6628         [ #  # ]:          0 :     ovs_assert(inited);
    6629                 :            : 
    6630                 :          0 :     datum = xmalloc(sizeof *datum);
    6631                 :          0 :     datum->n = 1;
    6632                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    6633                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    6634                 :            : 
    6635                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    6636                 :          0 :     datum->values[0].string = xstrdup(new_value);
    6637                 :            : 
    6638                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    6639                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG],
    6640                 :            :                                     datum);
    6641                 :          0 : }
    6642                 :            : 
    6643                 :            : /* Deletes an element of the "other_config" map column from the "Global" table in 'row'
    6644                 :            :  * given the key value 'delete_key'.
    6645                 :            :  *
    6646                 :            :  */
    6647                 :            : void
    6648                 :          0 : vteprec_global_update_other_config_delkey(const struct vteprec_global *row, const char *delete_key)
    6649                 :            : {
    6650                 :            :     struct ovsdb_datum *datum;
    6651                 :            : 
    6652         [ #  # ]:          0 :     ovs_assert(inited);
    6653                 :            : 
    6654                 :          0 :     datum = xmalloc(sizeof *datum);
    6655                 :          0 :     datum->n = 1;
    6656                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    6657                 :          0 :     datum->values = NULL;
    6658                 :            : 
    6659                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
    6660                 :            : 
    6661                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
    6662                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG],
    6663                 :            :                                     datum);
    6664                 :          0 : }
    6665                 :            : 
    6666                 :            : /* Adds the value 'new_value' to the "switches" set column from the "Global" table
    6667                 :            :  * in 'row'.
    6668                 :            :  *
    6669                 :            :  */
    6670                 :            : void
    6671                 :          0 : vteprec_global_update_switches_addvalue(const struct vteprec_global *row, const struct vteprec_physical_switch *new_value)
    6672                 :            : {
    6673                 :            :     struct ovsdb_datum *datum;
    6674                 :            : 
    6675         [ #  # ]:          0 :     ovs_assert(inited);
    6676                 :            : 
    6677                 :          0 :     datum = xmalloc(sizeof *datum);
    6678                 :          0 :     datum->n = 1;
    6679                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    6680                 :          0 :     datum->values = NULL;
    6681                 :            : 
    6682                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
    6683                 :            : 
    6684                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    6685                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES],
    6686                 :            :                                     datum);
    6687                 :          0 : }
    6688                 :            : 
    6689                 :            : /* Deletes the value 'delete_value' from the "switches" set column from the
    6690                 :            :  * "Global" table in 'row'.
    6691                 :            :  *
    6692                 :            :  */
    6693                 :            : void
    6694                 :          0 : vteprec_global_update_switches_delvalue(const struct vteprec_global *row, const struct vteprec_physical_switch *delete_value)
    6695                 :            : {
    6696                 :            :     struct ovsdb_datum *datum;
    6697                 :            : 
    6698         [ #  # ]:          0 :     ovs_assert(inited);
    6699                 :            : 
    6700                 :          0 :     datum = xmalloc(sizeof *datum);
    6701                 :          0 :     datum->n = 1;
    6702                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    6703                 :          0 :     datum->values = NULL;
    6704                 :            : 
    6705                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
    6706                 :            : 
    6707                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    6708                 :            :                                     &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES],
    6709                 :            :                                     datum);
    6710                 :          0 : }
    6711                 :            : 
    6712                 :            : /* Sets the "managers" column from the "Global" table in 'row' to
    6713                 :            :  * the 'managers' set with 'n_managers' entries.
    6714                 :            :  *
    6715                 :            :  * The caller retains ownership of the arguments. */
    6716                 :            : void
    6717                 :          0 : vteprec_global_add_clause_managers(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **managers, size_t n_managers)
    6718                 :            : {
    6719                 :            :     struct ovsdb_datum datum;
    6720                 :            :     size_t i;
    6721                 :            : 
    6722         [ #  # ]:          0 :     ovs_assert(inited);
    6723                 :          0 :     datum.n = n_managers;
    6724         [ #  # ]:          0 :     datum.keys = n_managers ? xmalloc(n_managers * sizeof *datum.keys) : NULL;
    6725                 :          0 :     datum.values = NULL;
    6726         [ #  # ]:          0 :     for (i = 0; i < n_managers; i++) {
    6727                 :          0 :         datum.keys[i].uuid = *managers[i];
    6728                 :            :     }
    6729                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6730                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6731                 :            :                           function,
    6732                 :            :                           &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS],
    6733                 :            :                           &datum);
    6734                 :          0 :     free(datum.keys);
    6735                 :          0 : }
    6736                 :            : 
    6737                 :            : /* Sets the "other_config" column's value from the "Global" table in 'row'
    6738                 :            :  * to 'other_config'.
    6739                 :            :  *
    6740                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    6741                 :            : void
    6742                 :          0 : vteprec_global_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
    6743                 :            : {
    6744                 :            :     struct ovsdb_datum datum;
    6745                 :            : 
    6746         [ #  # ]:          0 :     ovs_assert(inited);
    6747         [ #  # ]:          0 :     if (other_config) {
    6748                 :            :         struct smap_node *node;
    6749                 :            :         size_t i;
    6750                 :            : 
    6751                 :          0 :         datum.n = smap_count(other_config);
    6752                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    6753                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    6754                 :            : 
    6755                 :          0 :         i = 0;
    6756 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    6757                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    6758                 :          0 :             datum.values[i].string = xstrdup(node->value);
    6759                 :          0 :             i++;
    6760                 :            :         }
    6761                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    6762                 :            :     } else {
    6763                 :          0 :         ovsdb_datum_init_empty(&datum);
    6764                 :            :     }
    6765                 :            : 
    6766                 :          0 :     ovsdb_idl_condition_add_clause(idl,
    6767                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6768                 :            :                                    function,
    6769                 :            :                                    &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG],
    6770                 :            :                                    &datum);
    6771                 :            : 
    6772                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_global_col_other_config.type);
    6773                 :          0 : }
    6774                 :            : 
    6775                 :            : 
    6776                 :            : /* Sets the "switches" column from the "Global" table in 'row' to
    6777                 :            :  * the 'switches' set with 'n_switches' entries.
    6778                 :            :  *
    6779                 :            :  * The caller retains ownership of the arguments. */
    6780                 :            : void
    6781                 :          0 : vteprec_global_add_clause_switches(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **switches, size_t n_switches)
    6782                 :            : {
    6783                 :            :     struct ovsdb_datum datum;
    6784                 :            :     size_t i;
    6785                 :            : 
    6786         [ #  # ]:          0 :     ovs_assert(inited);
    6787                 :          0 :     datum.n = n_switches;
    6788         [ #  # ]:          0 :     datum.keys = n_switches ? xmalloc(n_switches * sizeof *datum.keys) : NULL;
    6789                 :          0 :     datum.values = NULL;
    6790         [ #  # ]:          0 :     for (i = 0; i < n_switches; i++) {
    6791                 :          0 :         datum.keys[i].uuid = *switches[i];
    6792                 :            :     }
    6793                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6794                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6795                 :            :                           function,
    6796                 :            :                           &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES],
    6797                 :            :                           &datum);
    6798                 :          0 :     free(datum.keys);
    6799                 :          0 : }
    6800                 :            : void
    6801                 :          0 : vteprec_global_add_clause_false(struct ovsdb_idl *idl)
    6802                 :            : {
    6803                 :            :     struct ovsdb_datum datum;
    6804                 :            : 
    6805                 :          0 :     ovsdb_datum_init_empty(&datum);
    6806                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], OVSDB_F_FALSE, NULL, &datum);
    6807                 :          0 : }
    6808                 :            : void
    6809                 :          0 : vteprec_global_add_clause_true(struct ovsdb_idl *idl)
    6810                 :            : {
    6811                 :            :     struct ovsdb_datum datum;
    6812                 :            : 
    6813                 :          0 :     ovsdb_datum_init_empty(&datum);
    6814                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], OVSDB_F_TRUE, NULL, &datum);
    6815                 :          0 : }
    6816                 :            : 
    6817                 :            : /* Sets the "managers" column from the "Global" table in 'row' to
    6818                 :            :  * the 'managers' set with 'n_managers' entries.
    6819                 :            :  *
    6820                 :            :  * The caller retains ownership of the arguments. */
    6821                 :            : void
    6822                 :          0 : vteprec_global_remove_clause_managers(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **managers, size_t n_managers)
    6823                 :            : {
    6824                 :            :     struct ovsdb_datum datum;
    6825                 :            :     size_t i;
    6826                 :            : 
    6827         [ #  # ]:          0 :     ovs_assert(inited);
    6828                 :          0 :     datum.n = n_managers;
    6829         [ #  # ]:          0 :     datum.keys = n_managers ? xmalloc(n_managers * sizeof *datum.keys) : NULL;
    6830                 :          0 :     datum.values = NULL;
    6831         [ #  # ]:          0 :     for (i = 0; i < n_managers; i++) {
    6832                 :          0 :         datum.keys[i].uuid = *managers[i];
    6833                 :            :     }
    6834                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6835                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6836                 :            :                           function,
    6837                 :            :                           &vteprec_global_columns[VTEPREC_GLOBAL_COL_MANAGERS],
    6838                 :            :                           &datum);
    6839                 :          0 :     free(datum.keys);
    6840                 :          0 : }
    6841                 :            : 
    6842                 :            : /* Sets the "other_config" column's value from the "Global" table in 'row'
    6843                 :            :  * to 'other_config'.
    6844                 :            :  *
    6845                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    6846                 :            : void
    6847                 :          0 : vteprec_global_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
    6848                 :            : {
    6849                 :            :     struct ovsdb_datum datum;
    6850                 :            : 
    6851         [ #  # ]:          0 :     ovs_assert(inited);
    6852         [ #  # ]:          0 :     if (other_config) {
    6853                 :            :         struct smap_node *node;
    6854                 :            :         size_t i;
    6855                 :            : 
    6856                 :          0 :         datum.n = smap_count(other_config);
    6857                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    6858                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    6859                 :            : 
    6860                 :          0 :         i = 0;
    6861 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    6862                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    6863                 :          0 :             datum.values[i].string = xstrdup(node->value);
    6864                 :          0 :             i++;
    6865                 :            :         }
    6866                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    6867                 :            :     } else {
    6868                 :          0 :         ovsdb_datum_init_empty(&datum);
    6869                 :            :     }
    6870                 :            : 
    6871                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6872                 :            :                                       function,
    6873                 :            :                                       &vteprec_global_columns[VTEPREC_GLOBAL_COL_OTHER_CONFIG],
    6874                 :            :                                       &datum);
    6875                 :            : 
    6876                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_global_col_other_config.type);
    6877                 :          0 : }
    6878                 :            : 
    6879                 :            : 
    6880                 :            : /* Sets the "switches" column from the "Global" table in 'row' to
    6881                 :            :  * the 'switches' set with 'n_switches' entries.
    6882                 :            :  *
    6883                 :            :  * The caller retains ownership of the arguments. */
    6884                 :            : void
    6885                 :          0 : vteprec_global_remove_clause_switches(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **switches, size_t n_switches)
    6886                 :            : {
    6887                 :            :     struct ovsdb_datum datum;
    6888                 :            :     size_t i;
    6889                 :            : 
    6890         [ #  # ]:          0 :     ovs_assert(inited);
    6891                 :          0 :     datum.n = n_switches;
    6892         [ #  # ]:          0 :     datum.keys = n_switches ? xmalloc(n_switches * sizeof *datum.keys) : NULL;
    6893                 :          0 :     datum.values = NULL;
    6894         [ #  # ]:          0 :     for (i = 0; i < n_switches; i++) {
    6895                 :          0 :         datum.keys[i].uuid = *switches[i];
    6896                 :            :     }
    6897                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
    6898                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL],
    6899                 :            :                           function,
    6900                 :            :                           &vteprec_global_columns[VTEPREC_GLOBAL_COL_SWITCHES],
    6901                 :            :                           &datum);
    6902                 :          0 :     free(datum.keys);
    6903                 :          0 : }
    6904                 :            : void
    6905                 :          0 : vteprec_global_remove_clause_false(struct ovsdb_idl *idl)
    6906                 :            : {
    6907                 :            :     struct ovsdb_datum datum;
    6908                 :            : 
    6909                 :          0 :     ovsdb_datum_init_empty(&datum);
    6910                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], OVSDB_F_FALSE, NULL, &datum);
    6911                 :          0 : }
    6912                 :            : void
    6913                 :          0 : vteprec_global_remove_clause_true(struct ovsdb_idl *idl)
    6914                 :            : {
    6915                 :            :     struct ovsdb_datum datum;
    6916                 :            : 
    6917                 :          0 :     ovsdb_datum_init_empty(&datum);
    6918                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_GLOBAL], OVSDB_F_TRUE, NULL, &datum);
    6919                 :          0 : }
    6920                 :            : 
    6921                 :            : struct ovsdb_idl_column vteprec_global_columns[VTEPREC_GLOBAL_N_COLUMNS];
    6922                 :            : 
    6923                 :            : static void
    6924                 :        741 : vteprec_global_columns_init(void)
    6925                 :            : {
    6926                 :            :     struct ovsdb_idl_column *c;
    6927                 :            : 
    6928                 :            :     /* Initialize vteprec_global_col_managers. */
    6929                 :        741 :     c = &vteprec_global_col_managers;
    6930                 :        741 :     c->name = "managers";
    6931                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
    6932                 :        741 :     c->type.key.u.uuid.refTableName = "Manager";
    6933                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
    6934                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    6935                 :        741 :     c->type.n_min = 0;
    6936                 :        741 :     c->type.n_max = UINT_MAX;
    6937                 :        741 :     c->mutable = true;
    6938                 :        741 :     c->parse = vteprec_global_parse_managers;
    6939                 :        741 :     c->unparse = vteprec_global_unparse_managers;
    6940                 :            : 
    6941                 :            :     /* Initialize vteprec_global_col_other_config. */
    6942                 :        741 :     c = &vteprec_global_col_other_config;
    6943                 :        741 :     c->name = "other_config";
    6944                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    6945                 :        741 :     c->type.key.u.string.minLen = 0;
    6946                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
    6947                 :        741 :     c->type.value.u.string.minLen = 0;
    6948                 :        741 :     c->type.n_min = 0;
    6949                 :        741 :     c->type.n_max = UINT_MAX;
    6950                 :        741 :     c->mutable = true;
    6951                 :        741 :     c->parse = vteprec_global_parse_other_config;
    6952                 :        741 :     c->unparse = vteprec_global_unparse_other_config;
    6953                 :            : 
    6954                 :            :     /* Initialize vteprec_global_col_switches. */
    6955                 :        741 :     c = &vteprec_global_col_switches;
    6956                 :        741 :     c->name = "switches";
    6957                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
    6958                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Switch";
    6959                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
    6960                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    6961                 :        741 :     c->type.n_min = 0;
    6962                 :        741 :     c->type.n_max = UINT_MAX;
    6963                 :        741 :     c->mutable = true;
    6964                 :        741 :     c->parse = vteprec_global_parse_switches;
    6965                 :        741 :     c->unparse = vteprec_global_unparse_switches;
    6966                 :        741 : }
    6967                 :            : 
    6968                 :            : /* Logical_Binding_Stats table. */
    6969                 :            : 
    6970                 :            : static void
    6971                 :        182 : vteprec_logical_binding_stats_parse_bytes_from_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6972                 :            : {
    6973                 :        182 :     struct vteprec_logical_binding_stats *row = vteprec_logical_binding_stats_cast(row_);
    6974                 :            : 
    6975         [ -  + ]:        182 :     ovs_assert(inited);
    6976         [ +  - ]:        182 :     if (datum->n >= 1) {
    6977                 :        182 :         row->bytes_from_local = datum->keys[0].integer;
    6978                 :            :     } else {
    6979                 :          0 :         row->bytes_from_local = 0;
    6980                 :            :     }
    6981                 :        182 : }
    6982                 :            : 
    6983                 :            : static void
    6984                 :        182 : vteprec_logical_binding_stats_parse_bytes_to_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6985                 :            : {
    6986                 :        182 :     struct vteprec_logical_binding_stats *row = vteprec_logical_binding_stats_cast(row_);
    6987                 :            : 
    6988         [ -  + ]:        182 :     ovs_assert(inited);
    6989         [ +  - ]:        182 :     if (datum->n >= 1) {
    6990                 :        182 :         row->bytes_to_local = datum->keys[0].integer;
    6991                 :            :     } else {
    6992                 :          0 :         row->bytes_to_local = 0;
    6993                 :            :     }
    6994                 :        182 : }
    6995                 :            : 
    6996                 :            : static void
    6997                 :        191 : vteprec_logical_binding_stats_parse_packets_from_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    6998                 :            : {
    6999                 :        191 :     struct vteprec_logical_binding_stats *row = vteprec_logical_binding_stats_cast(row_);
    7000                 :            : 
    7001         [ -  + ]:        191 :     ovs_assert(inited);
    7002         [ +  - ]:        191 :     if (datum->n >= 1) {
    7003                 :        191 :         row->packets_from_local = datum->keys[0].integer;
    7004                 :            :     } else {
    7005                 :          0 :         row->packets_from_local = 0;
    7006                 :            :     }
    7007                 :        191 : }
    7008                 :            : 
    7009                 :            : static void
    7010                 :        182 : vteprec_logical_binding_stats_parse_packets_to_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7011                 :            : {
    7012                 :        182 :     struct vteprec_logical_binding_stats *row = vteprec_logical_binding_stats_cast(row_);
    7013                 :            : 
    7014         [ -  + ]:        182 :     ovs_assert(inited);
    7015         [ +  - ]:        182 :     if (datum->n >= 1) {
    7016                 :        182 :         row->packets_to_local = datum->keys[0].integer;
    7017                 :            :     } else {
    7018                 :          0 :         row->packets_to_local = 0;
    7019                 :            :     }
    7020                 :        182 : }
    7021                 :            : 
    7022                 :            : static void
    7023                 :        191 : vteprec_logical_binding_stats_unparse_bytes_from_local(struct ovsdb_idl_row *row OVS_UNUSED)
    7024                 :            : {
    7025                 :            :     /* Nothing to do. */
    7026                 :        191 : }
    7027                 :            : 
    7028                 :            : static void
    7029                 :        191 : vteprec_logical_binding_stats_unparse_bytes_to_local(struct ovsdb_idl_row *row OVS_UNUSED)
    7030                 :            : {
    7031                 :            :     /* Nothing to do. */
    7032                 :        191 : }
    7033                 :            : 
    7034                 :            : static void
    7035                 :        200 : vteprec_logical_binding_stats_unparse_packets_from_local(struct ovsdb_idl_row *row OVS_UNUSED)
    7036                 :            : {
    7037                 :            :     /* Nothing to do. */
    7038                 :        200 : }
    7039                 :            : 
    7040                 :            : static void
    7041                 :        191 : vteprec_logical_binding_stats_unparse_packets_to_local(struct ovsdb_idl_row *row OVS_UNUSED)
    7042                 :            : {
    7043                 :            :     /* Nothing to do. */
    7044                 :        191 : }
    7045                 :            : 
    7046                 :            : static void
    7047                 :        133 : vteprec_logical_binding_stats_init__(struct ovsdb_idl_row *row)
    7048                 :            : {
    7049                 :        133 :     vteprec_logical_binding_stats_init(vteprec_logical_binding_stats_cast(row));
    7050                 :        133 : }
    7051                 :            : 
    7052                 :            : /* Clears the contents of 'row' in table "Logical_Binding_Stats". */
    7053                 :            : void
    7054                 :        133 : vteprec_logical_binding_stats_init(struct vteprec_logical_binding_stats *row)
    7055                 :            : {
    7056                 :        133 :     memset(row, 0, sizeof *row); 
    7057                 :        133 : }
    7058                 :            : 
    7059                 :            : /* Searches table "Logical_Binding_Stats" in 'idl' for a row with UUID 'uuid'.  Returns
    7060                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    7061                 :            : const struct vteprec_logical_binding_stats *
    7062                 :          0 : vteprec_logical_binding_stats_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    7063                 :            : {
    7064                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], uuid));
    7065                 :            : }
    7066                 :            : 
    7067                 :            : /* Returns a row in table "Logical_Binding_Stats" in 'idl', or a null pointer if that
    7068                 :            :  * table is empty.
    7069                 :            :  *
    7070                 :            :  * Database tables are internally maintained as hash tables, so adding or
    7071                 :            :  * removing rows while traversing the same table can cause some rows to be
    7072                 :            :  * visited twice or not at apply. */
    7073                 :            : const struct vteprec_logical_binding_stats *
    7074                 :          0 : vteprec_logical_binding_stats_first(const struct ovsdb_idl *idl)
    7075                 :            : {
    7076                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS]));
    7077                 :            : }
    7078                 :            : 
    7079                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    7080                 :            :  * is the last row in its table. */
    7081                 :            : const struct vteprec_logical_binding_stats *
    7082                 :          0 : vteprec_logical_binding_stats_next(const struct vteprec_logical_binding_stats *row)
    7083                 :            : {
    7084                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_next_row(&row->header_));
    7085                 :            : }
    7086                 :            : 
    7087                 :          0 : unsigned int vteprec_logical_binding_stats_get_seqno(const struct ovsdb_idl *idl)
    7088                 :            : {
    7089                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS]);
    7090                 :            : }
    7091                 :            : 
    7092                 :          0 : unsigned int vteprec_logical_binding_stats_row_get_seqno(const struct vteprec_logical_binding_stats *row, enum ovsdb_idl_change change)
    7093                 :            : {
    7094                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    7095                 :            : }
    7096                 :            : 
    7097                 :            : const struct vteprec_logical_binding_stats *
    7098                 :          0 : vteprec_logical_binding_stats_track_get_first(const struct ovsdb_idl *idl)
    7099                 :            : {
    7100                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS]));
    7101                 :            : }
    7102                 :            : 
    7103                 :            : const struct vteprec_logical_binding_stats
    7104                 :          0 : *vteprec_logical_binding_stats_track_get_next(const struct vteprec_logical_binding_stats *row)
    7105                 :            : {
    7106                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_track_get_next(&row->header_));
    7107                 :            : }
    7108                 :            : 
    7109                 :            : 
    7110                 :            : /* Deletes 'row' from table "Logical_Binding_Stats".  'row' may be freed, so it must not be
    7111                 :            :  * accessed afterward.
    7112                 :            :  *
    7113                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7114                 :            : void
    7115                 :          0 : vteprec_logical_binding_stats_delete(const struct vteprec_logical_binding_stats *row)
    7116                 :            : {
    7117                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    7118                 :          0 : }
    7119                 :            : 
    7120                 :            : /* Inserts and returns a new row in the table "Logical_Binding_Stats" in the database
    7121                 :            :  * with open transaction 'txn'.
    7122                 :            :  *
    7123                 :            :  * The new row is assigned a randomly generated provisional UUID.
    7124                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    7125                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    7126                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    7127                 :            : struct vteprec_logical_binding_stats *
    7128                 :          0 : vteprec_logical_binding_stats_insert(struct ovsdb_idl_txn *txn)
    7129                 :            : {
    7130                 :          0 :     return vteprec_logical_binding_stats_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], NULL));
    7131                 :            : }
    7132                 :            : 
    7133                 :            : bool
    7134                 :          0 : vteprec_logical_binding_stats_is_updated(const struct vteprec_logical_binding_stats *row, enum vteprec_logical_binding_stats_column_id column)
    7135                 :            : {
    7136                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_logical_binding_stats_columns[column]);
    7137                 :            : }
    7138                 :            : 
    7139                 :            : /* Causes the original contents of column "bytes_from_local" in 'row' to be
    7140                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    7141                 :            :  * "bytes_from_local" in 'row' changed (or if 'row' was deleted) between the
    7142                 :            :  * time that the IDL originally read its contents and the time that the
    7143                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    7144                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    7145                 :            :  * change has already been received).
    7146                 :            :  *
    7147                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    7148                 :            :  * reads, an application should call this function any time "bytes_from_local" is
    7149                 :            :  * read as part of a read-modify-write operation.
    7150                 :            :  *
    7151                 :            :  * In some cases this function reduces to a no-op, because the current value
    7152                 :            :  * of "bytes_from_local" is already known:
    7153                 :            :  *
    7154                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    7155                 :            :  *     vteprec_logical_binding_stats_insert()).
    7156                 :            :  *
    7157                 :            :  *   - If "bytes_from_local" has already been modified (with
    7158                 :            :  *     vteprec_logical_binding_stats_set_bytes_from_local()) within the current transaction.
    7159                 :            :  *
    7160                 :            :  * Because of the latter property, always call this function *before*
    7161                 :            :  * vteprec_logical_binding_stats_set_bytes_from_local() for a given read-modify-write.
    7162                 :            :  *
    7163                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7164                 :            : void
    7165                 :          0 : vteprec_logical_binding_stats_verify_bytes_from_local(const struct vteprec_logical_binding_stats *row)
    7166                 :            : {
    7167         [ #  # ]:          0 :     ovs_assert(inited);
    7168                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_FROM_LOCAL]);
    7169                 :          0 : }
    7170                 :            : 
    7171                 :            : /* Causes the original contents of column "bytes_to_local" in 'row' to be
    7172                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    7173                 :            :  * "bytes_to_local" in 'row' changed (or if 'row' was deleted) between the
    7174                 :            :  * time that the IDL originally read its contents and the time that the
    7175                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    7176                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    7177                 :            :  * change has already been received).
    7178                 :            :  *
    7179                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    7180                 :            :  * reads, an application should call this function any time "bytes_to_local" is
    7181                 :            :  * read as part of a read-modify-write operation.
    7182                 :            :  *
    7183                 :            :  * In some cases this function reduces to a no-op, because the current value
    7184                 :            :  * of "bytes_to_local" is already known:
    7185                 :            :  *
    7186                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    7187                 :            :  *     vteprec_logical_binding_stats_insert()).
    7188                 :            :  *
    7189                 :            :  *   - If "bytes_to_local" has already been modified (with
    7190                 :            :  *     vteprec_logical_binding_stats_set_bytes_to_local()) within the current transaction.
    7191                 :            :  *
    7192                 :            :  * Because of the latter property, always call this function *before*
    7193                 :            :  * vteprec_logical_binding_stats_set_bytes_to_local() for a given read-modify-write.
    7194                 :            :  *
    7195                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7196                 :            : void
    7197                 :          0 : vteprec_logical_binding_stats_verify_bytes_to_local(const struct vteprec_logical_binding_stats *row)
    7198                 :            : {
    7199         [ #  # ]:          0 :     ovs_assert(inited);
    7200                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_TO_LOCAL]);
    7201                 :          0 : }
    7202                 :            : 
    7203                 :            : /* Causes the original contents of column "packets_from_local" in 'row' to be
    7204                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    7205                 :            :  * "packets_from_local" in 'row' changed (or if 'row' was deleted) between the
    7206                 :            :  * time that the IDL originally read its contents and the time that the
    7207                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    7208                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    7209                 :            :  * change has already been received).
    7210                 :            :  *
    7211                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    7212                 :            :  * reads, an application should call this function any time "packets_from_local" is
    7213                 :            :  * read as part of a read-modify-write operation.
    7214                 :            :  *
    7215                 :            :  * In some cases this function reduces to a no-op, because the current value
    7216                 :            :  * of "packets_from_local" is already known:
    7217                 :            :  *
    7218                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    7219                 :            :  *     vteprec_logical_binding_stats_insert()).
    7220                 :            :  *
    7221                 :            :  *   - If "packets_from_local" has already been modified (with
    7222                 :            :  *     vteprec_logical_binding_stats_set_packets_from_local()) within the current transaction.
    7223                 :            :  *
    7224                 :            :  * Because of the latter property, always call this function *before*
    7225                 :            :  * vteprec_logical_binding_stats_set_packets_from_local() for a given read-modify-write.
    7226                 :            :  *
    7227                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7228                 :            : void
    7229                 :          0 : vteprec_logical_binding_stats_verify_packets_from_local(const struct vteprec_logical_binding_stats *row)
    7230                 :            : {
    7231         [ #  # ]:          0 :     ovs_assert(inited);
    7232                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_FROM_LOCAL]);
    7233                 :          0 : }
    7234                 :            : 
    7235                 :            : /* Causes the original contents of column "packets_to_local" in 'row' to be
    7236                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    7237                 :            :  * "packets_to_local" in 'row' changed (or if 'row' was deleted) between the
    7238                 :            :  * time that the IDL originally read its contents and the time that the
    7239                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    7240                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    7241                 :            :  * change has already been received).
    7242                 :            :  *
    7243                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    7244                 :            :  * reads, an application should call this function any time "packets_to_local" is
    7245                 :            :  * read as part of a read-modify-write operation.
    7246                 :            :  *
    7247                 :            :  * In some cases this function reduces to a no-op, because the current value
    7248                 :            :  * of "packets_to_local" is already known:
    7249                 :            :  *
    7250                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    7251                 :            :  *     vteprec_logical_binding_stats_insert()).
    7252                 :            :  *
    7253                 :            :  *   - If "packets_to_local" has already been modified (with
    7254                 :            :  *     vteprec_logical_binding_stats_set_packets_to_local()) within the current transaction.
    7255                 :            :  *
    7256                 :            :  * Because of the latter property, always call this function *before*
    7257                 :            :  * vteprec_logical_binding_stats_set_packets_to_local() for a given read-modify-write.
    7258                 :            :  *
    7259                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7260                 :            : void
    7261                 :          0 : vteprec_logical_binding_stats_verify_packets_to_local(const struct vteprec_logical_binding_stats *row)
    7262                 :            : {
    7263         [ #  # ]:          0 :     ovs_assert(inited);
    7264                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_TO_LOCAL]);
    7265                 :          0 : }
    7266                 :            : 
    7267                 :            : /* Returns the "bytes_from_local" column's value from the "Logical_Binding_Stats" table in 'row'
    7268                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    7269                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    7270                 :            :  * for a given key than implementing the same operation on the "cooked"
    7271                 :            :  * form in 'row'.
    7272                 :            :  *
    7273                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    7274                 :            :  * (This helps to avoid silent bugs if someone changes bytes_from_local's
    7275                 :            :  * type without updating the caller.)
    7276                 :            :  *
    7277                 :            :  * The caller must not modify or free the returned value.
    7278                 :            :  *
    7279                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    7280                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    7281                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    7282                 :            :  * of it with ovsdb_datum_clone().
    7283                 :            :  *
    7284                 :            :  * This function is rarely useful, since it is easier to access the value
    7285                 :            :  * directly through the "bytes_from_local" member in vteprec_logical_binding_stats. */
    7286                 :            : const struct ovsdb_datum *
    7287                 :          0 : vteprec_logical_binding_stats_get_bytes_from_local(const struct vteprec_logical_binding_stats *row,
    7288                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    7289                 :            : {
    7290         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    7291                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_binding_stats_col_bytes_from_local);
    7292                 :            : }
    7293                 :            : 
    7294                 :            : /* Returns the "bytes_to_local" column's value from the "Logical_Binding_Stats" table in 'row'
    7295                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    7296                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    7297                 :            :  * for a given key than implementing the same operation on the "cooked"
    7298                 :            :  * form in 'row'.
    7299                 :            :  *
    7300                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    7301                 :            :  * (This helps to avoid silent bugs if someone changes bytes_to_local's
    7302                 :            :  * type without updating the caller.)
    7303                 :            :  *
    7304                 :            :  * The caller must not modify or free the returned value.
    7305                 :            :  *
    7306                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    7307                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    7308                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    7309                 :            :  * of it with ovsdb_datum_clone().
    7310                 :            :  *
    7311                 :            :  * This function is rarely useful, since it is easier to access the value
    7312                 :            :  * directly through the "bytes_to_local" member in vteprec_logical_binding_stats. */
    7313                 :            : const struct ovsdb_datum *
    7314                 :          0 : vteprec_logical_binding_stats_get_bytes_to_local(const struct vteprec_logical_binding_stats *row,
    7315                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    7316                 :            : {
    7317         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    7318                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_binding_stats_col_bytes_to_local);
    7319                 :            : }
    7320                 :            : 
    7321                 :            : /* Returns the "packets_from_local" column's value from the "Logical_Binding_Stats" table in 'row'
    7322                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    7323                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    7324                 :            :  * for a given key than implementing the same operation on the "cooked"
    7325                 :            :  * form in 'row'.
    7326                 :            :  *
    7327                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    7328                 :            :  * (This helps to avoid silent bugs if someone changes packets_from_local's
    7329                 :            :  * type without updating the caller.)
    7330                 :            :  *
    7331                 :            :  * The caller must not modify or free the returned value.
    7332                 :            :  *
    7333                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    7334                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    7335                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    7336                 :            :  * of it with ovsdb_datum_clone().
    7337                 :            :  *
    7338                 :            :  * This function is rarely useful, since it is easier to access the value
    7339                 :            :  * directly through the "packets_from_local" member in vteprec_logical_binding_stats. */
    7340                 :            : const struct ovsdb_datum *
    7341                 :          0 : vteprec_logical_binding_stats_get_packets_from_local(const struct vteprec_logical_binding_stats *row,
    7342                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    7343                 :            : {
    7344         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    7345                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_binding_stats_col_packets_from_local);
    7346                 :            : }
    7347                 :            : 
    7348                 :            : /* Returns the "packets_to_local" column's value from the "Logical_Binding_Stats" table in 'row'
    7349                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    7350                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    7351                 :            :  * for a given key than implementing the same operation on the "cooked"
    7352                 :            :  * form in 'row'.
    7353                 :            :  *
    7354                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    7355                 :            :  * (This helps to avoid silent bugs if someone changes packets_to_local's
    7356                 :            :  * type without updating the caller.)
    7357                 :            :  *
    7358                 :            :  * The caller must not modify or free the returned value.
    7359                 :            :  *
    7360                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    7361                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    7362                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    7363                 :            :  * of it with ovsdb_datum_clone().
    7364                 :            :  *
    7365                 :            :  * This function is rarely useful, since it is easier to access the value
    7366                 :            :  * directly through the "packets_to_local" member in vteprec_logical_binding_stats. */
    7367                 :            : const struct ovsdb_datum *
    7368                 :          0 : vteprec_logical_binding_stats_get_packets_to_local(const struct vteprec_logical_binding_stats *row,
    7369                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    7370                 :            : {
    7371         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    7372                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_binding_stats_col_packets_to_local);
    7373                 :            : }
    7374                 :            : 
    7375                 :            : /* Sets the "bytes_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7376                 :            :  * 'bytes_from_local'.
    7377                 :            :  *
    7378                 :            :  * The caller retains ownership of the arguments. */
    7379                 :            : void
    7380                 :          0 : vteprec_logical_binding_stats_set_bytes_from_local(const struct vteprec_logical_binding_stats *row, int64_t bytes_from_local)
    7381                 :            : {
    7382                 :            :     struct ovsdb_datum datum;
    7383                 :            :     union ovsdb_atom key;
    7384                 :            : 
    7385         [ #  # ]:          0 :     ovs_assert(inited);
    7386                 :          0 :     datum.n = 1;
    7387                 :          0 :     datum.keys = &key;
    7388                 :          0 :     key.integer = bytes_from_local;
    7389                 :          0 :     datum.values = NULL;
    7390                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_FROM_LOCAL], &datum);
    7391                 :          0 : }
    7392                 :            : 
    7393                 :            : /* Sets the "bytes_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7394                 :            :  * 'bytes_to_local'.
    7395                 :            :  *
    7396                 :            :  * The caller retains ownership of the arguments. */
    7397                 :            : void
    7398                 :          0 : vteprec_logical_binding_stats_set_bytes_to_local(const struct vteprec_logical_binding_stats *row, int64_t bytes_to_local)
    7399                 :            : {
    7400                 :            :     struct ovsdb_datum datum;
    7401                 :            :     union ovsdb_atom key;
    7402                 :            : 
    7403         [ #  # ]:          0 :     ovs_assert(inited);
    7404                 :          0 :     datum.n = 1;
    7405                 :          0 :     datum.keys = &key;
    7406                 :          0 :     key.integer = bytes_to_local;
    7407                 :          0 :     datum.values = NULL;
    7408                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_TO_LOCAL], &datum);
    7409                 :          0 : }
    7410                 :            : 
    7411                 :            : /* Sets the "packets_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7412                 :            :  * 'packets_from_local'.
    7413                 :            :  *
    7414                 :            :  * The caller retains ownership of the arguments. */
    7415                 :            : void
    7416                 :          0 : vteprec_logical_binding_stats_set_packets_from_local(const struct vteprec_logical_binding_stats *row, int64_t packets_from_local)
    7417                 :            : {
    7418                 :            :     struct ovsdb_datum datum;
    7419                 :            :     union ovsdb_atom key;
    7420                 :            : 
    7421         [ #  # ]:          0 :     ovs_assert(inited);
    7422                 :          0 :     datum.n = 1;
    7423                 :          0 :     datum.keys = &key;
    7424                 :          0 :     key.integer = packets_from_local;
    7425                 :          0 :     datum.values = NULL;
    7426                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_FROM_LOCAL], &datum);
    7427                 :          0 : }
    7428                 :            : 
    7429                 :            : /* Sets the "packets_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7430                 :            :  * 'packets_to_local'.
    7431                 :            :  *
    7432                 :            :  * The caller retains ownership of the arguments. */
    7433                 :            : void
    7434                 :          0 : vteprec_logical_binding_stats_set_packets_to_local(const struct vteprec_logical_binding_stats *row, int64_t packets_to_local)
    7435                 :            : {
    7436                 :            :     struct ovsdb_datum datum;
    7437                 :            :     union ovsdb_atom key;
    7438                 :            : 
    7439         [ #  # ]:          0 :     ovs_assert(inited);
    7440                 :          0 :     datum.n = 1;
    7441                 :          0 :     datum.keys = &key;
    7442                 :          0 :     key.integer = packets_to_local;
    7443                 :          0 :     datum.values = NULL;
    7444                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_TO_LOCAL], &datum);
    7445                 :          0 : }
    7446                 :            : 
    7447                 :            : /* Sets the "bytes_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7448                 :            :  * 'bytes_from_local'.
    7449                 :            :  *
    7450                 :            :  * The caller retains ownership of the arguments. */
    7451                 :            : void
    7452                 :          0 : vteprec_logical_binding_stats_add_clause_bytes_from_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t bytes_from_local)
    7453                 :            : {
    7454                 :            :     struct ovsdb_datum datum;
    7455                 :            :     union ovsdb_atom key;
    7456                 :            : 
    7457         [ #  # ]:          0 :     ovs_assert(inited);
    7458                 :          0 :     datum.n = 1;
    7459                 :          0 :     datum.keys = &key;
    7460                 :          0 :     key.integer = bytes_from_local;
    7461                 :          0 :     datum.values = NULL;
    7462                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7463                 :            :                           function,
    7464                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_FROM_LOCAL],
    7465                 :            :                           &datum);
    7466                 :          0 : }
    7467                 :            : 
    7468                 :            : /* Sets the "bytes_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7469                 :            :  * 'bytes_to_local'.
    7470                 :            :  *
    7471                 :            :  * The caller retains ownership of the arguments. */
    7472                 :            : void
    7473                 :          0 : vteprec_logical_binding_stats_add_clause_bytes_to_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t bytes_to_local)
    7474                 :            : {
    7475                 :            :     struct ovsdb_datum datum;
    7476                 :            :     union ovsdb_atom key;
    7477                 :            : 
    7478         [ #  # ]:          0 :     ovs_assert(inited);
    7479                 :          0 :     datum.n = 1;
    7480                 :          0 :     datum.keys = &key;
    7481                 :          0 :     key.integer = bytes_to_local;
    7482                 :          0 :     datum.values = NULL;
    7483                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7484                 :            :                           function,
    7485                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_TO_LOCAL],
    7486                 :            :                           &datum);
    7487                 :          0 : }
    7488                 :            : 
    7489                 :            : /* Sets the "packets_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7490                 :            :  * 'packets_from_local'.
    7491                 :            :  *
    7492                 :            :  * The caller retains ownership of the arguments. */
    7493                 :            : void
    7494                 :          0 : vteprec_logical_binding_stats_add_clause_packets_from_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t packets_from_local)
    7495                 :            : {
    7496                 :            :     struct ovsdb_datum datum;
    7497                 :            :     union ovsdb_atom key;
    7498                 :            : 
    7499         [ #  # ]:          0 :     ovs_assert(inited);
    7500                 :          0 :     datum.n = 1;
    7501                 :          0 :     datum.keys = &key;
    7502                 :          0 :     key.integer = packets_from_local;
    7503                 :          0 :     datum.values = NULL;
    7504                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7505                 :            :                           function,
    7506                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_FROM_LOCAL],
    7507                 :            :                           &datum);
    7508                 :          0 : }
    7509                 :            : 
    7510                 :            : /* Sets the "packets_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7511                 :            :  * 'packets_to_local'.
    7512                 :            :  *
    7513                 :            :  * The caller retains ownership of the arguments. */
    7514                 :            : void
    7515                 :          0 : vteprec_logical_binding_stats_add_clause_packets_to_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t packets_to_local)
    7516                 :            : {
    7517                 :            :     struct ovsdb_datum datum;
    7518                 :            :     union ovsdb_atom key;
    7519                 :            : 
    7520         [ #  # ]:          0 :     ovs_assert(inited);
    7521                 :          0 :     datum.n = 1;
    7522                 :          0 :     datum.keys = &key;
    7523                 :          0 :     key.integer = packets_to_local;
    7524                 :          0 :     datum.values = NULL;
    7525                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7526                 :            :                           function,
    7527                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_TO_LOCAL],
    7528                 :            :                           &datum);
    7529                 :          0 : }
    7530                 :            : void
    7531                 :          0 : vteprec_logical_binding_stats_add_clause_false(struct ovsdb_idl *idl)
    7532                 :            : {
    7533                 :            :     struct ovsdb_datum datum;
    7534                 :            : 
    7535                 :          0 :     ovsdb_datum_init_empty(&datum);
    7536                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], OVSDB_F_FALSE, NULL, &datum);
    7537                 :          0 : }
    7538                 :            : void
    7539                 :          0 : vteprec_logical_binding_stats_add_clause_true(struct ovsdb_idl *idl)
    7540                 :            : {
    7541                 :            :     struct ovsdb_datum datum;
    7542                 :            : 
    7543                 :          0 :     ovsdb_datum_init_empty(&datum);
    7544                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], OVSDB_F_TRUE, NULL, &datum);
    7545                 :          0 : }
    7546                 :            : 
    7547                 :            : /* Sets the "bytes_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7548                 :            :  * 'bytes_from_local'.
    7549                 :            :  *
    7550                 :            :  * The caller retains ownership of the arguments. */
    7551                 :            : void
    7552                 :          0 : vteprec_logical_binding_stats_remove_clause_bytes_from_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t bytes_from_local)
    7553                 :            : {
    7554                 :            :     struct ovsdb_datum datum;
    7555                 :            :     union ovsdb_atom key;
    7556                 :            : 
    7557         [ #  # ]:          0 :     ovs_assert(inited);
    7558                 :          0 :     datum.n = 1;
    7559                 :          0 :     datum.keys = &key;
    7560                 :          0 :     key.integer = bytes_from_local;
    7561                 :          0 :     datum.values = NULL;
    7562                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7563                 :            :                           function,
    7564                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_FROM_LOCAL],
    7565                 :            :                           &datum);
    7566                 :          0 : }
    7567                 :            : 
    7568                 :            : /* Sets the "bytes_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7569                 :            :  * 'bytes_to_local'.
    7570                 :            :  *
    7571                 :            :  * The caller retains ownership of the arguments. */
    7572                 :            : void
    7573                 :          0 : vteprec_logical_binding_stats_remove_clause_bytes_to_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t bytes_to_local)
    7574                 :            : {
    7575                 :            :     struct ovsdb_datum datum;
    7576                 :            :     union ovsdb_atom key;
    7577                 :            : 
    7578         [ #  # ]:          0 :     ovs_assert(inited);
    7579                 :          0 :     datum.n = 1;
    7580                 :          0 :     datum.keys = &key;
    7581                 :          0 :     key.integer = bytes_to_local;
    7582                 :          0 :     datum.values = NULL;
    7583                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7584                 :            :                           function,
    7585                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_BYTES_TO_LOCAL],
    7586                 :            :                           &datum);
    7587                 :          0 : }
    7588                 :            : 
    7589                 :            : /* Sets the "packets_from_local" column from the "Logical_Binding_Stats" table in 'row' to
    7590                 :            :  * 'packets_from_local'.
    7591                 :            :  *
    7592                 :            :  * The caller retains ownership of the arguments. */
    7593                 :            : void
    7594                 :          0 : vteprec_logical_binding_stats_remove_clause_packets_from_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t packets_from_local)
    7595                 :            : {
    7596                 :            :     struct ovsdb_datum datum;
    7597                 :            :     union ovsdb_atom key;
    7598                 :            : 
    7599         [ #  # ]:          0 :     ovs_assert(inited);
    7600                 :          0 :     datum.n = 1;
    7601                 :          0 :     datum.keys = &key;
    7602                 :          0 :     key.integer = packets_from_local;
    7603                 :          0 :     datum.values = NULL;
    7604                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7605                 :            :                           function,
    7606                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_FROM_LOCAL],
    7607                 :            :                           &datum);
    7608                 :          0 : }
    7609                 :            : 
    7610                 :            : /* Sets the "packets_to_local" column from the "Logical_Binding_Stats" table in 'row' to
    7611                 :            :  * 'packets_to_local'.
    7612                 :            :  *
    7613                 :            :  * The caller retains ownership of the arguments. */
    7614                 :            : void
    7615                 :          0 : vteprec_logical_binding_stats_remove_clause_packets_to_local(struct ovsdb_idl *idl, enum ovsdb_function function, int64_t packets_to_local)
    7616                 :            : {
    7617                 :            :     struct ovsdb_datum datum;
    7618                 :            :     union ovsdb_atom key;
    7619                 :            : 
    7620         [ #  # ]:          0 :     ovs_assert(inited);
    7621                 :          0 :     datum.n = 1;
    7622                 :          0 :     datum.keys = &key;
    7623                 :          0 :     key.integer = packets_to_local;
    7624                 :          0 :     datum.values = NULL;
    7625                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS],
    7626                 :            :                           function,
    7627                 :            :                           &vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_COL_PACKETS_TO_LOCAL],
    7628                 :            :                           &datum);
    7629                 :          0 : }
    7630                 :            : void
    7631                 :          0 : vteprec_logical_binding_stats_remove_clause_false(struct ovsdb_idl *idl)
    7632                 :            : {
    7633                 :            :     struct ovsdb_datum datum;
    7634                 :            : 
    7635                 :          0 :     ovsdb_datum_init_empty(&datum);
    7636                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], OVSDB_F_FALSE, NULL, &datum);
    7637                 :          0 : }
    7638                 :            : void
    7639                 :          0 : vteprec_logical_binding_stats_remove_clause_true(struct ovsdb_idl *idl)
    7640                 :            : {
    7641                 :            :     struct ovsdb_datum datum;
    7642                 :            : 
    7643                 :          0 :     ovsdb_datum_init_empty(&datum);
    7644                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], OVSDB_F_TRUE, NULL, &datum);
    7645                 :          0 : }
    7646                 :            : 
    7647                 :            : struct ovsdb_idl_column vteprec_logical_binding_stats_columns[VTEPREC_LOGICAL_BINDING_STATS_N_COLUMNS];
    7648                 :            : 
    7649                 :            : static void
    7650                 :        741 : vteprec_logical_binding_stats_columns_init(void)
    7651                 :            : {
    7652                 :            :     struct ovsdb_idl_column *c;
    7653                 :            : 
    7654                 :            :     /* Initialize vteprec_logical_binding_stats_col_bytes_from_local. */
    7655                 :        741 :     c = &vteprec_logical_binding_stats_col_bytes_from_local;
    7656                 :        741 :     c->name = "bytes_from_local";
    7657                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    7658                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    7659                 :        741 :     c->type.n_min = 1;
    7660                 :        741 :     c->type.n_max = 1;
    7661                 :        741 :     c->mutable = true;
    7662                 :        741 :     c->parse = vteprec_logical_binding_stats_parse_bytes_from_local;
    7663                 :        741 :     c->unparse = vteprec_logical_binding_stats_unparse_bytes_from_local;
    7664                 :            : 
    7665                 :            :     /* Initialize vteprec_logical_binding_stats_col_bytes_to_local. */
    7666                 :        741 :     c = &vteprec_logical_binding_stats_col_bytes_to_local;
    7667                 :        741 :     c->name = "bytes_to_local";
    7668                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    7669                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    7670                 :        741 :     c->type.n_min = 1;
    7671                 :        741 :     c->type.n_max = 1;
    7672                 :        741 :     c->mutable = true;
    7673                 :        741 :     c->parse = vteprec_logical_binding_stats_parse_bytes_to_local;
    7674                 :        741 :     c->unparse = vteprec_logical_binding_stats_unparse_bytes_to_local;
    7675                 :            : 
    7676                 :            :     /* Initialize vteprec_logical_binding_stats_col_packets_from_local. */
    7677                 :        741 :     c = &vteprec_logical_binding_stats_col_packets_from_local;
    7678                 :        741 :     c->name = "packets_from_local";
    7679                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    7680                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    7681                 :        741 :     c->type.n_min = 1;
    7682                 :        741 :     c->type.n_max = 1;
    7683                 :        741 :     c->mutable = true;
    7684                 :        741 :     c->parse = vteprec_logical_binding_stats_parse_packets_from_local;
    7685                 :        741 :     c->unparse = vteprec_logical_binding_stats_unparse_packets_from_local;
    7686                 :            : 
    7687                 :            :     /* Initialize vteprec_logical_binding_stats_col_packets_to_local. */
    7688                 :        741 :     c = &vteprec_logical_binding_stats_col_packets_to_local;
    7689                 :        741 :     c->name = "packets_to_local";
    7690                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
    7691                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    7692                 :        741 :     c->type.n_min = 1;
    7693                 :        741 :     c->type.n_max = 1;
    7694                 :        741 :     c->mutable = true;
    7695                 :        741 :     c->parse = vteprec_logical_binding_stats_parse_packets_to_local;
    7696                 :        741 :     c->unparse = vteprec_logical_binding_stats_unparse_packets_to_local;
    7697                 :        741 : }
    7698                 :            : 
    7699                 :            : /* Logical_Router table. */
    7700                 :            : 
    7701                 :            : static void
    7702                 :          0 : vteprec_logical_router_parse_LR_fault_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7703                 :            : {
    7704                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7705                 :            :     size_t i;
    7706                 :            : 
    7707         [ #  # ]:          0 :     ovs_assert(inited);
    7708                 :          0 :     row->LR_fault_status = NULL;
    7709                 :          0 :     row->n_LR_fault_status = 0;
    7710         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
    7711         [ #  # ]:          0 :         if (!row->n_LR_fault_status) {
    7712                 :          0 :             row->LR_fault_status = xmalloc(datum->n * sizeof *row->LR_fault_status);
    7713                 :            :         }
    7714                 :          0 :         row->LR_fault_status[row->n_LR_fault_status] = datum->keys[i].string;
    7715                 :          0 :         row->n_LR_fault_status++;
    7716                 :            :     }
    7717                 :          0 : }
    7718                 :            : 
    7719                 :            : static void
    7720                 :          0 : vteprec_logical_router_parse_acl_binding(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7721                 :            : {
    7722                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7723                 :            :     size_t i;
    7724                 :            : 
    7725         [ #  # ]:          0 :     ovs_assert(inited);
    7726                 :          0 :     row->key_acl_binding = NULL;
    7727                 :          0 :     row->value_acl_binding = NULL;
    7728                 :          0 :     row->n_acl_binding = 0;
    7729         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
    7730                 :          0 :         struct vteprec_acl *valueRow = vteprec_acl_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_ACL], &datum->values[i].uuid));
    7731         [ #  # ]:          0 :         if (valueRow) {
    7732         [ #  # ]:          0 :             if (!row->n_acl_binding) {
    7733                 :          0 :                 row->key_acl_binding = xmalloc(datum->n * sizeof *row->key_acl_binding);
    7734                 :          0 :                 row->value_acl_binding = xmalloc(datum->n * sizeof *row->value_acl_binding);
    7735                 :            :             }
    7736                 :          0 :             row->key_acl_binding[row->n_acl_binding] = datum->keys[i].string;
    7737                 :          0 :             row->value_acl_binding[row->n_acl_binding] = valueRow;
    7738                 :          0 :             row->n_acl_binding++;
    7739                 :            :         }
    7740                 :            :     }
    7741                 :          0 : }
    7742                 :            : 
    7743                 :            : static void
    7744                 :          0 : vteprec_logical_router_parse_description(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7745                 :            : {
    7746                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7747                 :            : 
    7748         [ #  # ]:          0 :     ovs_assert(inited);
    7749         [ #  # ]:          0 :     if (datum->n >= 1) {
    7750                 :          0 :         row->description = datum->keys[0].string;
    7751                 :            :     } else {
    7752                 :          0 :         row->description = "";
    7753                 :            :     }
    7754                 :          0 : }
    7755                 :            : 
    7756                 :            : static void
    7757                 :          0 : vteprec_logical_router_parse_name(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7758                 :            : {
    7759                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7760                 :            : 
    7761         [ #  # ]:          0 :     ovs_assert(inited);
    7762         [ #  # ]:          0 :     if (datum->n >= 1) {
    7763                 :          0 :         row->name = datum->keys[0].string;
    7764                 :            :     } else {
    7765                 :          0 :         row->name = "";
    7766                 :            :     }
    7767                 :          0 : }
    7768                 :            : 
    7769                 :            : static void
    7770                 :          0 : vteprec_logical_router_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7771                 :            : {
    7772                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7773                 :            :     size_t i;
    7774                 :            : 
    7775         [ #  # ]:          0 :     ovs_assert(inited);
    7776                 :          0 :     smap_init(&row->other_config);
    7777         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
    7778                 :          0 :         smap_add(&row->other_config,
    7779                 :          0 :                  datum->keys[i].string,
    7780                 :          0 :                  datum->values[i].string);
    7781                 :            :     }
    7782                 :          0 : }
    7783                 :            : 
    7784                 :            : static void
    7785                 :          0 : vteprec_logical_router_parse_static_routes(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7786                 :            : {
    7787                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7788                 :            :     size_t i;
    7789                 :            : 
    7790         [ #  # ]:          0 :     ovs_assert(inited);
    7791                 :          0 :     smap_init(&row->static_routes);
    7792         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
    7793                 :          0 :         smap_add(&row->static_routes,
    7794                 :          0 :                  datum->keys[i].string,
    7795                 :          0 :                  datum->values[i].string);
    7796                 :            :     }
    7797                 :          0 : }
    7798                 :            : 
    7799                 :            : static void
    7800                 :          0 : vteprec_logical_router_parse_switch_binding(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    7801                 :            : {
    7802                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7803                 :            :     size_t i;
    7804                 :            : 
    7805         [ #  # ]:          0 :     ovs_assert(inited);
    7806                 :          0 :     row->key_switch_binding = NULL;
    7807                 :          0 :     row->value_switch_binding = NULL;
    7808                 :          0 :     row->n_switch_binding = 0;
    7809         [ #  # ]:          0 :     for (i = 0; i < datum->n; i++) {
    7810                 :          0 :         struct vteprec_logical_switch *valueRow = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->values[i].uuid));
    7811         [ #  # ]:          0 :         if (valueRow) {
    7812         [ #  # ]:          0 :             if (!row->n_switch_binding) {
    7813                 :          0 :                 row->key_switch_binding = xmalloc(datum->n * sizeof *row->key_switch_binding);
    7814                 :          0 :                 row->value_switch_binding = xmalloc(datum->n * sizeof *row->value_switch_binding);
    7815                 :            :             }
    7816                 :          0 :             row->key_switch_binding[row->n_switch_binding] = datum->keys[i].string;
    7817                 :          0 :             row->value_switch_binding[row->n_switch_binding] = valueRow;
    7818                 :          0 :             row->n_switch_binding++;
    7819                 :            :         }
    7820                 :            :     }
    7821                 :          0 : }
    7822                 :            : 
    7823                 :            : static void
    7824                 :          0 : vteprec_logical_router_unparse_LR_fault_status(struct ovsdb_idl_row *row_)
    7825                 :            : {
    7826                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7827                 :            : 
    7828         [ #  # ]:          0 :     ovs_assert(inited);
    7829                 :          0 :     free(row->LR_fault_status);
    7830                 :          0 : }
    7831                 :            : 
    7832                 :            : static void
    7833                 :          0 : vteprec_logical_router_unparse_acl_binding(struct ovsdb_idl_row *row_)
    7834                 :            : {
    7835                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7836                 :            : 
    7837         [ #  # ]:          0 :     ovs_assert(inited);
    7838                 :          0 :     free(row->key_acl_binding);
    7839                 :          0 :     free(row->value_acl_binding);
    7840                 :          0 : }
    7841                 :            : 
    7842                 :            : static void
    7843                 :          0 : vteprec_logical_router_unparse_description(struct ovsdb_idl_row *row OVS_UNUSED)
    7844                 :            : {
    7845                 :            :     /* Nothing to do. */
    7846                 :          0 : }
    7847                 :            : 
    7848                 :            : static void
    7849                 :          0 : vteprec_logical_router_unparse_name(struct ovsdb_idl_row *row OVS_UNUSED)
    7850                 :            : {
    7851                 :            :     /* Nothing to do. */
    7852                 :          0 : }
    7853                 :            : 
    7854                 :            : static void
    7855                 :          0 : vteprec_logical_router_unparse_other_config(struct ovsdb_idl_row *row_)
    7856                 :            : {
    7857                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7858                 :            : 
    7859         [ #  # ]:          0 :     ovs_assert(inited);
    7860                 :          0 :     smap_destroy(&row->other_config);
    7861                 :          0 : }
    7862                 :            : 
    7863                 :            : static void
    7864                 :          0 : vteprec_logical_router_unparse_static_routes(struct ovsdb_idl_row *row_)
    7865                 :            : {
    7866                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7867                 :            : 
    7868         [ #  # ]:          0 :     ovs_assert(inited);
    7869                 :          0 :     smap_destroy(&row->static_routes);
    7870                 :          0 : }
    7871                 :            : 
    7872                 :            : static void
    7873                 :          0 : vteprec_logical_router_unparse_switch_binding(struct ovsdb_idl_row *row_)
    7874                 :            : {
    7875                 :          0 :     struct vteprec_logical_router *row = vteprec_logical_router_cast(row_);
    7876                 :            : 
    7877         [ #  # ]:          0 :     ovs_assert(inited);
    7878                 :          0 :     free(row->key_switch_binding);
    7879                 :          0 :     free(row->value_switch_binding);
    7880                 :          0 : }
    7881                 :            : 
    7882                 :            : static void
    7883                 :          0 : vteprec_logical_router_init__(struct ovsdb_idl_row *row)
    7884                 :            : {
    7885                 :          0 :     vteprec_logical_router_init(vteprec_logical_router_cast(row));
    7886                 :          0 : }
    7887                 :            : 
    7888                 :            : /* Clears the contents of 'row' in table "Logical_Router". */
    7889                 :            : void
    7890                 :          0 : vteprec_logical_router_init(struct vteprec_logical_router *row)
    7891                 :            : {
    7892                 :          0 :     memset(row, 0, sizeof *row); 
    7893                 :          0 :     smap_init(&row->other_config);
    7894                 :          0 :     smap_init(&row->static_routes);
    7895                 :          0 : }
    7896                 :            : 
    7897                 :            : /* Searches table "Logical_Router" in 'idl' for a row with UUID 'uuid'.  Returns
    7898                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    7899                 :            : const struct vteprec_logical_router *
    7900                 :          0 : vteprec_logical_router_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    7901                 :            : {
    7902                 :          0 :     return vteprec_logical_router_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], uuid));
    7903                 :            : }
    7904                 :            : 
    7905                 :            : /* Returns a row in table "Logical_Router" in 'idl', or a null pointer if that
    7906                 :            :  * table is empty.
    7907                 :            :  *
    7908                 :            :  * Database tables are internally maintained as hash tables, so adding or
    7909                 :            :  * removing rows while traversing the same table can cause some rows to be
    7910                 :            :  * visited twice or not at apply. */
    7911                 :            : const struct vteprec_logical_router *
    7912                 :        484 : vteprec_logical_router_first(const struct ovsdb_idl *idl)
    7913                 :            : {
    7914                 :        484 :     return vteprec_logical_router_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER]));
    7915                 :            : }
    7916                 :            : 
    7917                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    7918                 :            :  * is the last row in its table. */
    7919                 :            : const struct vteprec_logical_router *
    7920                 :          0 : vteprec_logical_router_next(const struct vteprec_logical_router *row)
    7921                 :            : {
    7922                 :          0 :     return vteprec_logical_router_cast(ovsdb_idl_next_row(&row->header_));
    7923                 :            : }
    7924                 :            : 
    7925                 :          0 : unsigned int vteprec_logical_router_get_seqno(const struct ovsdb_idl *idl)
    7926                 :            : {
    7927                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER]);
    7928                 :            : }
    7929                 :            : 
    7930                 :          0 : unsigned int vteprec_logical_router_row_get_seqno(const struct vteprec_logical_router *row, enum ovsdb_idl_change change)
    7931                 :            : {
    7932                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    7933                 :            : }
    7934                 :            : 
    7935                 :            : const struct vteprec_logical_router *
    7936                 :          0 : vteprec_logical_router_track_get_first(const struct ovsdb_idl *idl)
    7937                 :            : {
    7938                 :          0 :     return vteprec_logical_router_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER]));
    7939                 :            : }
    7940                 :            : 
    7941                 :            : const struct vteprec_logical_router
    7942                 :          0 : *vteprec_logical_router_track_get_next(const struct vteprec_logical_router *row)
    7943                 :            : {
    7944                 :          0 :     return vteprec_logical_router_cast(ovsdb_idl_track_get_next(&row->header_));
    7945                 :            : }
    7946                 :            : 
    7947                 :            : 
    7948                 :            : /* Deletes 'row' from table "Logical_Router".  'row' may be freed, so it must not be
    7949                 :            :  * accessed afterward.
    7950                 :            :  *
    7951                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    7952                 :            : void
    7953                 :          0 : vteprec_logical_router_delete(const struct vteprec_logical_router *row)
    7954                 :            : {
    7955                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
    7956                 :          0 : }
    7957                 :            : 
    7958                 :            : /* Inserts and returns a new row in the table "Logical_Router" in the database
    7959                 :            :  * with open transaction 'txn'.
    7960                 :            :  *
    7961                 :            :  * The new row is assigned a randomly generated provisional UUID.
    7962                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    7963                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    7964                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    7965                 :            : struct vteprec_logical_router *
    7966                 :          0 : vteprec_logical_router_insert(struct ovsdb_idl_txn *txn)
    7967                 :            : {
    7968                 :          0 :     return vteprec_logical_router_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], NULL));
    7969                 :            : }
    7970                 :            : 
    7971                 :            : bool
    7972                 :          0 : vteprec_logical_router_is_updated(const struct vteprec_logical_router *row, enum vteprec_logical_router_column_id column)
    7973                 :            : {
    7974                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_logical_router_columns[column]);
    7975                 :            : }
    7976                 :            : 
    7977                 :            : /* Causes the original contents of column "LR_fault_status" in 'row' to be
    7978                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    7979                 :            :  * "LR_fault_status" in 'row' changed (or if 'row' was deleted) between the
    7980                 :            :  * time that the IDL originally read its contents and the time that the
    7981                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    7982                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    7983                 :            :  * change has already been received).
    7984                 :            :  *
    7985                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    7986                 :            :  * reads, an application should call this function any time "LR_fault_status" is
    7987                 :            :  * read as part of a read-modify-write operation.
    7988                 :            :  *
    7989                 :            :  * In some cases this function reduces to a no-op, because the current value
    7990                 :            :  * of "LR_fault_status" is already known:
    7991                 :            :  *
    7992                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    7993                 :            :  *     vteprec_logical_router_insert()).
    7994                 :            :  *
    7995                 :            :  *   - If "LR_fault_status" has already been modified (with
    7996                 :            :  *     vteprec_logical_router_set_LR_fault_status()) within the current transaction.
    7997                 :            :  *
    7998                 :            :  * Because of the latter property, always call this function *before*
    7999                 :            :  * vteprec_logical_router_set_LR_fault_status() for a given read-modify-write.
    8000                 :            :  *
    8001                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8002                 :            : void
    8003                 :          0 : vteprec_logical_router_verify_LR_fault_status(const struct vteprec_logical_router *row)
    8004                 :            : {
    8005         [ #  # ]:          0 :     ovs_assert(inited);
    8006                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS]);
    8007                 :          0 : }
    8008                 :            : 
    8009                 :            : /* Causes the original contents of column "acl_binding" in 'row' to be
    8010                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8011                 :            :  * "acl_binding" in 'row' changed (or if 'row' was deleted) between the
    8012                 :            :  * time that the IDL originally read its contents and the time that the
    8013                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8014                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8015                 :            :  * change has already been received).
    8016                 :            :  *
    8017                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8018                 :            :  * reads, an application should call this function any time "acl_binding" is
    8019                 :            :  * read as part of a read-modify-write operation.
    8020                 :            :  *
    8021                 :            :  * In some cases this function reduces to a no-op, because the current value
    8022                 :            :  * of "acl_binding" is already known:
    8023                 :            :  *
    8024                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8025                 :            :  *     vteprec_logical_router_insert()).
    8026                 :            :  *
    8027                 :            :  *   - If "acl_binding" has already been modified (with
    8028                 :            :  *     vteprec_logical_router_set_acl_binding()) within the current transaction.
    8029                 :            :  *
    8030                 :            :  * Because of the latter property, always call this function *before*
    8031                 :            :  * vteprec_logical_router_set_acl_binding() for a given read-modify-write.
    8032                 :            :  *
    8033                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8034                 :            : void
    8035                 :          0 : vteprec_logical_router_verify_acl_binding(const struct vteprec_logical_router *row)
    8036                 :            : {
    8037         [ #  # ]:          0 :     ovs_assert(inited);
    8038                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING]);
    8039                 :          0 : }
    8040                 :            : 
    8041                 :            : /* Causes the original contents of column "description" in 'row' to be
    8042                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8043                 :            :  * "description" in 'row' changed (or if 'row' was deleted) between the
    8044                 :            :  * time that the IDL originally read its contents and the time that the
    8045                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8046                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8047                 :            :  * change has already been received).
    8048                 :            :  *
    8049                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8050                 :            :  * reads, an application should call this function any time "description" is
    8051                 :            :  * read as part of a read-modify-write operation.
    8052                 :            :  *
    8053                 :            :  * In some cases this function reduces to a no-op, because the current value
    8054                 :            :  * of "description" is already known:
    8055                 :            :  *
    8056                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8057                 :            :  *     vteprec_logical_router_insert()).
    8058                 :            :  *
    8059                 :            :  *   - If "description" has already been modified (with
    8060                 :            :  *     vteprec_logical_router_set_description()) within the current transaction.
    8061                 :            :  *
    8062                 :            :  * Because of the latter property, always call this function *before*
    8063                 :            :  * vteprec_logical_router_set_description() for a given read-modify-write.
    8064                 :            :  *
    8065                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8066                 :            : void
    8067                 :          0 : vteprec_logical_router_verify_description(const struct vteprec_logical_router *row)
    8068                 :            : {
    8069         [ #  # ]:          0 :     ovs_assert(inited);
    8070                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_DESCRIPTION]);
    8071                 :          0 : }
    8072                 :            : 
    8073                 :            : /* Causes the original contents of column "name" in 'row' to be
    8074                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8075                 :            :  * "name" in 'row' changed (or if 'row' was deleted) between the
    8076                 :            :  * time that the IDL originally read its contents and the time that the
    8077                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8078                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8079                 :            :  * change has already been received).
    8080                 :            :  *
    8081                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8082                 :            :  * reads, an application should call this function any time "name" is
    8083                 :            :  * read as part of a read-modify-write operation.
    8084                 :            :  *
    8085                 :            :  * In some cases this function reduces to a no-op, because the current value
    8086                 :            :  * of "name" is already known:
    8087                 :            :  *
    8088                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8089                 :            :  *     vteprec_logical_router_insert()).
    8090                 :            :  *
    8091                 :            :  *   - If "name" has already been modified (with
    8092                 :            :  *     vteprec_logical_router_set_name()) within the current transaction.
    8093                 :            :  *
    8094                 :            :  * Because of the latter property, always call this function *before*
    8095                 :            :  * vteprec_logical_router_set_name() for a given read-modify-write.
    8096                 :            :  *
    8097                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8098                 :            : void
    8099                 :          0 : vteprec_logical_router_verify_name(const struct vteprec_logical_router *row)
    8100                 :            : {
    8101         [ #  # ]:          0 :     ovs_assert(inited);
    8102                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_NAME]);
    8103                 :          0 : }
    8104                 :            : 
    8105                 :            : /* Causes the original contents of column "other_config" in 'row' to be
    8106                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8107                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
    8108                 :            :  * time that the IDL originally read its contents and the time that the
    8109                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8110                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8111                 :            :  * change has already been received).
    8112                 :            :  *
    8113                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8114                 :            :  * reads, an application should call this function any time "other_config" is
    8115                 :            :  * read as part of a read-modify-write operation.
    8116                 :            :  *
    8117                 :            :  * In some cases this function reduces to a no-op, because the current value
    8118                 :            :  * of "other_config" is already known:
    8119                 :            :  *
    8120                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8121                 :            :  *     vteprec_logical_router_insert()).
    8122                 :            :  *
    8123                 :            :  *   - If "other_config" has already been modified (with
    8124                 :            :  *     vteprec_logical_router_set_other_config()) within the current transaction.
    8125                 :            :  *
    8126                 :            :  * Because of the latter property, always call this function *before*
    8127                 :            :  * vteprec_logical_router_set_other_config() for a given read-modify-write.
    8128                 :            :  *
    8129                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8130                 :            : void
    8131                 :          0 : vteprec_logical_router_verify_other_config(const struct vteprec_logical_router *row)
    8132                 :            : {
    8133         [ #  # ]:          0 :     ovs_assert(inited);
    8134                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG]);
    8135                 :          0 : }
    8136                 :            : 
    8137                 :            : /* Causes the original contents of column "static_routes" in 'row' to be
    8138                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8139                 :            :  * "static_routes" in 'row' changed (or if 'row' was deleted) between the
    8140                 :            :  * time that the IDL originally read its contents and the time that the
    8141                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8142                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8143                 :            :  * change has already been received).
    8144                 :            :  *
    8145                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8146                 :            :  * reads, an application should call this function any time "static_routes" is
    8147                 :            :  * read as part of a read-modify-write operation.
    8148                 :            :  *
    8149                 :            :  * In some cases this function reduces to a no-op, because the current value
    8150                 :            :  * of "static_routes" is already known:
    8151                 :            :  *
    8152                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8153                 :            :  *     vteprec_logical_router_insert()).
    8154                 :            :  *
    8155                 :            :  *   - If "static_routes" has already been modified (with
    8156                 :            :  *     vteprec_logical_router_set_static_routes()) within the current transaction.
    8157                 :            :  *
    8158                 :            :  * Because of the latter property, always call this function *before*
    8159                 :            :  * vteprec_logical_router_set_static_routes() for a given read-modify-write.
    8160                 :            :  *
    8161                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8162                 :            : void
    8163                 :          0 : vteprec_logical_router_verify_static_routes(const struct vteprec_logical_router *row)
    8164                 :            : {
    8165         [ #  # ]:          0 :     ovs_assert(inited);
    8166                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES]);
    8167                 :          0 : }
    8168                 :            : 
    8169                 :            : /* Causes the original contents of column "switch_binding" in 'row' to be
    8170                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    8171                 :            :  * "switch_binding" in 'row' changed (or if 'row' was deleted) between the
    8172                 :            :  * time that the IDL originally read its contents and the time that the
    8173                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    8174                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    8175                 :            :  * change has already been received).
    8176                 :            :  *
    8177                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    8178                 :            :  * reads, an application should call this function any time "switch_binding" is
    8179                 :            :  * read as part of a read-modify-write operation.
    8180                 :            :  *
    8181                 :            :  * In some cases this function reduces to a no-op, because the current value
    8182                 :            :  * of "switch_binding" is already known:
    8183                 :            :  *
    8184                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    8185                 :            :  *     vteprec_logical_router_insert()).
    8186                 :            :  *
    8187                 :            :  *   - If "switch_binding" has already been modified (with
    8188                 :            :  *     vteprec_logical_router_set_switch_binding()) within the current transaction.
    8189                 :            :  *
    8190                 :            :  * Because of the latter property, always call this function *before*
    8191                 :            :  * vteprec_logical_router_set_switch_binding() for a given read-modify-write.
    8192                 :            :  *
    8193                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    8194                 :            : void
    8195                 :          0 : vteprec_logical_router_verify_switch_binding(const struct vteprec_logical_router *row)
    8196                 :            : {
    8197         [ #  # ]:          0 :     ovs_assert(inited);
    8198                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING]);
    8199                 :          0 : }
    8200                 :            : 
    8201                 :            : /* Returns the "LR_fault_status" column's value from the "Logical_Router" table in 'row'
    8202                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8203                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8204                 :            :  * for a given key than implementing the same operation on the "cooked"
    8205                 :            :  * form in 'row'.
    8206                 :            :  *
    8207                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8208                 :            :  * (This helps to avoid silent bugs if someone changes LR_fault_status's
    8209                 :            :  * type without updating the caller.)
    8210                 :            :  *
    8211                 :            :  * The caller must not modify or free the returned value.
    8212                 :            :  *
    8213                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8214                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8215                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8216                 :            :  * of it with ovsdb_datum_clone().
    8217                 :            :  *
    8218                 :            :  * This function is rarely useful, since it is easier to access the value
    8219                 :            :  * directly through the "LR_fault_status" member in vteprec_logical_router. */
    8220                 :            : const struct ovsdb_datum *
    8221                 :          0 : vteprec_logical_router_get_LR_fault_status(const struct vteprec_logical_router *row,
    8222                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    8223                 :            : {
    8224         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8225                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_LR_fault_status);
    8226                 :            : }
    8227                 :            : 
    8228                 :            : /* Returns the "acl_binding" column's value from the "Logical_Router" table in 'row'
    8229                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8230                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8231                 :            :  * for a given key than implementing the same operation on the "cooked"
    8232                 :            :  * form in 'row'.
    8233                 :            :  *
    8234                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8235                 :            :  * 'value_type' must be OVSDB_TYPE_UUID.
    8236                 :            :  * (This helps to avoid silent bugs if someone changes acl_binding's
    8237                 :            :  * type without updating the caller.)
    8238                 :            :  *
    8239                 :            :  * The caller must not modify or free the returned value.
    8240                 :            :  *
    8241                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8242                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8243                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8244                 :            :  * of it with ovsdb_datum_clone().
    8245                 :            :  *
    8246                 :            :  * This function is rarely useful, since it is easier to access the value
    8247                 :            :  * directly through the "acl_binding" member in vteprec_logical_router. */
    8248                 :            : const struct ovsdb_datum *
    8249                 :          0 : vteprec_logical_router_get_acl_binding(const struct vteprec_logical_router *row,
    8250                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    8251                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    8252                 :            : {
    8253         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8254         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_UUID);
    8255                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_acl_binding);
    8256                 :            : }
    8257                 :            : 
    8258                 :            : /* Returns the "description" column's value from the "Logical_Router" table in 'row'
    8259                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8260                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8261                 :            :  * for a given key than implementing the same operation on the "cooked"
    8262                 :            :  * form in 'row'.
    8263                 :            :  *
    8264                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8265                 :            :  * (This helps to avoid silent bugs if someone changes description's
    8266                 :            :  * type without updating the caller.)
    8267                 :            :  *
    8268                 :            :  * The caller must not modify or free the returned value.
    8269                 :            :  *
    8270                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8271                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8272                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8273                 :            :  * of it with ovsdb_datum_clone().
    8274                 :            :  *
    8275                 :            :  * This function is rarely useful, since it is easier to access the value
    8276                 :            :  * directly through the "description" member in vteprec_logical_router. */
    8277                 :            : const struct ovsdb_datum *
    8278                 :          0 : vteprec_logical_router_get_description(const struct vteprec_logical_router *row,
    8279                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    8280                 :            : {
    8281         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8282                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_description);
    8283                 :            : }
    8284                 :            : 
    8285                 :            : /* Returns the "name" column's value from the "Logical_Router" table in 'row'
    8286                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8287                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8288                 :            :  * for a given key than implementing the same operation on the "cooked"
    8289                 :            :  * form in 'row'.
    8290                 :            :  *
    8291                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8292                 :            :  * (This helps to avoid silent bugs if someone changes name's
    8293                 :            :  * type without updating the caller.)
    8294                 :            :  *
    8295                 :            :  * The caller must not modify or free the returned value.
    8296                 :            :  *
    8297                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8298                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8299                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8300                 :            :  * of it with ovsdb_datum_clone().
    8301                 :            :  *
    8302                 :            :  * This function is rarely useful, since it is easier to access the value
    8303                 :            :  * directly through the "name" member in vteprec_logical_router. */
    8304                 :            : const struct ovsdb_datum *
    8305                 :          0 : vteprec_logical_router_get_name(const struct vteprec_logical_router *row,
    8306                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    8307                 :            : {
    8308         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8309                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_name);
    8310                 :            : }
    8311                 :            : 
    8312                 :            : /* Returns the "other_config" column's value from the "Logical_Router" table in 'row'
    8313                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8314                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8315                 :            :  * for a given key than implementing the same operation on the "cooked"
    8316                 :            :  * form in 'row'.
    8317                 :            :  *
    8318                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8319                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
    8320                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
    8321                 :            :  * type without updating the caller.)
    8322                 :            :  *
    8323                 :            :  * The caller must not modify or free the returned value.
    8324                 :            :  *
    8325                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8326                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8327                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8328                 :            :  * of it with ovsdb_datum_clone().
    8329                 :            :  *
    8330                 :            :  * This function is rarely useful, since it is easier to access the value
    8331                 :            :  * directly through the "other_config" member in vteprec_logical_router. */
    8332                 :            : const struct ovsdb_datum *
    8333                 :          0 : vteprec_logical_router_get_other_config(const struct vteprec_logical_router *row,
    8334                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    8335                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    8336                 :            : {
    8337         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8338         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
    8339                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_other_config);
    8340                 :            : }
    8341                 :            : 
    8342                 :            : /* Returns the "static_routes" column's value from the "Logical_Router" table in 'row'
    8343                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8344                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8345                 :            :  * for a given key than implementing the same operation on the "cooked"
    8346                 :            :  * form in 'row'.
    8347                 :            :  *
    8348                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8349                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
    8350                 :            :  * (This helps to avoid silent bugs if someone changes static_routes's
    8351                 :            :  * type without updating the caller.)
    8352                 :            :  *
    8353                 :            :  * The caller must not modify or free the returned value.
    8354                 :            :  *
    8355                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8356                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8357                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8358                 :            :  * of it with ovsdb_datum_clone().
    8359                 :            :  *
    8360                 :            :  * This function is rarely useful, since it is easier to access the value
    8361                 :            :  * directly through the "static_routes" member in vteprec_logical_router. */
    8362                 :            : const struct ovsdb_datum *
    8363                 :          0 : vteprec_logical_router_get_static_routes(const struct vteprec_logical_router *row,
    8364                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    8365                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    8366                 :            : {
    8367         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8368         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
    8369                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_static_routes);
    8370                 :            : }
    8371                 :            : 
    8372                 :            : /* Returns the "switch_binding" column's value from the "Logical_Router" table in 'row'
    8373                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    8374                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    8375                 :            :  * for a given key than implementing the same operation on the "cooked"
    8376                 :            :  * form in 'row'.
    8377                 :            :  *
    8378                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    8379                 :            :  * 'value_type' must be OVSDB_TYPE_UUID.
    8380                 :            :  * (This helps to avoid silent bugs if someone changes switch_binding's
    8381                 :            :  * type without updating the caller.)
    8382                 :            :  *
    8383                 :            :  * The caller must not modify or free the returned value.
    8384                 :            :  *
    8385                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    8386                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    8387                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    8388                 :            :  * of it with ovsdb_datum_clone().
    8389                 :            :  *
    8390                 :            :  * This function is rarely useful, since it is easier to access the value
    8391                 :            :  * directly through the "switch_binding" member in vteprec_logical_router. */
    8392                 :            : const struct ovsdb_datum *
    8393                 :          0 : vteprec_logical_router_get_switch_binding(const struct vteprec_logical_router *row,
    8394                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    8395                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    8396                 :            : {
    8397         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    8398         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_UUID);
    8399                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_router_col_switch_binding);
    8400                 :            : }
    8401                 :            : 
    8402                 :            : /* Sets the "LR_fault_status" column from the "Logical_Router" table in 'row' to
    8403                 :            :  * the 'LR_fault_status' set with 'n_LR_fault_status' entries.
    8404                 :            :  *
    8405                 :            :  * The caller retains ownership of the arguments. */
    8406                 :            : void
    8407                 :          0 : vteprec_logical_router_set_LR_fault_status(const struct vteprec_logical_router *row, const char **LR_fault_status, size_t n_LR_fault_status)
    8408                 :            : {
    8409                 :            :     struct ovsdb_datum datum;
    8410                 :            :     size_t i;
    8411                 :            : 
    8412         [ #  # ]:          0 :     ovs_assert(inited);
    8413                 :          0 :     datum.n = n_LR_fault_status;
    8414         [ #  # ]:          0 :     datum.keys = n_LR_fault_status ? xmalloc(n_LR_fault_status * sizeof *datum.keys) : NULL;
    8415                 :          0 :     datum.values = NULL;
    8416         [ #  # ]:          0 :     for (i = 0; i < n_LR_fault_status; i++) {
    8417                 :          0 :         datum.keys[i].string = xstrdup(LR_fault_status[i]);
    8418                 :            :     }
    8419                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    8420                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS], &datum);
    8421                 :          0 : }
    8422                 :            : 
    8423                 :            : /* Sets the "acl_binding" column from the "Logical_Router" table in 'row' to
    8424                 :            :  * the map with keys 'key_acl_binding' and values 'value_acl_binding'
    8425                 :            :  * with 'n_acl_binding' entries.
    8426                 :            :  *
    8427                 :            :  * The caller retains ownership of the arguments. */
    8428                 :            : void
    8429                 :          0 : vteprec_logical_router_set_acl_binding(const struct vteprec_logical_router *row, const char **key_acl_binding, struct vteprec_acl **value_acl_binding, size_t n_acl_binding)
    8430                 :            : {
    8431                 :            :     struct ovsdb_datum datum;
    8432                 :            :     size_t i;
    8433                 :            : 
    8434         [ #  # ]:          0 :     ovs_assert(inited);
    8435                 :          0 :     datum.n = n_acl_binding;
    8436         [ #  # ]:          0 :     datum.keys = n_acl_binding ? xmalloc(n_acl_binding * sizeof *datum.keys) : NULL;
    8437                 :          0 :     datum.values = xmalloc(n_acl_binding * sizeof *datum.values);
    8438         [ #  # ]:          0 :     for (i = 0; i < n_acl_binding; i++) {
    8439                 :          0 :         datum.keys[i].string = xstrdup(key_acl_binding[i]);
    8440                 :          0 :         datum.values[i].uuid = value_acl_binding[i]->header_.uuid;
    8441                 :            :     }
    8442                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    8443                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING], &datum);
    8444                 :          0 : }
    8445                 :            : 
    8446                 :            : /* Sets the "description" column from the "Logical_Router" table in 'row' to
    8447                 :            :  * 'description'.
    8448                 :            :  *
    8449                 :            :  * The caller retains ownership of the arguments. */
    8450                 :            : void
    8451                 :          0 : vteprec_logical_router_set_description(const struct vteprec_logical_router *row, const char *description)
    8452                 :            : {
    8453                 :            :     struct ovsdb_datum datum;
    8454                 :            :     union ovsdb_atom key;
    8455                 :            : 
    8456         [ #  # ]:          0 :     ovs_assert(inited);
    8457                 :          0 :     datum.n = 1;
    8458                 :          0 :     datum.keys = &key;
    8459                 :          0 :     key.string = CONST_CAST(char *, description);
    8460                 :          0 :     datum.values = NULL;
    8461                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_DESCRIPTION], &datum);
    8462                 :          0 : }
    8463                 :            : 
    8464                 :            : /* Sets the "name" column from the "Logical_Router" table in 'row' to
    8465                 :            :  * 'name'.
    8466                 :            :  *
    8467                 :            :  * The caller retains ownership of the arguments. */
    8468                 :            : void
    8469                 :          0 : vteprec_logical_router_set_name(const struct vteprec_logical_router *row, const char *name)
    8470                 :            : {
    8471                 :            :     struct ovsdb_datum datum;
    8472                 :            :     union ovsdb_atom key;
    8473                 :            : 
    8474         [ #  # ]:          0 :     ovs_assert(inited);
    8475                 :          0 :     datum.n = 1;
    8476                 :          0 :     datum.keys = &key;
    8477                 :          0 :     key.string = CONST_CAST(char *, name);
    8478                 :          0 :     datum.values = NULL;
    8479                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_NAME], &datum);
    8480                 :          0 : }
    8481                 :            : 
    8482                 :            : /* Sets the "other_config" column's value from the "Logical_Router" table in 'row'
    8483                 :            :  * to 'other_config'.
    8484                 :            :  *
    8485                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    8486                 :            : void
    8487                 :          0 : vteprec_logical_router_set_other_config(const struct vteprec_logical_router *row, const struct smap *other_config)
    8488                 :            : {
    8489                 :            :     struct ovsdb_datum datum;
    8490                 :            : 
    8491         [ #  # ]:          0 :     ovs_assert(inited);
    8492         [ #  # ]:          0 :     if (other_config) {
    8493                 :            :         struct smap_node *node;
    8494                 :            :         size_t i;
    8495                 :            : 
    8496                 :          0 :         datum.n = smap_count(other_config);
    8497                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    8498                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    8499                 :            : 
    8500                 :          0 :         i = 0;
    8501 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    8502                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    8503                 :          0 :             datum.values[i].string = xstrdup(node->value);
    8504                 :          0 :             i++;
    8505                 :            :         }
    8506                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    8507                 :            :     } else {
    8508                 :          0 :         ovsdb_datum_init_empty(&datum);
    8509                 :            :     }
    8510                 :          0 :     ovsdb_idl_txn_write(&row->header_,
    8511                 :            :                         &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG],
    8512                 :            :                         &datum);
    8513                 :          0 : }
    8514                 :            : 
    8515                 :            : 
    8516                 :            : /* Sets the "static_routes" column's value from the "Logical_Router" table in 'row'
    8517                 :            :  * to 'static_routes'.
    8518                 :            :  *
    8519                 :            :  * The caller retains ownership of 'static_routes' and everything in it. */
    8520                 :            : void
    8521                 :          0 : vteprec_logical_router_set_static_routes(const struct vteprec_logical_router *row, const struct smap *static_routes)
    8522                 :            : {
    8523                 :            :     struct ovsdb_datum datum;
    8524                 :            : 
    8525         [ #  # ]:          0 :     ovs_assert(inited);
    8526         [ #  # ]:          0 :     if (static_routes) {
    8527                 :            :         struct smap_node *node;
    8528                 :            :         size_t i;
    8529                 :            : 
    8530                 :          0 :         datum.n = smap_count(static_routes);
    8531                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    8532                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    8533                 :            : 
    8534                 :          0 :         i = 0;
    8535 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, static_routes) {
    8536                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    8537                 :          0 :             datum.values[i].string = xstrdup(node->value);
    8538                 :          0 :             i++;
    8539                 :            :         }
    8540                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    8541                 :            :     } else {
    8542                 :          0 :         ovsdb_datum_init_empty(&datum);
    8543                 :            :     }
    8544                 :          0 :     ovsdb_idl_txn_write(&row->header_,
    8545                 :            :                         &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES],
    8546                 :            :                         &datum);
    8547                 :          0 : }
    8548                 :            : 
    8549                 :            : 
    8550                 :            : /* Sets the "switch_binding" column from the "Logical_Router" table in 'row' to
    8551                 :            :  * the map with keys 'key_switch_binding' and values 'value_switch_binding'
    8552                 :            :  * with 'n_switch_binding' entries.
    8553                 :            :  *
    8554                 :            :  * The caller retains ownership of the arguments. */
    8555                 :            : void
    8556                 :          0 : vteprec_logical_router_set_switch_binding(const struct vteprec_logical_router *row, const char **key_switch_binding, struct vteprec_logical_switch **value_switch_binding, size_t n_switch_binding)
    8557                 :            : {
    8558                 :            :     struct ovsdb_datum datum;
    8559                 :            :     size_t i;
    8560                 :            : 
    8561         [ #  # ]:          0 :     ovs_assert(inited);
    8562                 :          0 :     datum.n = n_switch_binding;
    8563         [ #  # ]:          0 :     datum.keys = n_switch_binding ? xmalloc(n_switch_binding * sizeof *datum.keys) : NULL;
    8564                 :          0 :     datum.values = xmalloc(n_switch_binding * sizeof *datum.values);
    8565         [ #  # ]:          0 :     for (i = 0; i < n_switch_binding; i++) {
    8566                 :          0 :         datum.keys[i].string = xstrdup(key_switch_binding[i]);
    8567                 :          0 :         datum.values[i].uuid = value_switch_binding[i]->header_.uuid;
    8568                 :            :     }
    8569                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    8570                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING], &datum);
    8571                 :          0 : }
    8572                 :            : 
    8573                 :            : /* Adds the value 'new_value' to the "LR_fault_status" set column from the "Logical_Router" table
    8574                 :            :  * in 'row'.
    8575                 :            :  *
    8576                 :            :  */
    8577                 :            : void
    8578                 :          0 : vteprec_logical_router_update_LR_fault_status_addvalue(const struct vteprec_logical_router *row, const char *new_value)
    8579                 :            : {
    8580                 :            :     struct ovsdb_datum *datum;
    8581                 :            : 
    8582         [ #  # ]:          0 :     ovs_assert(inited);
    8583                 :            : 
    8584                 :          0 :     datum = xmalloc(sizeof *datum);
    8585                 :          0 :     datum->n = 1;
    8586                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    8587                 :          0 :     datum->values = NULL;
    8588                 :            : 
    8589                 :          0 :     datum->keys[0].string = xstrdup(new_value);
    8590                 :            : 
    8591                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
    8592                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS],
    8593                 :            :                                     datum);
    8594                 :          0 : }
    8595                 :            : 
    8596                 :            : /* Deletes the value 'delete_value' from the "LR_fault_status" set column from the
    8597                 :            :  * "Logical_Router" table in 'row'.
    8598                 :            :  *
    8599                 :            :  */
    8600                 :            : void
    8601                 :          0 : vteprec_logical_router_update_LR_fault_status_delvalue(const struct vteprec_logical_router *row, const char *delete_value)
    8602                 :            : {
    8603                 :            :     struct ovsdb_datum *datum;
    8604                 :            : 
    8605         [ #  # ]:          0 :     ovs_assert(inited);
    8606                 :            : 
    8607                 :          0 :     datum = xmalloc(sizeof *datum);
    8608                 :          0 :     datum->n = 1;
    8609                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
    8610                 :          0 :     datum->values = NULL;
    8611                 :            : 
    8612                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
    8613                 :            : 
    8614                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
    8615                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS],
    8616                 :            :                                     datum);
    8617                 :          0 : }
    8618                 :            : 
    8619                 :            : /* Sets an element of the "acl_binding" map column from the "Logical_Router" table in 'row'
    8620                 :            :  * to 'new_value' given the key value 'new_key'.
    8621                 :            :  *
    8622                 :            :  */
    8623                 :            : void
    8624                 :          0 : vteprec_logical_router_update_acl_binding_setkey(const struct vteprec_logical_router *row, const char *new_key, const struct vteprec_acl *new_value)
    8625                 :            : {
    8626                 :            :     struct ovsdb_datum *datum;
    8627                 :            : 
    8628         [ #  # ]:          0 :     ovs_assert(inited);
    8629                 :            : 
    8630                 :          0 :     datum = xmalloc(sizeof *datum);
    8631                 :          0 :     datum->n = 1;
    8632                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8633                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    8634                 :            : 
    8635                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    8636                 :          0 :     datum->values[0].uuid = new_value->header_.uuid;
    8637                 :            : 
    8638                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    8639                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING],
    8640                 :            :                                     datum);
    8641                 :          0 : }
    8642                 :            : 
    8643                 :            : /* Deletes an element of the "acl_binding" map column from the "Logical_Router" table in 'row'
    8644                 :            :  * given the key value 'delete_key'.
    8645                 :            :  *
    8646                 :            :  */
    8647                 :            : void
    8648                 :          0 : vteprec_logical_router_update_acl_binding_delkey(const struct vteprec_logical_router *row, const char *delete_key)
    8649                 :            : {
    8650                 :            :     struct ovsdb_datum *datum;
    8651                 :            : 
    8652         [ #  # ]:          0 :     ovs_assert(inited);
    8653                 :            : 
    8654                 :          0 :     datum = xmalloc(sizeof *datum);
    8655                 :          0 :     datum->n = 1;
    8656                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8657                 :          0 :     datum->values = NULL;
    8658                 :            : 
    8659                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
    8660                 :            : 
    8661                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
    8662                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING],
    8663                 :            :                                     datum);
    8664                 :          0 : }
    8665                 :            : 
    8666                 :            : /* Sets an element of the "other_config" map column from the "Logical_Router" table in 'row'
    8667                 :            :  * to 'new_value' given the key value 'new_key'.
    8668                 :            :  *
    8669                 :            :  */
    8670                 :            : void
    8671                 :          0 : vteprec_logical_router_update_other_config_setkey(const struct vteprec_logical_router *row, const char *new_key, const char *new_value)
    8672                 :            : {
    8673                 :            :     struct ovsdb_datum *datum;
    8674                 :            : 
    8675         [ #  # ]:          0 :     ovs_assert(inited);
    8676                 :            : 
    8677                 :          0 :     datum = xmalloc(sizeof *datum);
    8678                 :          0 :     datum->n = 1;
    8679                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8680                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    8681                 :            : 
    8682                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    8683                 :          0 :     datum->values[0].string = xstrdup(new_value);
    8684                 :            : 
    8685                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    8686                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG],
    8687                 :            :                                     datum);
    8688                 :          0 : }
    8689                 :            : 
    8690                 :            : /* Deletes an element of the "other_config" map column from the "Logical_Router" table in 'row'
    8691                 :            :  * given the key value 'delete_key'.
    8692                 :            :  *
    8693                 :            :  */
    8694                 :            : void
    8695                 :          0 : vteprec_logical_router_update_other_config_delkey(const struct vteprec_logical_router *row, const char *delete_key)
    8696                 :            : {
    8697                 :            :     struct ovsdb_datum *datum;
    8698                 :            : 
    8699         [ #  # ]:          0 :     ovs_assert(inited);
    8700                 :            : 
    8701                 :          0 :     datum = xmalloc(sizeof *datum);
    8702                 :          0 :     datum->n = 1;
    8703                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8704                 :          0 :     datum->values = NULL;
    8705                 :            : 
    8706                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
    8707                 :            : 
    8708                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
    8709                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG],
    8710                 :            :                                     datum);
    8711                 :          0 : }
    8712                 :            : 
    8713                 :            : /* Sets an element of the "static_routes" map column from the "Logical_Router" table in 'row'
    8714                 :            :  * to 'new_value' given the key value 'new_key'.
    8715                 :            :  *
    8716                 :            :  */
    8717                 :            : void
    8718                 :          0 : vteprec_logical_router_update_static_routes_setkey(const struct vteprec_logical_router *row, const char *new_key, const char *new_value)
    8719                 :            : {
    8720                 :            :     struct ovsdb_datum *datum;
    8721                 :            : 
    8722         [ #  # ]:          0 :     ovs_assert(inited);
    8723                 :            : 
    8724                 :          0 :     datum = xmalloc(sizeof *datum);
    8725                 :          0 :     datum->n = 1;
    8726                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8727                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    8728                 :            : 
    8729                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    8730                 :          0 :     datum->values[0].string = xstrdup(new_value);
    8731                 :            : 
    8732                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    8733                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES],
    8734                 :            :                                     datum);
    8735                 :          0 : }
    8736                 :            : 
    8737                 :            : /* Deletes an element of the "static_routes" map column from the "Logical_Router" table in 'row'
    8738                 :            :  * given the key value 'delete_key'.
    8739                 :            :  *
    8740                 :            :  */
    8741                 :            : void
    8742                 :          0 : vteprec_logical_router_update_static_routes_delkey(const struct vteprec_logical_router *row, const char *delete_key)
    8743                 :            : {
    8744                 :            :     struct ovsdb_datum *datum;
    8745                 :            : 
    8746         [ #  # ]:          0 :     ovs_assert(inited);
    8747                 :            : 
    8748                 :          0 :     datum = xmalloc(sizeof *datum);
    8749                 :          0 :     datum->n = 1;
    8750                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8751                 :          0 :     datum->values = NULL;
    8752                 :            : 
    8753                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
    8754                 :            : 
    8755                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
    8756                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES],
    8757                 :            :                                     datum);
    8758                 :          0 : }
    8759                 :            : 
    8760                 :            : /* Sets an element of the "switch_binding" map column from the "Logical_Router" table in 'row'
    8761                 :            :  * to 'new_value' given the key value 'new_key'.
    8762                 :            :  *
    8763                 :            :  */
    8764                 :            : void
    8765                 :          0 : vteprec_logical_router_update_switch_binding_setkey(const struct vteprec_logical_router *row, const char *new_key, const struct vteprec_logical_switch *new_value)
    8766                 :            : {
    8767                 :            :     struct ovsdb_datum *datum;
    8768                 :            : 
    8769         [ #  # ]:          0 :     ovs_assert(inited);
    8770                 :            : 
    8771                 :          0 :     datum = xmalloc(sizeof *datum);
    8772                 :          0 :     datum->n = 1;
    8773                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8774                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    8775                 :            : 
    8776                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    8777                 :          0 :     datum->values[0].uuid = new_value->header_.uuid;
    8778                 :            : 
    8779                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    8780                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING],
    8781                 :            :                                     datum);
    8782                 :          0 : }
    8783                 :            : 
    8784                 :            : /* Deletes an element of the "switch_binding" map column from the "Logical_Router" table in 'row'
    8785                 :            :  * given the key value 'delete_key'.
    8786                 :            :  *
    8787                 :            :  */
    8788                 :            : void
    8789                 :          0 : vteprec_logical_router_update_switch_binding_delkey(const struct vteprec_logical_router *row, const char *delete_key)
    8790                 :            : {
    8791                 :            :     struct ovsdb_datum *datum;
    8792                 :            : 
    8793         [ #  # ]:          0 :     ovs_assert(inited);
    8794                 :            : 
    8795                 :          0 :     datum = xmalloc(sizeof *datum);
    8796                 :          0 :     datum->n = 1;
    8797                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    8798                 :          0 :     datum->values = NULL;
    8799                 :            : 
    8800                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
    8801                 :            : 
    8802                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
    8803                 :            :                                     &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING],
    8804                 :            :                                     datum);
    8805                 :          0 : }
    8806                 :            : 
    8807                 :            : /* Sets the "LR_fault_status" column from the "Logical_Router" table in 'row' to
    8808                 :            :  * the 'LR_fault_status' set with 'n_LR_fault_status' entries.
    8809                 :            :  *
    8810                 :            :  * The caller retains ownership of the arguments. */
    8811                 :            : void
    8812                 :          0 : vteprec_logical_router_add_clause_LR_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **LR_fault_status, size_t n_LR_fault_status)
    8813                 :            : {
    8814                 :            :     struct ovsdb_datum datum;
    8815                 :            :     size_t i;
    8816                 :            : 
    8817         [ #  # ]:          0 :     ovs_assert(inited);
    8818                 :          0 :     datum.n = n_LR_fault_status;
    8819         [ #  # ]:          0 :     datum.keys = n_LR_fault_status ? xmalloc(n_LR_fault_status * sizeof *datum.keys) : NULL;
    8820                 :          0 :     datum.values = NULL;
    8821         [ #  # ]:          0 :     for (i = 0; i < n_LR_fault_status; i++) {
    8822                 :          0 :         datum.keys[i].string = CONST_CAST(char *, LR_fault_status[i]);
    8823                 :            :     }
    8824                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    8825                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8826                 :            :                           function,
    8827                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS],
    8828                 :            :                           &datum);
    8829                 :          0 :     free(datum.keys);
    8830                 :          0 : }
    8831                 :            : 
    8832                 :            : /* Sets the "acl_binding" column from the "Logical_Router" table in 'row' to
    8833                 :            :  * the map with keys 'key_acl_binding' and values 'value_acl_binding'
    8834                 :            :  * with 'n_acl_binding' entries.
    8835                 :            :  *
    8836                 :            :  * The caller retains ownership of the arguments. */
    8837                 :            : void
    8838                 :          0 : vteprec_logical_router_add_clause_acl_binding(struct ovsdb_idl *idl, enum ovsdb_function function, const char **key_acl_binding, struct uuid **value_acl_binding, size_t n_acl_binding)
    8839                 :            : {
    8840                 :            :     struct ovsdb_datum datum;
    8841                 :            :     size_t i;
    8842                 :            : 
    8843         [ #  # ]:          0 :     ovs_assert(inited);
    8844                 :          0 :     datum.n = n_acl_binding;
    8845         [ #  # ]:          0 :     datum.keys = n_acl_binding ? xmalloc(n_acl_binding * sizeof *datum.keys) : NULL;
    8846                 :          0 :     datum.values = xmalloc(n_acl_binding * sizeof *datum.values);
    8847         [ #  # ]:          0 :     for (i = 0; i < n_acl_binding; i++) {
    8848                 :          0 :         datum.keys[i].string = CONST_CAST(char *, key_acl_binding[i]);
    8849                 :          0 :         datum.values[i].uuid = *value_acl_binding[i];
    8850                 :            :     }
    8851                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    8852                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8853                 :            :                           function,
    8854                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING],
    8855                 :            :                           &datum);
    8856                 :          0 :     free(datum.keys);
    8857                 :          0 :     free(datum.values);
    8858                 :          0 : }
    8859                 :            : 
    8860                 :            : /* Sets the "description" column from the "Logical_Router" table in 'row' to
    8861                 :            :  * 'description'.
    8862                 :            :  *
    8863                 :            :  * The caller retains ownership of the arguments. */
    8864                 :            : void
    8865                 :          0 : vteprec_logical_router_add_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
    8866                 :            : {
    8867                 :            :     struct ovsdb_datum datum;
    8868                 :            :     union ovsdb_atom key;
    8869                 :            : 
    8870         [ #  # ]:          0 :     ovs_assert(inited);
    8871                 :          0 :     datum.n = 1;
    8872                 :          0 :     datum.keys = &key;
    8873                 :          0 :     key.string = CONST_CAST(char *, description);
    8874                 :          0 :     datum.values = NULL;
    8875                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8876                 :            :                           function,
    8877                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_DESCRIPTION],
    8878                 :            :                           &datum);
    8879                 :          0 : }
    8880                 :            : 
    8881                 :            : /* Sets the "name" column from the "Logical_Router" table in 'row' to
    8882                 :            :  * 'name'.
    8883                 :            :  *
    8884                 :            :  * The caller retains ownership of the arguments. */
    8885                 :            : void
    8886                 :          0 : vteprec_logical_router_add_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
    8887                 :            : {
    8888                 :            :     struct ovsdb_datum datum;
    8889                 :            :     union ovsdb_atom key;
    8890                 :            : 
    8891         [ #  # ]:          0 :     ovs_assert(inited);
    8892                 :          0 :     datum.n = 1;
    8893                 :          0 :     datum.keys = &key;
    8894                 :          0 :     key.string = CONST_CAST(char *, name);
    8895                 :          0 :     datum.values = NULL;
    8896                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8897                 :            :                           function,
    8898                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_NAME],
    8899                 :            :                           &datum);
    8900                 :          0 : }
    8901                 :            : 
    8902                 :            : /* Sets the "other_config" column's value from the "Logical_Router" table in 'row'
    8903                 :            :  * to 'other_config'.
    8904                 :            :  *
    8905                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    8906                 :            : void
    8907                 :          0 : vteprec_logical_router_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
    8908                 :            : {
    8909                 :            :     struct ovsdb_datum datum;
    8910                 :            : 
    8911         [ #  # ]:          0 :     ovs_assert(inited);
    8912         [ #  # ]:          0 :     if (other_config) {
    8913                 :            :         struct smap_node *node;
    8914                 :            :         size_t i;
    8915                 :            : 
    8916                 :          0 :         datum.n = smap_count(other_config);
    8917                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    8918                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    8919                 :            : 
    8920                 :          0 :         i = 0;
    8921 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    8922                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    8923                 :          0 :             datum.values[i].string = xstrdup(node->value);
    8924                 :          0 :             i++;
    8925                 :            :         }
    8926                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    8927                 :            :     } else {
    8928                 :          0 :         ovsdb_datum_init_empty(&datum);
    8929                 :            :     }
    8930                 :            : 
    8931                 :          0 :     ovsdb_idl_condition_add_clause(idl,
    8932                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8933                 :            :                                    function,
    8934                 :            :                                    &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG],
    8935                 :            :                                    &datum);
    8936                 :            : 
    8937                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_router_col_other_config.type);
    8938                 :          0 : }
    8939                 :            : 
    8940                 :            : 
    8941                 :            : /* Sets the "static_routes" column's value from the "Logical_Router" table in 'row'
    8942                 :            :  * to 'static_routes'.
    8943                 :            :  *
    8944                 :            :  * The caller retains ownership of 'static_routes' and everything in it. */
    8945                 :            : void
    8946                 :          0 : vteprec_logical_router_add_clause_static_routes(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *static_routes)
    8947                 :            : {
    8948                 :            :     struct ovsdb_datum datum;
    8949                 :            : 
    8950         [ #  # ]:          0 :     ovs_assert(inited);
    8951         [ #  # ]:          0 :     if (static_routes) {
    8952                 :            :         struct smap_node *node;
    8953                 :            :         size_t i;
    8954                 :            : 
    8955                 :          0 :         datum.n = smap_count(static_routes);
    8956                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    8957                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    8958                 :            : 
    8959                 :          0 :         i = 0;
    8960 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, static_routes) {
    8961                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    8962                 :          0 :             datum.values[i].string = xstrdup(node->value);
    8963                 :          0 :             i++;
    8964                 :            :         }
    8965                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    8966                 :            :     } else {
    8967                 :          0 :         ovsdb_datum_init_empty(&datum);
    8968                 :            :     }
    8969                 :            : 
    8970                 :          0 :     ovsdb_idl_condition_add_clause(idl,
    8971                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    8972                 :            :                                    function,
    8973                 :            :                                    &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES],
    8974                 :            :                                    &datum);
    8975                 :            : 
    8976                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_router_col_static_routes.type);
    8977                 :          0 : }
    8978                 :            : 
    8979                 :            : 
    8980                 :            : /* Sets the "switch_binding" column from the "Logical_Router" table in 'row' to
    8981                 :            :  * the map with keys 'key_switch_binding' and values 'value_switch_binding'
    8982                 :            :  * with 'n_switch_binding' entries.
    8983                 :            :  *
    8984                 :            :  * The caller retains ownership of the arguments. */
    8985                 :            : void
    8986                 :          0 : vteprec_logical_router_add_clause_switch_binding(struct ovsdb_idl *idl, enum ovsdb_function function, const char **key_switch_binding, struct uuid **value_switch_binding, size_t n_switch_binding)
    8987                 :            : {
    8988                 :            :     struct ovsdb_datum datum;
    8989                 :            :     size_t i;
    8990                 :            : 
    8991         [ #  # ]:          0 :     ovs_assert(inited);
    8992                 :          0 :     datum.n = n_switch_binding;
    8993         [ #  # ]:          0 :     datum.keys = n_switch_binding ? xmalloc(n_switch_binding * sizeof *datum.keys) : NULL;
    8994                 :          0 :     datum.values = xmalloc(n_switch_binding * sizeof *datum.values);
    8995         [ #  # ]:          0 :     for (i = 0; i < n_switch_binding; i++) {
    8996                 :          0 :         datum.keys[i].string = CONST_CAST(char *, key_switch_binding[i]);
    8997                 :          0 :         datum.values[i].uuid = *value_switch_binding[i];
    8998                 :            :     }
    8999                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    9000                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9001                 :            :                           function,
    9002                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING],
    9003                 :            :                           &datum);
    9004                 :          0 :     free(datum.keys);
    9005                 :          0 :     free(datum.values);
    9006                 :          0 : }
    9007                 :            : void
    9008                 :          0 : vteprec_logical_router_add_clause_false(struct ovsdb_idl *idl)
    9009                 :            : {
    9010                 :            :     struct ovsdb_datum datum;
    9011                 :            : 
    9012                 :          0 :     ovsdb_datum_init_empty(&datum);
    9013                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], OVSDB_F_FALSE, NULL, &datum);
    9014                 :          0 : }
    9015                 :            : void
    9016                 :          0 : vteprec_logical_router_add_clause_true(struct ovsdb_idl *idl)
    9017                 :            : {
    9018                 :            :     struct ovsdb_datum datum;
    9019                 :            : 
    9020                 :          0 :     ovsdb_datum_init_empty(&datum);
    9021                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], OVSDB_F_TRUE, NULL, &datum);
    9022                 :          0 : }
    9023                 :            : 
    9024                 :            : /* Sets the "LR_fault_status" column from the "Logical_Router" table in 'row' to
    9025                 :            :  * the 'LR_fault_status' set with 'n_LR_fault_status' entries.
    9026                 :            :  *
    9027                 :            :  * The caller retains ownership of the arguments. */
    9028                 :            : void
    9029                 :          0 : vteprec_logical_router_remove_clause_LR_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **LR_fault_status, size_t n_LR_fault_status)
    9030                 :            : {
    9031                 :            :     struct ovsdb_datum datum;
    9032                 :            :     size_t i;
    9033                 :            : 
    9034         [ #  # ]:          0 :     ovs_assert(inited);
    9035                 :          0 :     datum.n = n_LR_fault_status;
    9036         [ #  # ]:          0 :     datum.keys = n_LR_fault_status ? xmalloc(n_LR_fault_status * sizeof *datum.keys) : NULL;
    9037                 :          0 :     datum.values = NULL;
    9038         [ #  # ]:          0 :     for (i = 0; i < n_LR_fault_status; i++) {
    9039                 :          0 :         datum.keys[i].string = CONST_CAST(char *, LR_fault_status[i]);
    9040                 :            :     }
    9041                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
    9042                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9043                 :            :                           function,
    9044                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_LR_FAULT_STATUS],
    9045                 :            :                           &datum);
    9046                 :          0 :     free(datum.keys);
    9047                 :          0 : }
    9048                 :            : 
    9049                 :            : /* Sets the "acl_binding" column from the "Logical_Router" table in 'row' to
    9050                 :            :  * the map with keys 'key_acl_binding' and values 'value_acl_binding'
    9051                 :            :  * with 'n_acl_binding' entries.
    9052                 :            :  *
    9053                 :            :  * The caller retains ownership of the arguments. */
    9054                 :            : void
    9055                 :          0 : vteprec_logical_router_remove_clause_acl_binding(struct ovsdb_idl *idl, enum ovsdb_function function, const char **key_acl_binding, struct uuid **value_acl_binding, size_t n_acl_binding)
    9056                 :            : {
    9057                 :            :     struct ovsdb_datum datum;
    9058                 :            :     size_t i;
    9059                 :            : 
    9060         [ #  # ]:          0 :     ovs_assert(inited);
    9061                 :          0 :     datum.n = n_acl_binding;
    9062         [ #  # ]:          0 :     datum.keys = n_acl_binding ? xmalloc(n_acl_binding * sizeof *datum.keys) : NULL;
    9063                 :          0 :     datum.values = xmalloc(n_acl_binding * sizeof *datum.values);
    9064         [ #  # ]:          0 :     for (i = 0; i < n_acl_binding; i++) {
    9065                 :          0 :         datum.keys[i].string = CONST_CAST(char *, key_acl_binding[i]);
    9066                 :          0 :         datum.values[i].uuid = *value_acl_binding[i];
    9067                 :            :     }
    9068                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    9069                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9070                 :            :                           function,
    9071                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_ACL_BINDING],
    9072                 :            :                           &datum);
    9073                 :          0 :     free(datum.keys);
    9074                 :          0 :     free(datum.values);
    9075                 :          0 : }
    9076                 :            : 
    9077                 :            : /* Sets the "description" column from the "Logical_Router" table in 'row' to
    9078                 :            :  * 'description'.
    9079                 :            :  *
    9080                 :            :  * The caller retains ownership of the arguments. */
    9081                 :            : void
    9082                 :          0 : vteprec_logical_router_remove_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
    9083                 :            : {
    9084                 :            :     struct ovsdb_datum datum;
    9085                 :            :     union ovsdb_atom key;
    9086                 :            : 
    9087         [ #  # ]:          0 :     ovs_assert(inited);
    9088                 :          0 :     datum.n = 1;
    9089                 :          0 :     datum.keys = &key;
    9090                 :          0 :     key.string = CONST_CAST(char *, description);
    9091                 :          0 :     datum.values = NULL;
    9092                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9093                 :            :                           function,
    9094                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_DESCRIPTION],
    9095                 :            :                           &datum);
    9096                 :          0 : }
    9097                 :            : 
    9098                 :            : /* Sets the "name" column from the "Logical_Router" table in 'row' to
    9099                 :            :  * 'name'.
    9100                 :            :  *
    9101                 :            :  * The caller retains ownership of the arguments. */
    9102                 :            : void
    9103                 :          0 : vteprec_logical_router_remove_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
    9104                 :            : {
    9105                 :            :     struct ovsdb_datum datum;
    9106                 :            :     union ovsdb_atom key;
    9107                 :            : 
    9108         [ #  # ]:          0 :     ovs_assert(inited);
    9109                 :          0 :     datum.n = 1;
    9110                 :          0 :     datum.keys = &key;
    9111                 :          0 :     key.string = CONST_CAST(char *, name);
    9112                 :          0 :     datum.values = NULL;
    9113                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9114                 :            :                           function,
    9115                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_NAME],
    9116                 :            :                           &datum);
    9117                 :          0 : }
    9118                 :            : 
    9119                 :            : /* Sets the "other_config" column's value from the "Logical_Router" table in 'row'
    9120                 :            :  * to 'other_config'.
    9121                 :            :  *
    9122                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    9123                 :            : void
    9124                 :          0 : vteprec_logical_router_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
    9125                 :            : {
    9126                 :            :     struct ovsdb_datum datum;
    9127                 :            : 
    9128         [ #  # ]:          0 :     ovs_assert(inited);
    9129         [ #  # ]:          0 :     if (other_config) {
    9130                 :            :         struct smap_node *node;
    9131                 :            :         size_t i;
    9132                 :            : 
    9133                 :          0 :         datum.n = smap_count(other_config);
    9134                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    9135                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    9136                 :            : 
    9137                 :          0 :         i = 0;
    9138 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    9139                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    9140                 :          0 :             datum.values[i].string = xstrdup(node->value);
    9141                 :          0 :             i++;
    9142                 :            :         }
    9143                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    9144                 :            :     } else {
    9145                 :          0 :         ovsdb_datum_init_empty(&datum);
    9146                 :            :     }
    9147                 :            : 
    9148                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9149                 :            :                                       function,
    9150                 :            :                                       &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_OTHER_CONFIG],
    9151                 :            :                                       &datum);
    9152                 :            : 
    9153                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_router_col_other_config.type);
    9154                 :          0 : }
    9155                 :            : 
    9156                 :            : 
    9157                 :            : /* Sets the "static_routes" column's value from the "Logical_Router" table in 'row'
    9158                 :            :  * to 'static_routes'.
    9159                 :            :  *
    9160                 :            :  * The caller retains ownership of 'static_routes' and everything in it. */
    9161                 :            : void
    9162                 :          0 : vteprec_logical_router_remove_clause_static_routes(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *static_routes)
    9163                 :            : {
    9164                 :            :     struct ovsdb_datum datum;
    9165                 :            : 
    9166         [ #  # ]:          0 :     ovs_assert(inited);
    9167         [ #  # ]:          0 :     if (static_routes) {
    9168                 :            :         struct smap_node *node;
    9169                 :            :         size_t i;
    9170                 :            : 
    9171                 :          0 :         datum.n = smap_count(static_routes);
    9172                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    9173                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    9174                 :            : 
    9175                 :          0 :         i = 0;
    9176 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, static_routes) {
    9177                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    9178                 :          0 :             datum.values[i].string = xstrdup(node->value);
    9179                 :          0 :             i++;
    9180                 :            :         }
    9181                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    9182                 :            :     } else {
    9183                 :          0 :         ovsdb_datum_init_empty(&datum);
    9184                 :            :     }
    9185                 :            : 
    9186                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9187                 :            :                                       function,
    9188                 :            :                                       &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_STATIC_ROUTES],
    9189                 :            :                                       &datum);
    9190                 :            : 
    9191                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_router_col_static_routes.type);
    9192                 :          0 : }
    9193                 :            : 
    9194                 :            : 
    9195                 :            : /* Sets the "switch_binding" column from the "Logical_Router" table in 'row' to
    9196                 :            :  * the map with keys 'key_switch_binding' and values 'value_switch_binding'
    9197                 :            :  * with 'n_switch_binding' entries.
    9198                 :            :  *
    9199                 :            :  * The caller retains ownership of the arguments. */
    9200                 :            : void
    9201                 :          0 : vteprec_logical_router_remove_clause_switch_binding(struct ovsdb_idl *idl, enum ovsdb_function function, const char **key_switch_binding, struct uuid **value_switch_binding, size_t n_switch_binding)
    9202                 :            : {
    9203                 :            :     struct ovsdb_datum datum;
    9204                 :            :     size_t i;
    9205                 :            : 
    9206         [ #  # ]:          0 :     ovs_assert(inited);
    9207                 :          0 :     datum.n = n_switch_binding;
    9208         [ #  # ]:          0 :     datum.keys = n_switch_binding ? xmalloc(n_switch_binding * sizeof *datum.keys) : NULL;
    9209                 :          0 :     datum.values = xmalloc(n_switch_binding * sizeof *datum.values);
    9210         [ #  # ]:          0 :     for (i = 0; i < n_switch_binding; i++) {
    9211                 :          0 :         datum.keys[i].string = CONST_CAST(char *, key_switch_binding[i]);
    9212                 :          0 :         datum.values[i].uuid = *value_switch_binding[i];
    9213                 :            :     }
    9214                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_UUID);
    9215                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER],
    9216                 :            :                           function,
    9217                 :            :                           &vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_COL_SWITCH_BINDING],
    9218                 :            :                           &datum);
    9219                 :          0 :     free(datum.keys);
    9220                 :          0 :     free(datum.values);
    9221                 :          0 : }
    9222                 :            : void
    9223                 :          0 : vteprec_logical_router_remove_clause_false(struct ovsdb_idl *idl)
    9224                 :            : {
    9225                 :            :     struct ovsdb_datum datum;
    9226                 :            : 
    9227                 :          0 :     ovsdb_datum_init_empty(&datum);
    9228                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], OVSDB_F_FALSE, NULL, &datum);
    9229                 :          0 : }
    9230                 :            : void
    9231                 :          0 : vteprec_logical_router_remove_clause_true(struct ovsdb_idl *idl)
    9232                 :            : {
    9233                 :            :     struct ovsdb_datum datum;
    9234                 :            : 
    9235                 :          0 :     ovsdb_datum_init_empty(&datum);
    9236                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_ROUTER], OVSDB_F_TRUE, NULL, &datum);
    9237                 :          0 : }
    9238                 :            : 
    9239                 :            : struct ovsdb_idl_column vteprec_logical_router_columns[VTEPREC_LOGICAL_ROUTER_N_COLUMNS];
    9240                 :            : 
    9241                 :            : static void
    9242                 :        741 : vteprec_logical_router_columns_init(void)
    9243                 :            : {
    9244                 :            :     struct ovsdb_idl_column *c;
    9245                 :            : 
    9246                 :            :     /* Initialize vteprec_logical_router_col_LR_fault_status. */
    9247                 :        741 :     c = &vteprec_logical_router_col_LR_fault_status;
    9248                 :        741 :     c->name = "LR_fault_status";
    9249                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9250                 :        741 :     c->type.key.u.string.minLen = 0;
    9251                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    9252                 :        741 :     c->type.n_min = 0;
    9253                 :        741 :     c->type.n_max = UINT_MAX;
    9254                 :        741 :     c->mutable = true;
    9255                 :        741 :     c->parse = vteprec_logical_router_parse_LR_fault_status;
    9256                 :        741 :     c->unparse = vteprec_logical_router_unparse_LR_fault_status;
    9257                 :            : 
    9258                 :            :     /* Initialize vteprec_logical_router_col_acl_binding. */
    9259                 :        741 :     c = &vteprec_logical_router_col_acl_binding;
    9260                 :        741 :     c->name = "acl_binding";
    9261                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9262                 :        741 :     c->type.key.u.string.minLen = 0;
    9263                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_UUID);
    9264                 :        741 :     c->type.value.u.uuid.refTableName = "ACL";
    9265                 :        741 :     c->type.value.u.uuid.refType = OVSDB_REF_STRONG;
    9266                 :        741 :     c->type.n_min = 0;
    9267                 :        741 :     c->type.n_max = UINT_MAX;
    9268                 :        741 :     c->mutable = true;
    9269                 :        741 :     c->parse = vteprec_logical_router_parse_acl_binding;
    9270                 :        741 :     c->unparse = vteprec_logical_router_unparse_acl_binding;
    9271                 :            : 
    9272                 :            :     /* Initialize vteprec_logical_router_col_description. */
    9273                 :        741 :     c = &vteprec_logical_router_col_description;
    9274                 :        741 :     c->name = "description";
    9275                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9276                 :        741 :     c->type.key.u.string.minLen = 0;
    9277                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    9278                 :        741 :     c->type.n_min = 1;
    9279                 :        741 :     c->type.n_max = 1;
    9280                 :        741 :     c->mutable = true;
    9281                 :        741 :     c->parse = vteprec_logical_router_parse_description;
    9282                 :        741 :     c->unparse = vteprec_logical_router_unparse_description;
    9283                 :            : 
    9284                 :            :     /* Initialize vteprec_logical_router_col_name. */
    9285                 :        741 :     c = &vteprec_logical_router_col_name;
    9286                 :        741 :     c->name = "name";
    9287                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9288                 :        741 :     c->type.key.u.string.minLen = 0;
    9289                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
    9290                 :        741 :     c->type.n_min = 1;
    9291                 :        741 :     c->type.n_max = 1;
    9292                 :        741 :     c->mutable = true;
    9293                 :        741 :     c->parse = vteprec_logical_router_parse_name;
    9294                 :        741 :     c->unparse = vteprec_logical_router_unparse_name;
    9295                 :            : 
    9296                 :            :     /* Initialize vteprec_logical_router_col_other_config. */
    9297                 :        741 :     c = &vteprec_logical_router_col_other_config;
    9298                 :        741 :     c->name = "other_config";
    9299                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9300                 :        741 :     c->type.key.u.string.minLen = 0;
    9301                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
    9302                 :        741 :     c->type.value.u.string.minLen = 0;
    9303                 :        741 :     c->type.n_min = 0;
    9304                 :        741 :     c->type.n_max = UINT_MAX;
    9305                 :        741 :     c->mutable = true;
    9306                 :        741 :     c->parse = vteprec_logical_router_parse_other_config;
    9307                 :        741 :     c->unparse = vteprec_logical_router_unparse_other_config;
    9308                 :            : 
    9309                 :            :     /* Initialize vteprec_logical_router_col_static_routes. */
    9310                 :        741 :     c = &vteprec_logical_router_col_static_routes;
    9311                 :        741 :     c->name = "static_routes";
    9312                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9313                 :        741 :     c->type.key.u.string.minLen = 0;
    9314                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
    9315                 :        741 :     c->type.value.u.string.minLen = 0;
    9316                 :        741 :     c->type.n_min = 0;
    9317                 :        741 :     c->type.n_max = UINT_MAX;
    9318                 :        741 :     c->mutable = true;
    9319                 :        741 :     c->parse = vteprec_logical_router_parse_static_routes;
    9320                 :        741 :     c->unparse = vteprec_logical_router_unparse_static_routes;
    9321                 :            : 
    9322                 :            :     /* Initialize vteprec_logical_router_col_switch_binding. */
    9323                 :        741 :     c = &vteprec_logical_router_col_switch_binding;
    9324                 :        741 :     c->name = "switch_binding";
    9325                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
    9326                 :        741 :     c->type.key.u.string.minLen = 0;
    9327                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_UUID);
    9328                 :        741 :     c->type.value.u.uuid.refTableName = "Logical_Switch";
    9329                 :        741 :     c->type.value.u.uuid.refType = OVSDB_REF_STRONG;
    9330                 :        741 :     c->type.n_min = 0;
    9331                 :        741 :     c->type.n_max = UINT_MAX;
    9332                 :        741 :     c->mutable = true;
    9333                 :        741 :     c->parse = vteprec_logical_router_parse_switch_binding;
    9334                 :        741 :     c->unparse = vteprec_logical_router_unparse_switch_binding;
    9335                 :        741 : }
    9336                 :            : 
    9337                 :            : /* Logical_Switch table. */
    9338                 :            : 
    9339                 :            : static void
    9340                 :        754 : vteprec_logical_switch_parse_description(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    9341                 :            : {
    9342                 :        754 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9343                 :            : 
    9344         [ -  + ]:        754 :     ovs_assert(inited);
    9345         [ +  - ]:        754 :     if (datum->n >= 1) {
    9346                 :        754 :         row->description = datum->keys[0].string;
    9347                 :            :     } else {
    9348                 :          0 :         row->description = "";
    9349                 :            :     }
    9350                 :        754 : }
    9351                 :            : 
    9352                 :            : static void
    9353                 :        795 : vteprec_logical_switch_parse_name(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    9354                 :            : {
    9355                 :        795 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9356                 :            : 
    9357         [ -  + ]:        795 :     ovs_assert(inited);
    9358         [ +  - ]:        795 :     if (datum->n >= 1) {
    9359                 :        795 :         row->name = datum->keys[0].string;
    9360                 :            :     } else {
    9361                 :          0 :         row->name = "";
    9362                 :            :     }
    9363                 :        795 : }
    9364                 :            : 
    9365                 :            : static void
    9366                 :        754 : vteprec_logical_switch_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    9367                 :            : {
    9368                 :        754 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9369                 :            :     size_t i;
    9370                 :            : 
    9371         [ -  + ]:        754 :     ovs_assert(inited);
    9372                 :        754 :     smap_init(&row->other_config);
    9373         [ -  + ]:        754 :     for (i = 0; i < datum->n; i++) {
    9374                 :          0 :         smap_add(&row->other_config,
    9375                 :          0 :                  datum->keys[i].string,
    9376                 :          0 :                  datum->values[i].string);
    9377                 :            :     }
    9378                 :        754 : }
    9379                 :            : 
    9380                 :            : static void
    9381                 :        901 : vteprec_logical_switch_parse_replication_mode(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    9382                 :            : {
    9383                 :        901 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9384                 :            : 
    9385         [ -  + ]:        901 :     ovs_assert(inited);
    9386         [ +  + ]:        901 :     if (datum->n >= 1) {
    9387                 :        431 :         row->replication_mode = datum->keys[0].string;
    9388                 :            :     } else {
    9389                 :        470 :         row->replication_mode = NULL;
    9390                 :            :     }
    9391                 :        901 : }
    9392                 :            : 
    9393                 :            : static void
    9394                 :        996 : vteprec_logical_switch_parse_tunnel_key(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
    9395                 :            : {
    9396                 :        996 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9397                 :        996 :     size_t n = MIN(1, datum->n);
    9398                 :            :     size_t i;
    9399                 :            : 
    9400         [ -  + ]:        996 :     ovs_assert(inited);
    9401                 :        996 :     row->tunnel_key = NULL;
    9402                 :        996 :     row->n_tunnel_key = 0;
    9403         [ +  + ]:       1509 :     for (i = 0; i < n; i++) {
    9404         [ +  - ]:        513 :         if (!row->n_tunnel_key) {
    9405                 :        513 :             row->tunnel_key = xmalloc(n * sizeof *row->tunnel_key);
    9406                 :            :         }
    9407                 :        513 :         row->tunnel_key[row->n_tunnel_key] = datum->keys[i].integer;
    9408                 :        513 :         row->n_tunnel_key++;
    9409                 :            :     }
    9410                 :        996 : }
    9411                 :            : 
    9412                 :            : static void
    9413                 :        795 : vteprec_logical_switch_unparse_description(struct ovsdb_idl_row *row OVS_UNUSED)
    9414                 :            : {
    9415                 :            :     /* Nothing to do. */
    9416                 :        795 : }
    9417                 :            : 
    9418                 :            : static void
    9419                 :        836 : vteprec_logical_switch_unparse_name(struct ovsdb_idl_row *row OVS_UNUSED)
    9420                 :            : {
    9421                 :            :     /* Nothing to do. */
    9422                 :        836 : }
    9423                 :            : 
    9424                 :            : static void
    9425                 :        795 : vteprec_logical_switch_unparse_other_config(struct ovsdb_idl_row *row_)
    9426                 :            : {
    9427                 :        795 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9428                 :            : 
    9429         [ -  + ]:        795 :     ovs_assert(inited);
    9430                 :        795 :     smap_destroy(&row->other_config);
    9431                 :        795 : }
    9432                 :            : 
    9433                 :            : static void
    9434                 :        942 : vteprec_logical_switch_unparse_replication_mode(struct ovsdb_idl_row *row OVS_UNUSED)
    9435                 :            : {
    9436                 :            :     /* Nothing to do. */
    9437                 :        942 : }
    9438                 :            : 
    9439                 :            : static void
    9440                 :       1037 : vteprec_logical_switch_unparse_tunnel_key(struct ovsdb_idl_row *row_)
    9441                 :            : {
    9442                 :       1037 :     struct vteprec_logical_switch *row = vteprec_logical_switch_cast(row_);
    9443                 :            : 
    9444         [ -  + ]:       1037 :     ovs_assert(inited);
    9445                 :       1037 :     free(row->tunnel_key);
    9446                 :       1037 : }
    9447                 :            : 
    9448                 :            : static void
    9449                 :        519 : vteprec_logical_switch_init__(struct ovsdb_idl_row *row)
    9450                 :            : {
    9451                 :        519 :     vteprec_logical_switch_init(vteprec_logical_switch_cast(row));
    9452                 :        519 : }
    9453                 :            : 
    9454                 :            : /* Clears the contents of 'row' in table "Logical_Switch". */
    9455                 :            : void
    9456                 :        519 : vteprec_logical_switch_init(struct vteprec_logical_switch *row)
    9457                 :            : {
    9458                 :        519 :     memset(row, 0, sizeof *row); 
    9459                 :        519 :     smap_init(&row->other_config);
    9460                 :        519 : }
    9461                 :            : 
    9462                 :            : /* Searches table "Logical_Switch" in 'idl' for a row with UUID 'uuid'.  Returns
    9463                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
    9464                 :            : const struct vteprec_logical_switch *
    9465                 :          0 : vteprec_logical_switch_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
    9466                 :            : {
    9467                 :          0 :     return vteprec_logical_switch_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], uuid));
    9468                 :            : }
    9469                 :            : 
    9470                 :            : /* Returns a row in table "Logical_Switch" in 'idl', or a null pointer if that
    9471                 :            :  * table is empty.
    9472                 :            :  *
    9473                 :            :  * Database tables are internally maintained as hash tables, so adding or
    9474                 :            :  * removing rows while traversing the same table can cause some rows to be
    9475                 :            :  * visited twice or not at apply. */
    9476                 :            : const struct vteprec_logical_switch *
    9477                 :        719 : vteprec_logical_switch_first(const struct ovsdb_idl *idl)
    9478                 :            : {
    9479                 :        719 :     return vteprec_logical_switch_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH]));
    9480                 :            : }
    9481                 :            : 
    9482                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
    9483                 :            :  * is the last row in its table. */
    9484                 :            : const struct vteprec_logical_switch *
    9485                 :        641 : vteprec_logical_switch_next(const struct vteprec_logical_switch *row)
    9486                 :            : {
    9487                 :        641 :     return vteprec_logical_switch_cast(ovsdb_idl_next_row(&row->header_));
    9488                 :            : }
    9489                 :            : 
    9490                 :          0 : unsigned int vteprec_logical_switch_get_seqno(const struct ovsdb_idl *idl)
    9491                 :            : {
    9492                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH]);
    9493                 :            : }
    9494                 :            : 
    9495                 :          0 : unsigned int vteprec_logical_switch_row_get_seqno(const struct vteprec_logical_switch *row, enum ovsdb_idl_change change)
    9496                 :            : {
    9497                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
    9498                 :            : }
    9499                 :            : 
    9500                 :            : const struct vteprec_logical_switch *
    9501                 :          0 : vteprec_logical_switch_track_get_first(const struct ovsdb_idl *idl)
    9502                 :            : {
    9503                 :          0 :     return vteprec_logical_switch_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH]));
    9504                 :            : }
    9505                 :            : 
    9506                 :            : const struct vteprec_logical_switch
    9507                 :          0 : *vteprec_logical_switch_track_get_next(const struct vteprec_logical_switch *row)
    9508                 :            : {
    9509                 :          0 :     return vteprec_logical_switch_cast(ovsdb_idl_track_get_next(&row->header_));
    9510                 :            : }
    9511                 :            : 
    9512                 :            : 
    9513                 :            : /* Deletes 'row' from table "Logical_Switch".  'row' may be freed, so it must not be
    9514                 :            :  * accessed afterward.
    9515                 :            :  *
    9516                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9517                 :            : void
    9518                 :          2 : vteprec_logical_switch_delete(const struct vteprec_logical_switch *row)
    9519                 :            : {
    9520                 :          2 :     ovsdb_idl_txn_delete(&row->header_);
    9521                 :          2 : }
    9522                 :            : 
    9523                 :            : /* Inserts and returns a new row in the table "Logical_Switch" in the database
    9524                 :            :  * with open transaction 'txn'.
    9525                 :            :  *
    9526                 :            :  * The new row is assigned a randomly generated provisional UUID.
    9527                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
    9528                 :            :  * but the IDL will replace any uses of the provisional UUID in the
    9529                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
    9530                 :            : struct vteprec_logical_switch *
    9531                 :         41 : vteprec_logical_switch_insert(struct ovsdb_idl_txn *txn)
    9532                 :            : {
    9533                 :         41 :     return vteprec_logical_switch_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], NULL));
    9534                 :            : }
    9535                 :            : 
    9536                 :            : bool
    9537                 :          0 : vteprec_logical_switch_is_updated(const struct vteprec_logical_switch *row, enum vteprec_logical_switch_column_id column)
    9538                 :            : {
    9539                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_logical_switch_columns[column]);
    9540                 :            : }
    9541                 :            : 
    9542                 :            : /* Causes the original contents of column "description" in 'row' to be
    9543                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    9544                 :            :  * "description" in 'row' changed (or if 'row' was deleted) between the
    9545                 :            :  * time that the IDL originally read its contents and the time that the
    9546                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    9547                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    9548                 :            :  * change has already been received).
    9549                 :            :  *
    9550                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    9551                 :            :  * reads, an application should call this function any time "description" is
    9552                 :            :  * read as part of a read-modify-write operation.
    9553                 :            :  *
    9554                 :            :  * In some cases this function reduces to a no-op, because the current value
    9555                 :            :  * of "description" is already known:
    9556                 :            :  *
    9557                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    9558                 :            :  *     vteprec_logical_switch_insert()).
    9559                 :            :  *
    9560                 :            :  *   - If "description" has already been modified (with
    9561                 :            :  *     vteprec_logical_switch_set_description()) within the current transaction.
    9562                 :            :  *
    9563                 :            :  * Because of the latter property, always call this function *before*
    9564                 :            :  * vteprec_logical_switch_set_description() for a given read-modify-write.
    9565                 :            :  *
    9566                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9567                 :            : void
    9568                 :          0 : vteprec_logical_switch_verify_description(const struct vteprec_logical_switch *row)
    9569                 :            : {
    9570         [ #  # ]:          0 :     ovs_assert(inited);
    9571                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_DESCRIPTION]);
    9572                 :          0 : }
    9573                 :            : 
    9574                 :            : /* Causes the original contents of column "name" in 'row' to be
    9575                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    9576                 :            :  * "name" in 'row' changed (or if 'row' was deleted) between the
    9577                 :            :  * time that the IDL originally read its contents and the time that the
    9578                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    9579                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    9580                 :            :  * change has already been received).
    9581                 :            :  *
    9582                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    9583                 :            :  * reads, an application should call this function any time "name" is
    9584                 :            :  * read as part of a read-modify-write operation.
    9585                 :            :  *
    9586                 :            :  * In some cases this function reduces to a no-op, because the current value
    9587                 :            :  * of "name" is already known:
    9588                 :            :  *
    9589                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    9590                 :            :  *     vteprec_logical_switch_insert()).
    9591                 :            :  *
    9592                 :            :  *   - If "name" has already been modified (with
    9593                 :            :  *     vteprec_logical_switch_set_name()) within the current transaction.
    9594                 :            :  *
    9595                 :            :  * Because of the latter property, always call this function *before*
    9596                 :            :  * vteprec_logical_switch_set_name() for a given read-modify-write.
    9597                 :            :  *
    9598                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9599                 :            : void
    9600                 :          0 : vteprec_logical_switch_verify_name(const struct vteprec_logical_switch *row)
    9601                 :            : {
    9602         [ #  # ]:          0 :     ovs_assert(inited);
    9603                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_NAME]);
    9604                 :          0 : }
    9605                 :            : 
    9606                 :            : /* Causes the original contents of column "other_config" in 'row' to be
    9607                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    9608                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
    9609                 :            :  * time that the IDL originally read its contents and the time that the
    9610                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    9611                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    9612                 :            :  * change has already been received).
    9613                 :            :  *
    9614                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    9615                 :            :  * reads, an application should call this function any time "other_config" is
    9616                 :            :  * read as part of a read-modify-write operation.
    9617                 :            :  *
    9618                 :            :  * In some cases this function reduces to a no-op, because the current value
    9619                 :            :  * of "other_config" is already known:
    9620                 :            :  *
    9621                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    9622                 :            :  *     vteprec_logical_switch_insert()).
    9623                 :            :  *
    9624                 :            :  *   - If "other_config" has already been modified (with
    9625                 :            :  *     vteprec_logical_switch_set_other_config()) within the current transaction.
    9626                 :            :  *
    9627                 :            :  * Because of the latter property, always call this function *before*
    9628                 :            :  * vteprec_logical_switch_set_other_config() for a given read-modify-write.
    9629                 :            :  *
    9630                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9631                 :            : void
    9632                 :          0 : vteprec_logical_switch_verify_other_config(const struct vteprec_logical_switch *row)
    9633                 :            : {
    9634         [ #  # ]:          0 :     ovs_assert(inited);
    9635                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG]);
    9636                 :          0 : }
    9637                 :            : 
    9638                 :            : /* Causes the original contents of column "replication_mode" in 'row' to be
    9639                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    9640                 :            :  * "replication_mode" in 'row' changed (or if 'row' was deleted) between the
    9641                 :            :  * time that the IDL originally read its contents and the time that the
    9642                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    9643                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    9644                 :            :  * change has already been received).
    9645                 :            :  *
    9646                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    9647                 :            :  * reads, an application should call this function any time "replication_mode" is
    9648                 :            :  * read as part of a read-modify-write operation.
    9649                 :            :  *
    9650                 :            :  * In some cases this function reduces to a no-op, because the current value
    9651                 :            :  * of "replication_mode" is already known:
    9652                 :            :  *
    9653                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    9654                 :            :  *     vteprec_logical_switch_insert()).
    9655                 :            :  *
    9656                 :            :  *   - If "replication_mode" has already been modified (with
    9657                 :            :  *     vteprec_logical_switch_set_replication_mode()) within the current transaction.
    9658                 :            :  *
    9659                 :            :  * Because of the latter property, always call this function *before*
    9660                 :            :  * vteprec_logical_switch_set_replication_mode() for a given read-modify-write.
    9661                 :            :  *
    9662                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9663                 :            : void
    9664                 :          0 : vteprec_logical_switch_verify_replication_mode(const struct vteprec_logical_switch *row)
    9665                 :            : {
    9666         [ #  # ]:          0 :     ovs_assert(inited);
    9667                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE]);
    9668                 :          0 : }
    9669                 :            : 
    9670                 :            : /* Causes the original contents of column "tunnel_key" in 'row' to be
    9671                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
    9672                 :            :  * "tunnel_key" in 'row' changed (or if 'row' was deleted) between the
    9673                 :            :  * time that the IDL originally read its contents and the time that the
    9674                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
    9675                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
    9676                 :            :  * change has already been received).
    9677                 :            :  *
    9678                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
    9679                 :            :  * reads, an application should call this function any time "tunnel_key" is
    9680                 :            :  * read as part of a read-modify-write operation.
    9681                 :            :  *
    9682                 :            :  * In some cases this function reduces to a no-op, because the current value
    9683                 :            :  * of "tunnel_key" is already known:
    9684                 :            :  *
    9685                 :            :  *   - If 'row' is a row created by the current transaction (returned by
    9686                 :            :  *     vteprec_logical_switch_insert()).
    9687                 :            :  *
    9688                 :            :  *   - If "tunnel_key" has already been modified (with
    9689                 :            :  *     vteprec_logical_switch_set_tunnel_key()) within the current transaction.
    9690                 :            :  *
    9691                 :            :  * Because of the latter property, always call this function *before*
    9692                 :            :  * vteprec_logical_switch_set_tunnel_key() for a given read-modify-write.
    9693                 :            :  *
    9694                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
    9695                 :            : void
    9696                 :          0 : vteprec_logical_switch_verify_tunnel_key(const struct vteprec_logical_switch *row)
    9697                 :            : {
    9698         [ #  # ]:          0 :     ovs_assert(inited);
    9699                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY]);
    9700                 :          0 : }
    9701                 :            : 
    9702                 :            : /* Returns the "description" column's value from the "Logical_Switch" table in 'row'
    9703                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    9704                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    9705                 :            :  * for a given key than implementing the same operation on the "cooked"
    9706                 :            :  * form in 'row'.
    9707                 :            :  *
    9708                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    9709                 :            :  * (This helps to avoid silent bugs if someone changes description's
    9710                 :            :  * type without updating the caller.)
    9711                 :            :  *
    9712                 :            :  * The caller must not modify or free the returned value.
    9713                 :            :  *
    9714                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    9715                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    9716                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    9717                 :            :  * of it with ovsdb_datum_clone().
    9718                 :            :  *
    9719                 :            :  * This function is rarely useful, since it is easier to access the value
    9720                 :            :  * directly through the "description" member in vteprec_logical_switch. */
    9721                 :            : const struct ovsdb_datum *
    9722                 :          0 : vteprec_logical_switch_get_description(const struct vteprec_logical_switch *row,
    9723                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    9724                 :            : {
    9725         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    9726                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_switch_col_description);
    9727                 :            : }
    9728                 :            : 
    9729                 :            : /* Returns the "name" column's value from the "Logical_Switch" table in 'row'
    9730                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    9731                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    9732                 :            :  * for a given key than implementing the same operation on the "cooked"
    9733                 :            :  * form in 'row'.
    9734                 :            :  *
    9735                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    9736                 :            :  * (This helps to avoid silent bugs if someone changes name's
    9737                 :            :  * type without updating the caller.)
    9738                 :            :  *
    9739                 :            :  * The caller must not modify or free the returned value.
    9740                 :            :  *
    9741                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    9742                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    9743                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    9744                 :            :  * of it with ovsdb_datum_clone().
    9745                 :            :  *
    9746                 :            :  * This function is rarely useful, since it is easier to access the value
    9747                 :            :  * directly through the "name" member in vteprec_logical_switch. */
    9748                 :            : const struct ovsdb_datum *
    9749                 :          0 : vteprec_logical_switch_get_name(const struct vteprec_logical_switch *row,
    9750                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    9751                 :            : {
    9752         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    9753                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_switch_col_name);
    9754                 :            : }
    9755                 :            : 
    9756                 :            : /* Returns the "other_config" column's value from the "Logical_Switch" table in 'row'
    9757                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    9758                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    9759                 :            :  * for a given key than implementing the same operation on the "cooked"
    9760                 :            :  * form in 'row'.
    9761                 :            :  *
    9762                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    9763                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
    9764                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
    9765                 :            :  * type without updating the caller.)
    9766                 :            :  *
    9767                 :            :  * The caller must not modify or free the returned value.
    9768                 :            :  *
    9769                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    9770                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    9771                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    9772                 :            :  * of it with ovsdb_datum_clone().
    9773                 :            :  *
    9774                 :            :  * This function is rarely useful, since it is easier to access the value
    9775                 :            :  * directly through the "other_config" member in vteprec_logical_switch. */
    9776                 :            : const struct ovsdb_datum *
    9777                 :          0 : vteprec_logical_switch_get_other_config(const struct vteprec_logical_switch *row,
    9778                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
    9779                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
    9780                 :            : {
    9781         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    9782         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
    9783                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_switch_col_other_config);
    9784                 :            : }
    9785                 :            : 
    9786                 :            : /* Returns the "replication_mode" column's value from the "Logical_Switch" table in 'row'
    9787                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    9788                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    9789                 :            :  * for a given key than implementing the same operation on the "cooked"
    9790                 :            :  * form in 'row'.
    9791                 :            :  *
    9792                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
    9793                 :            :  * (This helps to avoid silent bugs if someone changes replication_mode's
    9794                 :            :  * type without updating the caller.)
    9795                 :            :  *
    9796                 :            :  * The caller must not modify or free the returned value.
    9797                 :            :  *
    9798                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    9799                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    9800                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    9801                 :            :  * of it with ovsdb_datum_clone().
    9802                 :            :  *
    9803                 :            :  * This function is rarely useful, since it is easier to access the value
    9804                 :            :  * directly through the "replication_mode" member in vteprec_logical_switch. */
    9805                 :            : const struct ovsdb_datum *
    9806                 :          0 : vteprec_logical_switch_get_replication_mode(const struct vteprec_logical_switch *row,
    9807                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    9808                 :            : {
    9809         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
    9810                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_switch_col_replication_mode);
    9811                 :            : }
    9812                 :            : 
    9813                 :            : /* Returns the "tunnel_key" column's value from the "Logical_Switch" table in 'row'
    9814                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
    9815                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
    9816                 :            :  * for a given key than implementing the same operation on the "cooked"
    9817                 :            :  * form in 'row'.
    9818                 :            :  *
    9819                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
    9820                 :            :  * (This helps to avoid silent bugs if someone changes tunnel_key's
    9821                 :            :  * type without updating the caller.)
    9822                 :            :  *
    9823                 :            :  * The caller must not modify or free the returned value.
    9824                 :            :  *
    9825                 :            :  * Various kinds of changes can invalidate the returned value: modifying
    9826                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
    9827                 :            :  * If the returned value is needed for a long time, it is best to make a copy
    9828                 :            :  * of it with ovsdb_datum_clone().
    9829                 :            :  *
    9830                 :            :  * This function is rarely useful, since it is easier to access the value
    9831                 :            :  * directly through the "tunnel_key" member in vteprec_logical_switch. */
    9832                 :            : const struct ovsdb_datum *
    9833                 :          0 : vteprec_logical_switch_get_tunnel_key(const struct vteprec_logical_switch *row,
    9834                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
    9835                 :            : {
    9836         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
    9837                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_logical_switch_col_tunnel_key);
    9838                 :            : }
    9839                 :            : 
    9840                 :            : /* Sets the "description" column from the "Logical_Switch" table in 'row' to
    9841                 :            :  * 'description'.
    9842                 :            :  *
    9843                 :            :  * The caller retains ownership of the arguments. */
    9844                 :            : void
    9845                 :          0 : vteprec_logical_switch_set_description(const struct vteprec_logical_switch *row, const char *description)
    9846                 :            : {
    9847                 :            :     struct ovsdb_datum datum;
    9848                 :            :     union ovsdb_atom key;
    9849                 :            : 
    9850         [ #  # ]:          0 :     ovs_assert(inited);
    9851                 :          0 :     datum.n = 1;
    9852                 :          0 :     datum.keys = &key;
    9853                 :          0 :     key.string = CONST_CAST(char *, description);
    9854                 :          0 :     datum.values = NULL;
    9855                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_DESCRIPTION], &datum);
    9856                 :          0 : }
    9857                 :            : 
    9858                 :            : /* Sets the "name" column from the "Logical_Switch" table in 'row' to
    9859                 :            :  * 'name'.
    9860                 :            :  *
    9861                 :            :  * The caller retains ownership of the arguments. */
    9862                 :            : void
    9863                 :         41 : vteprec_logical_switch_set_name(const struct vteprec_logical_switch *row, const char *name)
    9864                 :            : {
    9865                 :            :     struct ovsdb_datum datum;
    9866                 :            :     union ovsdb_atom key;
    9867                 :            : 
    9868         [ -  + ]:         41 :     ovs_assert(inited);
    9869                 :         41 :     datum.n = 1;
    9870                 :         41 :     datum.keys = &key;
    9871                 :         41 :     key.string = CONST_CAST(char *, name);
    9872                 :         41 :     datum.values = NULL;
    9873                 :         41 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_NAME], &datum);
    9874                 :         41 : }
    9875                 :            : 
    9876                 :            : /* Sets the "other_config" column's value from the "Logical_Switch" table in 'row'
    9877                 :            :  * to 'other_config'.
    9878                 :            :  *
    9879                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
    9880                 :            : void
    9881                 :          0 : vteprec_logical_switch_set_other_config(const struct vteprec_logical_switch *row, const struct smap *other_config)
    9882                 :            : {
    9883                 :            :     struct ovsdb_datum datum;
    9884                 :            : 
    9885         [ #  # ]:          0 :     ovs_assert(inited);
    9886         [ #  # ]:          0 :     if (other_config) {
    9887                 :            :         struct smap_node *node;
    9888                 :            :         size_t i;
    9889                 :            : 
    9890                 :          0 :         datum.n = smap_count(other_config);
    9891                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
    9892                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
    9893                 :            : 
    9894                 :          0 :         i = 0;
    9895 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
    9896                 :          0 :             datum.keys[i].string = xstrdup(node->key);
    9897                 :          0 :             datum.values[i].string = xstrdup(node->value);
    9898                 :          0 :             i++;
    9899                 :            :         }
    9900                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
    9901                 :            :     } else {
    9902                 :          0 :         ovsdb_datum_init_empty(&datum);
    9903                 :            :     }
    9904                 :          0 :     ovsdb_idl_txn_write(&row->header_,
    9905                 :            :                         &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG],
    9906                 :            :                         &datum);
    9907                 :          0 : }
    9908                 :            : 
    9909                 :            : 
    9910                 :            : /* Sets the "replication_mode" column from the "Logical_Switch" table in 'row' to
    9911                 :            :  * the 'replication_mode' set.
    9912                 :            :  *
    9913                 :            :  * If "replication_mode" is null, the column will be the empty set,
    9914                 :            :  * otherwise it will contain the specified value.
    9915                 :            :  *
    9916                 :            :  * Argument constraints: either "service_node" or "source_node"
    9917                 :            :  *
    9918                 :            :  * The caller retains ownership of the arguments. */
    9919                 :            : void
    9920                 :        147 : vteprec_logical_switch_set_replication_mode(const struct vteprec_logical_switch *row, const char *replication_mode)
    9921                 :            : {
    9922                 :            :     struct ovsdb_datum datum;
    9923                 :            :     union ovsdb_atom key;
    9924                 :            : 
    9925         [ -  + ]:        147 :     ovs_assert(inited);
    9926         [ +  - ]:        147 :     if (replication_mode) {
    9927                 :        147 :         datum.n = 1;
    9928                 :        147 :         datum.keys = &key;
    9929                 :        147 :         key.string = CONST_CAST(char *, replication_mode);
    9930                 :            :     } else {
    9931                 :          0 :         datum.n = 0;
    9932                 :          0 :         datum.keys = NULL;
    9933                 :            :     }
    9934                 :        147 :     datum.values = NULL;
    9935                 :        147 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE], &datum);
    9936                 :        147 : }
    9937                 :            : 
    9938                 :            : /* Sets the "tunnel_key" column from the "Logical_Switch" table in 'row' to
    9939                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
    9940                 :            :  *
    9941                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
    9942                 :            :  * may be NULL.
    9943                 :            :  *
    9944                 :            :  * The caller retains ownership of the arguments. */
    9945                 :            : void
    9946                 :        242 : vteprec_logical_switch_set_tunnel_key(const struct vteprec_logical_switch *row, const int64_t *tunnel_key, size_t n_tunnel_key)
    9947                 :            : {
    9948                 :            :     struct ovsdb_datum datum;
    9949                 :            :     union ovsdb_atom key;
    9950                 :            : 
    9951         [ -  + ]:        242 :     ovs_assert(inited);
    9952         [ +  + ]:        242 :     if (n_tunnel_key) {
    9953                 :        232 :         datum.n = 1;
    9954                 :        232 :         datum.keys = &key;
    9955                 :        232 :         key.integer = *tunnel_key;
    9956                 :            :     } else {
    9957                 :         10 :         datum.n = 0;
    9958                 :         10 :         datum.keys = NULL;
    9959                 :            :     }
    9960                 :        242 :     datum.values = NULL;
    9961                 :        242 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY], &datum);
    9962                 :        242 : }
    9963                 :            : 
    9964                 :            : /* Sets an element of the "other_config" map column from the "Logical_Switch" table in 'row'
    9965                 :            :  * to 'new_value' given the key value 'new_key'.
    9966                 :            :  *
    9967                 :            :  */
    9968                 :            : void
    9969                 :          0 : vteprec_logical_switch_update_other_config_setkey(const struct vteprec_logical_switch *row, const char *new_key, const char *new_value)
    9970                 :            : {
    9971                 :            :     struct ovsdb_datum *datum;
    9972                 :            : 
    9973         [ #  # ]:          0 :     ovs_assert(inited);
    9974                 :            : 
    9975                 :          0 :     datum = xmalloc(sizeof *datum);
    9976                 :          0 :     datum->n = 1;
    9977                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
    9978                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
    9979                 :            : 
    9980                 :          0 :     datum->keys[0].string = xstrdup(new_key);
    9981                 :          0 :     datum->values[0].string = xstrdup(new_value);
    9982                 :            : 
    9983                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
    9984                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG],
    9985                 :            :                                     datum);
    9986                 :          0 : }
    9987                 :            : 
    9988                 :            : /* Deletes an element of the "other_config" map column from the "Logical_Switch" table in 'row'
    9989                 :            :  * given the key value 'delete_key'.
    9990                 :            :  *
    9991                 :            :  */
    9992                 :            : void
    9993                 :          0 : vteprec_logical_switch_update_other_config_delkey(const struct vteprec_logical_switch *row, const char *delete_key)
    9994                 :            : {
    9995                 :            :     struct ovsdb_datum *datum;
    9996                 :            : 
    9997         [ #  # ]:          0 :     ovs_assert(inited);
    9998                 :            : 
    9999                 :          0 :     datum = xmalloc(sizeof *datum);
   10000                 :          0 :     datum->n = 1;
   10001                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   10002                 :          0 :     datum->values = NULL;
   10003                 :            : 
   10004                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   10005                 :            : 
   10006                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   10007                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG],
   10008                 :            :                                     datum);
   10009                 :          0 : }
   10010                 :            : 
   10011                 :            : /* Adds the value 'new_value' to the "replication_mode" set column from the "Logical_Switch" table
   10012                 :            :  * in 'row'.
   10013                 :            :  *
   10014                 :            :  */
   10015                 :            : void
   10016                 :          0 : vteprec_logical_switch_update_replication_mode_addvalue(const struct vteprec_logical_switch *row, const char *new_value)
   10017                 :            : {
   10018                 :            :     struct ovsdb_datum *datum;
   10019                 :            : 
   10020         [ #  # ]:          0 :     ovs_assert(inited);
   10021                 :            : 
   10022                 :          0 :     datum = xmalloc(sizeof *datum);
   10023                 :          0 :     datum->n = 1;
   10024                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   10025                 :          0 :     datum->values = NULL;
   10026                 :            : 
   10027                 :          0 :     datum->keys[0].string = xstrdup(new_value);
   10028                 :            : 
   10029                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   10030                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE],
   10031                 :            :                                     datum);
   10032                 :          0 : }
   10033                 :            : 
   10034                 :            : /* Deletes the value 'delete_value' from the "replication_mode" set column from the
   10035                 :            :  * "Logical_Switch" table in 'row'.
   10036                 :            :  *
   10037                 :            :  */
   10038                 :            : void
   10039                 :          0 : vteprec_logical_switch_update_replication_mode_delvalue(const struct vteprec_logical_switch *row, const char *delete_value)
   10040                 :            : {
   10041                 :            :     struct ovsdb_datum *datum;
   10042                 :            : 
   10043         [ #  # ]:          0 :     ovs_assert(inited);
   10044                 :            : 
   10045                 :          0 :     datum = xmalloc(sizeof *datum);
   10046                 :          0 :     datum->n = 1;
   10047                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   10048                 :          0 :     datum->values = NULL;
   10049                 :            : 
   10050                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
   10051                 :            : 
   10052                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   10053                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE],
   10054                 :            :                                     datum);
   10055                 :          0 : }
   10056                 :            : 
   10057                 :            : /* Adds the value 'new_value' to the "tunnel_key" set column from the "Logical_Switch" table
   10058                 :            :  * in 'row'.
   10059                 :            :  *
   10060                 :            :  */
   10061                 :            : void
   10062                 :          0 : vteprec_logical_switch_update_tunnel_key_addvalue(const struct vteprec_logical_switch *row, int64_t new_value)
   10063                 :            : {
   10064                 :            :     struct ovsdb_datum *datum;
   10065                 :            : 
   10066         [ #  # ]:          0 :     ovs_assert(inited);
   10067                 :            : 
   10068                 :          0 :     datum = xmalloc(sizeof *datum);
   10069                 :          0 :     datum->n = 1;
   10070                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   10071                 :          0 :     datum->values = NULL;
   10072                 :            : 
   10073                 :          0 :     datum->keys[0].integer = new_value;
   10074                 :            : 
   10075                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   10076                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY],
   10077                 :            :                                     datum);
   10078                 :          0 : }
   10079                 :            : 
   10080                 :            : /* Deletes the value 'delete_value' from the "tunnel_key" set column from the
   10081                 :            :  * "Logical_Switch" table in 'row'.
   10082                 :            :  *
   10083                 :            :  */
   10084                 :            : void
   10085                 :          0 : vteprec_logical_switch_update_tunnel_key_delvalue(const struct vteprec_logical_switch *row, int64_t delete_value)
   10086                 :            : {
   10087                 :            :     struct ovsdb_datum *datum;
   10088                 :            : 
   10089         [ #  # ]:          0 :     ovs_assert(inited);
   10090                 :            : 
   10091                 :          0 :     datum = xmalloc(sizeof *datum);
   10092                 :          0 :     datum->n = 1;
   10093                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   10094                 :          0 :     datum->values = NULL;
   10095                 :            : 
   10096                 :          0 :     datum->keys[0].integer = delete_value;
   10097                 :            : 
   10098                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   10099                 :            :                                     &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY],
   10100                 :            :                                     datum);
   10101                 :          0 : }
   10102                 :            : 
   10103                 :            : /* Sets the "description" column from the "Logical_Switch" table in 'row' to
   10104                 :            :  * 'description'.
   10105                 :            :  *
   10106                 :            :  * The caller retains ownership of the arguments. */
   10107                 :            : void
   10108                 :          0 : vteprec_logical_switch_add_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   10109                 :            : {
   10110                 :            :     struct ovsdb_datum datum;
   10111                 :            :     union ovsdb_atom key;
   10112                 :            : 
   10113         [ #  # ]:          0 :     ovs_assert(inited);
   10114                 :          0 :     datum.n = 1;
   10115                 :          0 :     datum.keys = &key;
   10116                 :          0 :     key.string = CONST_CAST(char *, description);
   10117                 :          0 :     datum.values = NULL;
   10118                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10119                 :            :                           function,
   10120                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_DESCRIPTION],
   10121                 :            :                           &datum);
   10122                 :          0 : }
   10123                 :            : 
   10124                 :            : /* Sets the "name" column from the "Logical_Switch" table in 'row' to
   10125                 :            :  * 'name'.
   10126                 :            :  *
   10127                 :            :  * The caller retains ownership of the arguments. */
   10128                 :            : void
   10129                 :          0 : vteprec_logical_switch_add_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   10130                 :            : {
   10131                 :            :     struct ovsdb_datum datum;
   10132                 :            :     union ovsdb_atom key;
   10133                 :            : 
   10134         [ #  # ]:          0 :     ovs_assert(inited);
   10135                 :          0 :     datum.n = 1;
   10136                 :          0 :     datum.keys = &key;
   10137                 :          0 :     key.string = CONST_CAST(char *, name);
   10138                 :          0 :     datum.values = NULL;
   10139                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10140                 :            :                           function,
   10141                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_NAME],
   10142                 :            :                           &datum);
   10143                 :          0 : }
   10144                 :            : 
   10145                 :            : /* Sets the "other_config" column's value from the "Logical_Switch" table in 'row'
   10146                 :            :  * to 'other_config'.
   10147                 :            :  *
   10148                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   10149                 :            : void
   10150                 :          0 : vteprec_logical_switch_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   10151                 :            : {
   10152                 :            :     struct ovsdb_datum datum;
   10153                 :            : 
   10154         [ #  # ]:          0 :     ovs_assert(inited);
   10155         [ #  # ]:          0 :     if (other_config) {
   10156                 :            :         struct smap_node *node;
   10157                 :            :         size_t i;
   10158                 :            : 
   10159                 :          0 :         datum.n = smap_count(other_config);
   10160                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   10161                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   10162                 :            : 
   10163                 :          0 :         i = 0;
   10164 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   10165                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   10166                 :          0 :             datum.values[i].string = xstrdup(node->value);
   10167                 :          0 :             i++;
   10168                 :            :         }
   10169                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   10170                 :            :     } else {
   10171                 :          0 :         ovsdb_datum_init_empty(&datum);
   10172                 :            :     }
   10173                 :            : 
   10174                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   10175                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10176                 :            :                                    function,
   10177                 :            :                                    &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG],
   10178                 :            :                                    &datum);
   10179                 :            : 
   10180                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_switch_col_other_config.type);
   10181                 :          0 : }
   10182                 :            : 
   10183                 :            : 
   10184                 :            : /* Sets the "replication_mode" column from the "Logical_Switch" table in 'row' to
   10185                 :            :  * the 'replication_mode' set.
   10186                 :            :  *
   10187                 :            :  * If "replication_mode" is null, the column will be the empty set,
   10188                 :            :  * otherwise it will contain the specified value.
   10189                 :            :  *
   10190                 :            :  * Argument constraints: either "service_node" or "source_node"
   10191                 :            :  *
   10192                 :            :  * The caller retains ownership of the arguments. */
   10193                 :            : void
   10194                 :          0 : vteprec_logical_switch_add_clause_replication_mode(struct ovsdb_idl *idl, enum ovsdb_function function, const char *replication_mode)
   10195                 :            : {
   10196                 :            :     struct ovsdb_datum datum;
   10197                 :            :     union ovsdb_atom key;
   10198                 :            : 
   10199         [ #  # ]:          0 :     ovs_assert(inited);
   10200         [ #  # ]:          0 :     if (replication_mode) {
   10201                 :          0 :         datum.n = 1;
   10202                 :          0 :         datum.keys = &key;
   10203                 :          0 :         key.string = CONST_CAST(char *, replication_mode);
   10204                 :            :     } else {
   10205                 :          0 :         datum.n = 0;
   10206                 :          0 :         datum.keys = NULL;
   10207                 :            :     }
   10208                 :          0 :     datum.values = NULL;
   10209                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10210                 :            :                           function,
   10211                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE],
   10212                 :            :                           &datum);
   10213                 :          0 : }
   10214                 :            : 
   10215                 :            : /* Sets the "tunnel_key" column from the "Logical_Switch" table in 'row' to
   10216                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
   10217                 :            :  *
   10218                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
   10219                 :            :  * may be NULL.
   10220                 :            :  *
   10221                 :            :  * The caller retains ownership of the arguments. */
   10222                 :            : void
   10223                 :          0 : vteprec_logical_switch_add_clause_tunnel_key(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tunnel_key, size_t n_tunnel_key)
   10224                 :            : {
   10225                 :            :     struct ovsdb_datum datum;
   10226                 :            :     union ovsdb_atom key;
   10227                 :            : 
   10228         [ #  # ]:          0 :     ovs_assert(inited);
   10229         [ #  # ]:          0 :     if (n_tunnel_key) {
   10230                 :          0 :         datum.n = 1;
   10231                 :          0 :         datum.keys = &key;
   10232                 :          0 :         key.integer = *tunnel_key;
   10233                 :            :     } else {
   10234                 :          0 :         datum.n = 0;
   10235                 :          0 :         datum.keys = NULL;
   10236                 :            :     }
   10237                 :          0 :     datum.values = NULL;
   10238                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10239                 :            :                           function,
   10240                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY],
   10241                 :            :                           &datum);
   10242                 :          0 : }
   10243                 :            : void
   10244                 :          0 : vteprec_logical_switch_add_clause_false(struct ovsdb_idl *idl)
   10245                 :            : {
   10246                 :            :     struct ovsdb_datum datum;
   10247                 :            : 
   10248                 :          0 :     ovsdb_datum_init_empty(&datum);
   10249                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], OVSDB_F_FALSE, NULL, &datum);
   10250                 :          0 : }
   10251                 :            : void
   10252                 :          0 : vteprec_logical_switch_add_clause_true(struct ovsdb_idl *idl)
   10253                 :            : {
   10254                 :            :     struct ovsdb_datum datum;
   10255                 :            : 
   10256                 :          0 :     ovsdb_datum_init_empty(&datum);
   10257                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], OVSDB_F_TRUE, NULL, &datum);
   10258                 :          0 : }
   10259                 :            : 
   10260                 :            : /* Sets the "description" column from the "Logical_Switch" table in 'row' to
   10261                 :            :  * 'description'.
   10262                 :            :  *
   10263                 :            :  * The caller retains ownership of the arguments. */
   10264                 :            : void
   10265                 :          0 : vteprec_logical_switch_remove_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   10266                 :            : {
   10267                 :            :     struct ovsdb_datum datum;
   10268                 :            :     union ovsdb_atom key;
   10269                 :            : 
   10270         [ #  # ]:          0 :     ovs_assert(inited);
   10271                 :          0 :     datum.n = 1;
   10272                 :          0 :     datum.keys = &key;
   10273                 :          0 :     key.string = CONST_CAST(char *, description);
   10274                 :          0 :     datum.values = NULL;
   10275                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10276                 :            :                           function,
   10277                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_DESCRIPTION],
   10278                 :            :                           &datum);
   10279                 :          0 : }
   10280                 :            : 
   10281                 :            : /* Sets the "name" column from the "Logical_Switch" table in 'row' to
   10282                 :            :  * 'name'.
   10283                 :            :  *
   10284                 :            :  * The caller retains ownership of the arguments. */
   10285                 :            : void
   10286                 :          0 : vteprec_logical_switch_remove_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   10287                 :            : {
   10288                 :            :     struct ovsdb_datum datum;
   10289                 :            :     union ovsdb_atom key;
   10290                 :            : 
   10291         [ #  # ]:          0 :     ovs_assert(inited);
   10292                 :          0 :     datum.n = 1;
   10293                 :          0 :     datum.keys = &key;
   10294                 :          0 :     key.string = CONST_CAST(char *, name);
   10295                 :          0 :     datum.values = NULL;
   10296                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10297                 :            :                           function,
   10298                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_NAME],
   10299                 :            :                           &datum);
   10300                 :          0 : }
   10301                 :            : 
   10302                 :            : /* Sets the "other_config" column's value from the "Logical_Switch" table in 'row'
   10303                 :            :  * to 'other_config'.
   10304                 :            :  *
   10305                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   10306                 :            : void
   10307                 :          0 : vteprec_logical_switch_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   10308                 :            : {
   10309                 :            :     struct ovsdb_datum datum;
   10310                 :            : 
   10311         [ #  # ]:          0 :     ovs_assert(inited);
   10312         [ #  # ]:          0 :     if (other_config) {
   10313                 :            :         struct smap_node *node;
   10314                 :            :         size_t i;
   10315                 :            : 
   10316                 :          0 :         datum.n = smap_count(other_config);
   10317                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   10318                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   10319                 :            : 
   10320                 :          0 :         i = 0;
   10321 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   10322                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   10323                 :          0 :             datum.values[i].string = xstrdup(node->value);
   10324                 :          0 :             i++;
   10325                 :            :         }
   10326                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   10327                 :            :     } else {
   10328                 :          0 :         ovsdb_datum_init_empty(&datum);
   10329                 :            :     }
   10330                 :            : 
   10331                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10332                 :            :                                       function,
   10333                 :            :                                       &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_OTHER_CONFIG],
   10334                 :            :                                       &datum);
   10335                 :            : 
   10336                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_logical_switch_col_other_config.type);
   10337                 :          0 : }
   10338                 :            : 
   10339                 :            : 
   10340                 :            : /* Sets the "replication_mode" column from the "Logical_Switch" table in 'row' to
   10341                 :            :  * the 'replication_mode' set.
   10342                 :            :  *
   10343                 :            :  * If "replication_mode" is null, the column will be the empty set,
   10344                 :            :  * otherwise it will contain the specified value.
   10345                 :            :  *
   10346                 :            :  * Argument constraints: either "service_node" or "source_node"
   10347                 :            :  *
   10348                 :            :  * The caller retains ownership of the arguments. */
   10349                 :            : void
   10350                 :          0 : vteprec_logical_switch_remove_clause_replication_mode(struct ovsdb_idl *idl, enum ovsdb_function function, const char *replication_mode)
   10351                 :            : {
   10352                 :            :     struct ovsdb_datum datum;
   10353                 :            :     union ovsdb_atom key;
   10354                 :            : 
   10355         [ #  # ]:          0 :     ovs_assert(inited);
   10356         [ #  # ]:          0 :     if (replication_mode) {
   10357                 :          0 :         datum.n = 1;
   10358                 :          0 :         datum.keys = &key;
   10359                 :          0 :         key.string = CONST_CAST(char *, replication_mode);
   10360                 :            :     } else {
   10361                 :          0 :         datum.n = 0;
   10362                 :          0 :         datum.keys = NULL;
   10363                 :            :     }
   10364                 :          0 :     datum.values = NULL;
   10365                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10366                 :            :                           function,
   10367                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_REPLICATION_MODE],
   10368                 :            :                           &datum);
   10369                 :          0 : }
   10370                 :            : 
   10371                 :            : /* Sets the "tunnel_key" column from the "Logical_Switch" table in 'row' to
   10372                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
   10373                 :            :  *
   10374                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
   10375                 :            :  * may be NULL.
   10376                 :            :  *
   10377                 :            :  * The caller retains ownership of the arguments. */
   10378                 :            : void
   10379                 :          0 : vteprec_logical_switch_remove_clause_tunnel_key(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tunnel_key, size_t n_tunnel_key)
   10380                 :            : {
   10381                 :            :     struct ovsdb_datum datum;
   10382                 :            :     union ovsdb_atom key;
   10383                 :            : 
   10384         [ #  # ]:          0 :     ovs_assert(inited);
   10385         [ #  # ]:          0 :     if (n_tunnel_key) {
   10386                 :          0 :         datum.n = 1;
   10387                 :          0 :         datum.keys = &key;
   10388                 :          0 :         key.integer = *tunnel_key;
   10389                 :            :     } else {
   10390                 :          0 :         datum.n = 0;
   10391                 :          0 :         datum.keys = NULL;
   10392                 :            :     }
   10393                 :          0 :     datum.values = NULL;
   10394                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH],
   10395                 :            :                           function,
   10396                 :            :                           &vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_COL_TUNNEL_KEY],
   10397                 :            :                           &datum);
   10398                 :          0 : }
   10399                 :            : void
   10400                 :          0 : vteprec_logical_switch_remove_clause_false(struct ovsdb_idl *idl)
   10401                 :            : {
   10402                 :            :     struct ovsdb_datum datum;
   10403                 :            : 
   10404                 :          0 :     ovsdb_datum_init_empty(&datum);
   10405                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], OVSDB_F_FALSE, NULL, &datum);
   10406                 :          0 : }
   10407                 :            : void
   10408                 :          0 : vteprec_logical_switch_remove_clause_true(struct ovsdb_idl *idl)
   10409                 :            : {
   10410                 :            :     struct ovsdb_datum datum;
   10411                 :            : 
   10412                 :          0 :     ovsdb_datum_init_empty(&datum);
   10413                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], OVSDB_F_TRUE, NULL, &datum);
   10414                 :          0 : }
   10415                 :            : 
   10416                 :            : struct ovsdb_idl_column vteprec_logical_switch_columns[VTEPREC_LOGICAL_SWITCH_N_COLUMNS];
   10417                 :            : 
   10418                 :            : static void
   10419                 :        741 : vteprec_logical_switch_columns_init(void)
   10420                 :            : {
   10421                 :            :     struct ovsdb_idl_column *c;
   10422                 :            : 
   10423                 :            :     /* Initialize vteprec_logical_switch_col_description. */
   10424                 :        741 :     c = &vteprec_logical_switch_col_description;
   10425                 :        741 :     c->name = "description";
   10426                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   10427                 :        741 :     c->type.key.u.string.minLen = 0;
   10428                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   10429                 :        741 :     c->type.n_min = 1;
   10430                 :        741 :     c->type.n_max = 1;
   10431                 :        741 :     c->mutable = true;
   10432                 :        741 :     c->parse = vteprec_logical_switch_parse_description;
   10433                 :        741 :     c->unparse = vteprec_logical_switch_unparse_description;
   10434                 :            : 
   10435                 :            :     /* Initialize vteprec_logical_switch_col_name. */
   10436                 :        741 :     c = &vteprec_logical_switch_col_name;
   10437                 :        741 :     c->name = "name";
   10438                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   10439                 :        741 :     c->type.key.u.string.minLen = 0;
   10440                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   10441                 :        741 :     c->type.n_min = 1;
   10442                 :        741 :     c->type.n_max = 1;
   10443                 :        741 :     c->mutable = true;
   10444                 :        741 :     c->parse = vteprec_logical_switch_parse_name;
   10445                 :        741 :     c->unparse = vteprec_logical_switch_unparse_name;
   10446                 :            : 
   10447                 :            :     /* Initialize vteprec_logical_switch_col_other_config. */
   10448                 :        741 :     c = &vteprec_logical_switch_col_other_config;
   10449                 :        741 :     c->name = "other_config";
   10450                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   10451                 :        741 :     c->type.key.u.string.minLen = 0;
   10452                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   10453                 :        741 :     c->type.value.u.string.minLen = 0;
   10454                 :        741 :     c->type.n_min = 0;
   10455                 :        741 :     c->type.n_max = UINT_MAX;
   10456                 :        741 :     c->mutable = true;
   10457                 :        741 :     c->parse = vteprec_logical_switch_parse_other_config;
   10458                 :        741 :     c->unparse = vteprec_logical_switch_unparse_other_config;
   10459                 :            : 
   10460                 :            :     /* Initialize vteprec_logical_switch_col_replication_mode. */
   10461                 :        741 :     c = &vteprec_logical_switch_col_replication_mode;
   10462                 :        741 :     c->name = "replication_mode";
   10463                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   10464                 :        741 :     c->type.key.enum_ = xmalloc(sizeof *c->type.key.enum_);
   10465                 :        741 :     c->type.key.enum_->n = 2;
   10466                 :        741 :     c->type.key.enum_->keys = xmalloc(2 * sizeof *c->type.key.enum_->keys);
   10467                 :        741 :     c->type.key.enum_->keys[0].string = xstrdup("service_node");
   10468                 :        741 :     c->type.key.enum_->keys[1].string = xstrdup("source_node");
   10469                 :        741 :     c->type.key.enum_->values = NULL;
   10470                 :        741 :     ovsdb_datum_sort_assert(c->type.key.enum_, OVSDB_TYPE_STRING);
   10471                 :        741 :     c->type.key.u.string.minLen = 0;
   10472                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   10473                 :        741 :     c->type.n_min = 0;
   10474                 :        741 :     c->type.n_max = 1;
   10475                 :        741 :     c->mutable = true;
   10476                 :        741 :     c->parse = vteprec_logical_switch_parse_replication_mode;
   10477                 :        741 :     c->unparse = vteprec_logical_switch_unparse_replication_mode;
   10478                 :            : 
   10479                 :            :     /* Initialize vteprec_logical_switch_col_tunnel_key. */
   10480                 :        741 :     c = &vteprec_logical_switch_col_tunnel_key;
   10481                 :        741 :     c->name = "tunnel_key";
   10482                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   10483                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   10484                 :        741 :     c->type.n_min = 0;
   10485                 :        741 :     c->type.n_max = 1;
   10486                 :        741 :     c->mutable = true;
   10487                 :        741 :     c->parse = vteprec_logical_switch_parse_tunnel_key;
   10488                 :        741 :     c->unparse = vteprec_logical_switch_unparse_tunnel_key;
   10489                 :        741 : }
   10490                 :            : 
   10491                 :            : /* Manager table. */
   10492                 :            : 
   10493                 :            : static void
   10494                 :          2 : vteprec_manager_parse_inactivity_probe(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10495                 :            : {
   10496                 :          2 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10497                 :          2 :     size_t n = MIN(1, datum->n);
   10498                 :            :     size_t i;
   10499                 :            : 
   10500         [ -  + ]:          2 :     ovs_assert(inited);
   10501                 :          2 :     row->inactivity_probe = NULL;
   10502                 :          2 :     row->n_inactivity_probe = 0;
   10503         [ -  + ]:          2 :     for (i = 0; i < n; i++) {
   10504         [ #  # ]:          0 :         if (!row->n_inactivity_probe) {
   10505                 :          0 :             row->inactivity_probe = xmalloc(n * sizeof *row->inactivity_probe);
   10506                 :            :         }
   10507                 :          0 :         row->inactivity_probe[row->n_inactivity_probe] = datum->keys[i].integer;
   10508                 :          0 :         row->n_inactivity_probe++;
   10509                 :            :     }
   10510                 :          2 : }
   10511                 :            : 
   10512                 :            : static void
   10513                 :          2 : vteprec_manager_parse_is_connected(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10514                 :            : {
   10515                 :          2 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10516                 :            : 
   10517         [ -  + ]:          2 :     ovs_assert(inited);
   10518         [ +  - ]:          2 :     if (datum->n >= 1) {
   10519                 :          2 :         row->is_connected = datum->keys[0].boolean;
   10520                 :            :     } else {
   10521                 :          0 :         row->is_connected = false;
   10522                 :            :     }
   10523                 :          2 : }
   10524                 :            : 
   10525                 :            : static void
   10526                 :          2 : vteprec_manager_parse_max_backoff(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10527                 :            : {
   10528                 :          2 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10529                 :          2 :     size_t n = MIN(1, datum->n);
   10530                 :            :     size_t i;
   10531                 :            : 
   10532         [ -  + ]:          2 :     ovs_assert(inited);
   10533                 :          2 :     row->max_backoff = NULL;
   10534                 :          2 :     row->n_max_backoff = 0;
   10535         [ -  + ]:          2 :     for (i = 0; i < n; i++) {
   10536         [ #  # ]:          0 :         if (!row->n_max_backoff) {
   10537                 :          0 :             row->max_backoff = xmalloc(n * sizeof *row->max_backoff);
   10538                 :            :         }
   10539                 :          0 :         row->max_backoff[row->n_max_backoff] = datum->keys[i].integer;
   10540                 :          0 :         row->n_max_backoff++;
   10541                 :            :     }
   10542                 :          2 : }
   10543                 :            : 
   10544                 :            : static void
   10545                 :          2 : vteprec_manager_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10546                 :            : {
   10547                 :          2 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10548                 :            :     size_t i;
   10549                 :            : 
   10550         [ -  + ]:          2 :     ovs_assert(inited);
   10551                 :          2 :     smap_init(&row->other_config);
   10552         [ -  + ]:          2 :     for (i = 0; i < datum->n; i++) {
   10553                 :          0 :         smap_add(&row->other_config,
   10554                 :          0 :                  datum->keys[i].string,
   10555                 :          0 :                  datum->values[i].string);
   10556                 :            :     }
   10557                 :          2 : }
   10558                 :            : 
   10559                 :            : static void
   10560                 :          2 : vteprec_manager_parse_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10561                 :            : {
   10562                 :          2 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10563                 :            :     size_t i;
   10564                 :            : 
   10565         [ -  + ]:          2 :     ovs_assert(inited);
   10566                 :          2 :     smap_init(&row->status);
   10567         [ -  + ]:          2 :     for (i = 0; i < datum->n; i++) {
   10568                 :          0 :         smap_add(&row->status,
   10569                 :          0 :                  datum->keys[i].string,
   10570                 :          0 :                  datum->values[i].string);
   10571                 :            :     }
   10572                 :          2 : }
   10573                 :            : 
   10574                 :            : static void
   10575                 :          6 : vteprec_manager_parse_target(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   10576                 :            : {
   10577                 :          6 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10578                 :            : 
   10579         [ -  + ]:          6 :     ovs_assert(inited);
   10580         [ +  - ]:          6 :     if (datum->n >= 1) {
   10581                 :          6 :         row->target = datum->keys[0].string;
   10582                 :            :     } else {
   10583                 :          0 :         row->target = "";
   10584                 :            :     }
   10585                 :          6 : }
   10586                 :            : 
   10587                 :            : static void
   10588                 :          6 : vteprec_manager_unparse_inactivity_probe(struct ovsdb_idl_row *row_)
   10589                 :            : {
   10590                 :          6 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10591                 :            : 
   10592         [ -  + ]:          6 :     ovs_assert(inited);
   10593                 :          6 :     free(row->inactivity_probe);
   10594                 :          6 : }
   10595                 :            : 
   10596                 :            : static void
   10597                 :          6 : vteprec_manager_unparse_is_connected(struct ovsdb_idl_row *row OVS_UNUSED)
   10598                 :            : {
   10599                 :            :     /* Nothing to do. */
   10600                 :          6 : }
   10601                 :            : 
   10602                 :            : static void
   10603                 :          6 : vteprec_manager_unparse_max_backoff(struct ovsdb_idl_row *row_)
   10604                 :            : {
   10605                 :          6 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10606                 :            : 
   10607         [ -  + ]:          6 :     ovs_assert(inited);
   10608                 :          6 :     free(row->max_backoff);
   10609                 :          6 : }
   10610                 :            : 
   10611                 :            : static void
   10612                 :          6 : vteprec_manager_unparse_other_config(struct ovsdb_idl_row *row_)
   10613                 :            : {
   10614                 :          6 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10615                 :            : 
   10616         [ -  + ]:          6 :     ovs_assert(inited);
   10617                 :          6 :     smap_destroy(&row->other_config);
   10618                 :          6 : }
   10619                 :            : 
   10620                 :            : static void
   10621                 :          6 : vteprec_manager_unparse_status(struct ovsdb_idl_row *row_)
   10622                 :            : {
   10623                 :          6 :     struct vteprec_manager *row = vteprec_manager_cast(row_);
   10624                 :            : 
   10625         [ -  + ]:          6 :     ovs_assert(inited);
   10626                 :          6 :     smap_destroy(&row->status);
   10627                 :          6 : }
   10628                 :            : 
   10629                 :            : static void
   10630                 :         10 : vteprec_manager_unparse_target(struct ovsdb_idl_row *row OVS_UNUSED)
   10631                 :            : {
   10632                 :            :     /* Nothing to do. */
   10633                 :         10 : }
   10634                 :            : 
   10635                 :            : static void
   10636                 :          6 : vteprec_manager_init__(struct ovsdb_idl_row *row)
   10637                 :            : {
   10638                 :          6 :     vteprec_manager_init(vteprec_manager_cast(row));
   10639                 :          6 : }
   10640                 :            : 
   10641                 :            : /* Clears the contents of 'row' in table "Manager". */
   10642                 :            : void
   10643                 :          6 : vteprec_manager_init(struct vteprec_manager *row)
   10644                 :            : {
   10645                 :          6 :     memset(row, 0, sizeof *row); 
   10646                 :          6 :     smap_init(&row->other_config);
   10647                 :          6 :     smap_init(&row->status);
   10648                 :          6 : }
   10649                 :            : 
   10650                 :            : /* Searches table "Manager" in 'idl' for a row with UUID 'uuid'.  Returns
   10651                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   10652                 :            : const struct vteprec_manager *
   10653                 :          0 : vteprec_manager_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   10654                 :            : {
   10655                 :          0 :     return vteprec_manager_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], uuid));
   10656                 :            : }
   10657                 :            : 
   10658                 :            : /* Returns a row in table "Manager" in 'idl', or a null pointer if that
   10659                 :            :  * table is empty.
   10660                 :            :  *
   10661                 :            :  * Database tables are internally maintained as hash tables, so adding or
   10662                 :            :  * removing rows while traversing the same table can cause some rows to be
   10663                 :            :  * visited twice or not at apply. */
   10664                 :            : const struct vteprec_manager *
   10665                 :          0 : vteprec_manager_first(const struct ovsdb_idl *idl)
   10666                 :            : {
   10667                 :          0 :     return vteprec_manager_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER]));
   10668                 :            : }
   10669                 :            : 
   10670                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   10671                 :            :  * is the last row in its table. */
   10672                 :            : const struct vteprec_manager *
   10673                 :          0 : vteprec_manager_next(const struct vteprec_manager *row)
   10674                 :            : {
   10675                 :          0 :     return vteprec_manager_cast(ovsdb_idl_next_row(&row->header_));
   10676                 :            : }
   10677                 :            : 
   10678                 :          0 : unsigned int vteprec_manager_get_seqno(const struct ovsdb_idl *idl)
   10679                 :            : {
   10680                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER]);
   10681                 :            : }
   10682                 :            : 
   10683                 :          0 : unsigned int vteprec_manager_row_get_seqno(const struct vteprec_manager *row, enum ovsdb_idl_change change)
   10684                 :            : {
   10685                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   10686                 :            : }
   10687                 :            : 
   10688                 :            : const struct vteprec_manager *
   10689                 :          0 : vteprec_manager_track_get_first(const struct ovsdb_idl *idl)
   10690                 :            : {
   10691                 :          0 :     return vteprec_manager_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER]));
   10692                 :            : }
   10693                 :            : 
   10694                 :            : const struct vteprec_manager
   10695                 :          0 : *vteprec_manager_track_get_next(const struct vteprec_manager *row)
   10696                 :            : {
   10697                 :          0 :     return vteprec_manager_cast(ovsdb_idl_track_get_next(&row->header_));
   10698                 :            : }
   10699                 :            : 
   10700                 :            : 
   10701                 :            : /* Deletes 'row' from table "Manager".  'row' may be freed, so it must not be
   10702                 :            :  * accessed afterward.
   10703                 :            :  *
   10704                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10705                 :            : void
   10706                 :          3 : vteprec_manager_delete(const struct vteprec_manager *row)
   10707                 :            : {
   10708                 :          3 :     ovsdb_idl_txn_delete(&row->header_);
   10709                 :          3 : }
   10710                 :            : 
   10711                 :            : /* Inserts and returns a new row in the table "Manager" in the database
   10712                 :            :  * with open transaction 'txn'.
   10713                 :            :  *
   10714                 :            :  * The new row is assigned a randomly generated provisional UUID.
   10715                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   10716                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   10717                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   10718                 :            : struct vteprec_manager *
   10719                 :          4 : vteprec_manager_insert(struct ovsdb_idl_txn *txn)
   10720                 :            : {
   10721                 :          4 :     return vteprec_manager_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], NULL));
   10722                 :            : }
   10723                 :            : 
   10724                 :            : bool
   10725                 :          0 : vteprec_manager_is_updated(const struct vteprec_manager *row, enum vteprec_manager_column_id column)
   10726                 :            : {
   10727                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_manager_columns[column]);
   10728                 :            : }
   10729                 :            : 
   10730                 :            : /* Causes the original contents of column "inactivity_probe" in 'row' to be
   10731                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10732                 :            :  * "inactivity_probe" in 'row' changed (or if 'row' was deleted) between the
   10733                 :            :  * time that the IDL originally read its contents and the time that the
   10734                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10735                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10736                 :            :  * change has already been received).
   10737                 :            :  *
   10738                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10739                 :            :  * reads, an application should call this function any time "inactivity_probe" is
   10740                 :            :  * read as part of a read-modify-write operation.
   10741                 :            :  *
   10742                 :            :  * In some cases this function reduces to a no-op, because the current value
   10743                 :            :  * of "inactivity_probe" is already known:
   10744                 :            :  *
   10745                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10746                 :            :  *     vteprec_manager_insert()).
   10747                 :            :  *
   10748                 :            :  *   - If "inactivity_probe" has already been modified (with
   10749                 :            :  *     vteprec_manager_set_inactivity_probe()) within the current transaction.
   10750                 :            :  *
   10751                 :            :  * Because of the latter property, always call this function *before*
   10752                 :            :  * vteprec_manager_set_inactivity_probe() for a given read-modify-write.
   10753                 :            :  *
   10754                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10755                 :            : void
   10756                 :          0 : vteprec_manager_verify_inactivity_probe(const struct vteprec_manager *row)
   10757                 :            : {
   10758         [ #  # ]:          0 :     ovs_assert(inited);
   10759                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE]);
   10760                 :          0 : }
   10761                 :            : 
   10762                 :            : /* Causes the original contents of column "is_connected" in 'row' to be
   10763                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10764                 :            :  * "is_connected" in 'row' changed (or if 'row' was deleted) between the
   10765                 :            :  * time that the IDL originally read its contents and the time that the
   10766                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10767                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10768                 :            :  * change has already been received).
   10769                 :            :  *
   10770                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10771                 :            :  * reads, an application should call this function any time "is_connected" is
   10772                 :            :  * read as part of a read-modify-write operation.
   10773                 :            :  *
   10774                 :            :  * In some cases this function reduces to a no-op, because the current value
   10775                 :            :  * of "is_connected" is already known:
   10776                 :            :  *
   10777                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10778                 :            :  *     vteprec_manager_insert()).
   10779                 :            :  *
   10780                 :            :  *   - If "is_connected" has already been modified (with
   10781                 :            :  *     vteprec_manager_set_is_connected()) within the current transaction.
   10782                 :            :  *
   10783                 :            :  * Because of the latter property, always call this function *before*
   10784                 :            :  * vteprec_manager_set_is_connected() for a given read-modify-write.
   10785                 :            :  *
   10786                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10787                 :            : void
   10788                 :          0 : vteprec_manager_verify_is_connected(const struct vteprec_manager *row)
   10789                 :            : {
   10790         [ #  # ]:          0 :     ovs_assert(inited);
   10791                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_IS_CONNECTED]);
   10792                 :          0 : }
   10793                 :            : 
   10794                 :            : /* Causes the original contents of column "max_backoff" in 'row' to be
   10795                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10796                 :            :  * "max_backoff" in 'row' changed (or if 'row' was deleted) between the
   10797                 :            :  * time that the IDL originally read its contents and the time that the
   10798                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10799                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10800                 :            :  * change has already been received).
   10801                 :            :  *
   10802                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10803                 :            :  * reads, an application should call this function any time "max_backoff" is
   10804                 :            :  * read as part of a read-modify-write operation.
   10805                 :            :  *
   10806                 :            :  * In some cases this function reduces to a no-op, because the current value
   10807                 :            :  * of "max_backoff" is already known:
   10808                 :            :  *
   10809                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10810                 :            :  *     vteprec_manager_insert()).
   10811                 :            :  *
   10812                 :            :  *   - If "max_backoff" has already been modified (with
   10813                 :            :  *     vteprec_manager_set_max_backoff()) within the current transaction.
   10814                 :            :  *
   10815                 :            :  * Because of the latter property, always call this function *before*
   10816                 :            :  * vteprec_manager_set_max_backoff() for a given read-modify-write.
   10817                 :            :  *
   10818                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10819                 :            : void
   10820                 :          0 : vteprec_manager_verify_max_backoff(const struct vteprec_manager *row)
   10821                 :            : {
   10822         [ #  # ]:          0 :     ovs_assert(inited);
   10823                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF]);
   10824                 :          0 : }
   10825                 :            : 
   10826                 :            : /* Causes the original contents of column "other_config" in 'row' to be
   10827                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10828                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
   10829                 :            :  * time that the IDL originally read its contents and the time that the
   10830                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10831                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10832                 :            :  * change has already been received).
   10833                 :            :  *
   10834                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10835                 :            :  * reads, an application should call this function any time "other_config" is
   10836                 :            :  * read as part of a read-modify-write operation.
   10837                 :            :  *
   10838                 :            :  * In some cases this function reduces to a no-op, because the current value
   10839                 :            :  * of "other_config" is already known:
   10840                 :            :  *
   10841                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10842                 :            :  *     vteprec_manager_insert()).
   10843                 :            :  *
   10844                 :            :  *   - If "other_config" has already been modified (with
   10845                 :            :  *     vteprec_manager_set_other_config()) within the current transaction.
   10846                 :            :  *
   10847                 :            :  * Because of the latter property, always call this function *before*
   10848                 :            :  * vteprec_manager_set_other_config() for a given read-modify-write.
   10849                 :            :  *
   10850                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10851                 :            : void
   10852                 :          0 : vteprec_manager_verify_other_config(const struct vteprec_manager *row)
   10853                 :            : {
   10854         [ #  # ]:          0 :     ovs_assert(inited);
   10855                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG]);
   10856                 :          0 : }
   10857                 :            : 
   10858                 :            : /* Causes the original contents of column "status" in 'row' to be
   10859                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10860                 :            :  * "status" in 'row' changed (or if 'row' was deleted) between the
   10861                 :            :  * time that the IDL originally read its contents and the time that the
   10862                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10863                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10864                 :            :  * change has already been received).
   10865                 :            :  *
   10866                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10867                 :            :  * reads, an application should call this function any time "status" is
   10868                 :            :  * read as part of a read-modify-write operation.
   10869                 :            :  *
   10870                 :            :  * In some cases this function reduces to a no-op, because the current value
   10871                 :            :  * of "status" is already known:
   10872                 :            :  *
   10873                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10874                 :            :  *     vteprec_manager_insert()).
   10875                 :            :  *
   10876                 :            :  *   - If "status" has already been modified (with
   10877                 :            :  *     vteprec_manager_set_status()) within the current transaction.
   10878                 :            :  *
   10879                 :            :  * Because of the latter property, always call this function *before*
   10880                 :            :  * vteprec_manager_set_status() for a given read-modify-write.
   10881                 :            :  *
   10882                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10883                 :            : void
   10884                 :          0 : vteprec_manager_verify_status(const struct vteprec_manager *row)
   10885                 :            : {
   10886         [ #  # ]:          0 :     ovs_assert(inited);
   10887                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS]);
   10888                 :          0 : }
   10889                 :            : 
   10890                 :            : /* Causes the original contents of column "target" in 'row' to be
   10891                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   10892                 :            :  * "target" in 'row' changed (or if 'row' was deleted) between the
   10893                 :            :  * time that the IDL originally read its contents and the time that the
   10894                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   10895                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   10896                 :            :  * change has already been received).
   10897                 :            :  *
   10898                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   10899                 :            :  * reads, an application should call this function any time "target" is
   10900                 :            :  * read as part of a read-modify-write operation.
   10901                 :            :  *
   10902                 :            :  * In some cases this function reduces to a no-op, because the current value
   10903                 :            :  * of "target" is already known:
   10904                 :            :  *
   10905                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   10906                 :            :  *     vteprec_manager_insert()).
   10907                 :            :  *
   10908                 :            :  *   - If "target" has already been modified (with
   10909                 :            :  *     vteprec_manager_set_target()) within the current transaction.
   10910                 :            :  *
   10911                 :            :  * Because of the latter property, always call this function *before*
   10912                 :            :  * vteprec_manager_set_target() for a given read-modify-write.
   10913                 :            :  *
   10914                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   10915                 :            : void
   10916                 :          6 : vteprec_manager_verify_target(const struct vteprec_manager *row)
   10917                 :            : {
   10918         [ -  + ]:          6 :     ovs_assert(inited);
   10919                 :          6 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_TARGET]);
   10920                 :          6 : }
   10921                 :            : 
   10922                 :            : /* Returns the "inactivity_probe" column's value from the "Manager" table in 'row'
   10923                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   10924                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   10925                 :            :  * for a given key than implementing the same operation on the "cooked"
   10926                 :            :  * form in 'row'.
   10927                 :            :  *
   10928                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   10929                 :            :  * (This helps to avoid silent bugs if someone changes inactivity_probe's
   10930                 :            :  * type without updating the caller.)
   10931                 :            :  *
   10932                 :            :  * The caller must not modify or free the returned value.
   10933                 :            :  *
   10934                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   10935                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   10936                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   10937                 :            :  * of it with ovsdb_datum_clone().
   10938                 :            :  *
   10939                 :            :  * This function is rarely useful, since it is easier to access the value
   10940                 :            :  * directly through the "inactivity_probe" member in vteprec_manager. */
   10941                 :            : const struct ovsdb_datum *
   10942                 :          0 : vteprec_manager_get_inactivity_probe(const struct vteprec_manager *row,
   10943                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   10944                 :            : {
   10945         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   10946                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_inactivity_probe);
   10947                 :            : }
   10948                 :            : 
   10949                 :            : /* Returns the "is_connected" column's value from the "Manager" table in 'row'
   10950                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   10951                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   10952                 :            :  * for a given key than implementing the same operation on the "cooked"
   10953                 :            :  * form in 'row'.
   10954                 :            :  *
   10955                 :            :  * 'key_type' must be OVSDB_TYPE_BOOLEAN.
   10956                 :            :  * (This helps to avoid silent bugs if someone changes is_connected's
   10957                 :            :  * type without updating the caller.)
   10958                 :            :  *
   10959                 :            :  * The caller must not modify or free the returned value.
   10960                 :            :  *
   10961                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   10962                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   10963                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   10964                 :            :  * of it with ovsdb_datum_clone().
   10965                 :            :  *
   10966                 :            :  * This function is rarely useful, since it is easier to access the value
   10967                 :            :  * directly through the "is_connected" member in vteprec_manager. */
   10968                 :            : const struct ovsdb_datum *
   10969                 :          0 : vteprec_manager_get_is_connected(const struct vteprec_manager *row,
   10970                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   10971                 :            : {
   10972         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_BOOLEAN);
   10973                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_is_connected);
   10974                 :            : }
   10975                 :            : 
   10976                 :            : /* Returns the "max_backoff" column's value from the "Manager" table in 'row'
   10977                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   10978                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   10979                 :            :  * for a given key than implementing the same operation on the "cooked"
   10980                 :            :  * form in 'row'.
   10981                 :            :  *
   10982                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   10983                 :            :  * (This helps to avoid silent bugs if someone changes max_backoff's
   10984                 :            :  * type without updating the caller.)
   10985                 :            :  *
   10986                 :            :  * The caller must not modify or free the returned value.
   10987                 :            :  *
   10988                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   10989                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   10990                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   10991                 :            :  * of it with ovsdb_datum_clone().
   10992                 :            :  *
   10993                 :            :  * This function is rarely useful, since it is easier to access the value
   10994                 :            :  * directly through the "max_backoff" member in vteprec_manager. */
   10995                 :            : const struct ovsdb_datum *
   10996                 :          0 : vteprec_manager_get_max_backoff(const struct vteprec_manager *row,
   10997                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   10998                 :            : {
   10999         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   11000                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_max_backoff);
   11001                 :            : }
   11002                 :            : 
   11003                 :            : /* Returns the "other_config" column's value from the "Manager" table in 'row'
   11004                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   11005                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   11006                 :            :  * for a given key than implementing the same operation on the "cooked"
   11007                 :            :  * form in 'row'.
   11008                 :            :  *
   11009                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   11010                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   11011                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
   11012                 :            :  * type without updating the caller.)
   11013                 :            :  *
   11014                 :            :  * The caller must not modify or free the returned value.
   11015                 :            :  *
   11016                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   11017                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   11018                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   11019                 :            :  * of it with ovsdb_datum_clone().
   11020                 :            :  *
   11021                 :            :  * This function is rarely useful, since it is easier to access the value
   11022                 :            :  * directly through the "other_config" member in vteprec_manager. */
   11023                 :            : const struct ovsdb_datum *
   11024                 :          0 : vteprec_manager_get_other_config(const struct vteprec_manager *row,
   11025                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   11026                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   11027                 :            : {
   11028         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   11029         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   11030                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_other_config);
   11031                 :            : }
   11032                 :            : 
   11033                 :            : /* Returns the "status" column's value from the "Manager" table in 'row'
   11034                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   11035                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   11036                 :            :  * for a given key than implementing the same operation on the "cooked"
   11037                 :            :  * form in 'row'.
   11038                 :            :  *
   11039                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   11040                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   11041                 :            :  * (This helps to avoid silent bugs if someone changes status's
   11042                 :            :  * type without updating the caller.)
   11043                 :            :  *
   11044                 :            :  * The caller must not modify or free the returned value.
   11045                 :            :  *
   11046                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   11047                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   11048                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   11049                 :            :  * of it with ovsdb_datum_clone().
   11050                 :            :  *
   11051                 :            :  * This function is rarely useful, since it is easier to access the value
   11052                 :            :  * directly through the "status" member in vteprec_manager. */
   11053                 :            : const struct ovsdb_datum *
   11054                 :          0 : vteprec_manager_get_status(const struct vteprec_manager *row,
   11055                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   11056                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   11057                 :            : {
   11058         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   11059         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   11060                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_status);
   11061                 :            : }
   11062                 :            : 
   11063                 :            : /* Returns the "target" column's value from the "Manager" table in 'row'
   11064                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   11065                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   11066                 :            :  * for a given key than implementing the same operation on the "cooked"
   11067                 :            :  * form in 'row'.
   11068                 :            :  *
   11069                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   11070                 :            :  * (This helps to avoid silent bugs if someone changes target's
   11071                 :            :  * type without updating the caller.)
   11072                 :            :  *
   11073                 :            :  * The caller must not modify or free the returned value.
   11074                 :            :  *
   11075                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   11076                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   11077                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   11078                 :            :  * of it with ovsdb_datum_clone().
   11079                 :            :  *
   11080                 :            :  * This function is rarely useful, since it is easier to access the value
   11081                 :            :  * directly through the "target" member in vteprec_manager. */
   11082                 :            : const struct ovsdb_datum *
   11083                 :          0 : vteprec_manager_get_target(const struct vteprec_manager *row,
   11084                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   11085                 :            : {
   11086         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   11087                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_manager_col_target);
   11088                 :            : }
   11089                 :            : 
   11090                 :            : /* Sets the "inactivity_probe" column from the "Manager" table in 'row' to
   11091                 :            :  * the 'inactivity_probe' set with 'n_inactivity_probe' entries.
   11092                 :            :  *
   11093                 :            :  * 'n_inactivity_probe' may be 0 or 1; if it is 0, then 'inactivity_probe'
   11094                 :            :  * may be NULL.
   11095                 :            :  *
   11096                 :            :  * The caller retains ownership of the arguments. */
   11097                 :            : void
   11098                 :          0 : vteprec_manager_set_inactivity_probe(const struct vteprec_manager *row, const int64_t *inactivity_probe, size_t n_inactivity_probe)
   11099                 :            : {
   11100                 :            :     struct ovsdb_datum datum;
   11101                 :            :     union ovsdb_atom key;
   11102                 :            : 
   11103         [ #  # ]:          0 :     ovs_assert(inited);
   11104         [ #  # ]:          0 :     if (n_inactivity_probe) {
   11105                 :          0 :         datum.n = 1;
   11106                 :          0 :         datum.keys = &key;
   11107                 :          0 :         key.integer = *inactivity_probe;
   11108                 :            :     } else {
   11109                 :          0 :         datum.n = 0;
   11110                 :          0 :         datum.keys = NULL;
   11111                 :            :     }
   11112                 :          0 :     datum.values = NULL;
   11113                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE], &datum);
   11114                 :          0 : }
   11115                 :            : 
   11116                 :            : /* Sets the "is_connected" column from the "Manager" table in 'row' to
   11117                 :            :  * 'is_connected'.
   11118                 :            :  *
   11119                 :            :  * The caller retains ownership of the arguments. */
   11120                 :            : void
   11121                 :          0 : vteprec_manager_set_is_connected(const struct vteprec_manager *row, bool is_connected)
   11122                 :            : {
   11123                 :            :     struct ovsdb_datum datum;
   11124                 :            :     union ovsdb_atom key;
   11125                 :            : 
   11126         [ #  # ]:          0 :     ovs_assert(inited);
   11127                 :          0 :     datum.n = 1;
   11128                 :          0 :     datum.keys = &key;
   11129                 :          0 :     key.boolean = is_connected;
   11130                 :          0 :     datum.values = NULL;
   11131                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_IS_CONNECTED], &datum);
   11132                 :          0 : }
   11133                 :            : 
   11134                 :            : /* Sets the "max_backoff" column from the "Manager" table in 'row' to
   11135                 :            :  * the 'max_backoff' set with 'n_max_backoff' entries.
   11136                 :            :  *
   11137                 :            :  * 'n_max_backoff' may be 0 or 1; if it is 0, then 'max_backoff'
   11138                 :            :  * may be NULL.
   11139                 :            :  *
   11140                 :            :  * Argument constraints: at least 1,000
   11141                 :            :  *
   11142                 :            :  * The caller retains ownership of the arguments. */
   11143                 :            : void
   11144                 :          0 : vteprec_manager_set_max_backoff(const struct vteprec_manager *row, const int64_t *max_backoff, size_t n_max_backoff)
   11145                 :            : {
   11146                 :            :     struct ovsdb_datum datum;
   11147                 :            :     union ovsdb_atom key;
   11148                 :            : 
   11149         [ #  # ]:          0 :     ovs_assert(inited);
   11150         [ #  # ]:          0 :     if (n_max_backoff) {
   11151                 :          0 :         datum.n = 1;
   11152                 :          0 :         datum.keys = &key;
   11153                 :          0 :         key.integer = *max_backoff;
   11154                 :            :     } else {
   11155                 :          0 :         datum.n = 0;
   11156                 :          0 :         datum.keys = NULL;
   11157                 :            :     }
   11158                 :          0 :     datum.values = NULL;
   11159                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF], &datum);
   11160                 :          0 : }
   11161                 :            : 
   11162                 :            : /* Sets the "other_config" column's value from the "Manager" table in 'row'
   11163                 :            :  * to 'other_config'.
   11164                 :            :  *
   11165                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   11166                 :            : void
   11167                 :          0 : vteprec_manager_set_other_config(const struct vteprec_manager *row, const struct smap *other_config)
   11168                 :            : {
   11169                 :            :     struct ovsdb_datum datum;
   11170                 :            : 
   11171         [ #  # ]:          0 :     ovs_assert(inited);
   11172         [ #  # ]:          0 :     if (other_config) {
   11173                 :            :         struct smap_node *node;
   11174                 :            :         size_t i;
   11175                 :            : 
   11176                 :          0 :         datum.n = smap_count(other_config);
   11177                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11178                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11179                 :            : 
   11180                 :          0 :         i = 0;
   11181 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   11182                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11183                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11184                 :          0 :             i++;
   11185                 :            :         }
   11186                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11187                 :            :     } else {
   11188                 :          0 :         ovsdb_datum_init_empty(&datum);
   11189                 :            :     }
   11190                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   11191                 :            :                         &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG],
   11192                 :            :                         &datum);
   11193                 :          0 : }
   11194                 :            : 
   11195                 :            : 
   11196                 :            : /* Sets the "status" column's value from the "Manager" table in 'row'
   11197                 :            :  * to 'status'.
   11198                 :            :  *
   11199                 :            :  * The caller retains ownership of 'status' and everything in it. */
   11200                 :            : void
   11201                 :          0 : vteprec_manager_set_status(const struct vteprec_manager *row, const struct smap *status)
   11202                 :            : {
   11203                 :            :     struct ovsdb_datum datum;
   11204                 :            : 
   11205         [ #  # ]:          0 :     ovs_assert(inited);
   11206         [ #  # ]:          0 :     if (status) {
   11207                 :            :         struct smap_node *node;
   11208                 :            :         size_t i;
   11209                 :            : 
   11210                 :          0 :         datum.n = smap_count(status);
   11211                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11212                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11213                 :            : 
   11214                 :          0 :         i = 0;
   11215 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, status) {
   11216                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11217                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11218                 :          0 :             i++;
   11219                 :            :         }
   11220                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11221                 :            :     } else {
   11222                 :          0 :         ovsdb_datum_init_empty(&datum);
   11223                 :            :     }
   11224                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   11225                 :            :                         &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS],
   11226                 :            :                         &datum);
   11227                 :          0 : }
   11228                 :            : 
   11229                 :            : 
   11230                 :            : /* Sets the "target" column from the "Manager" table in 'row' to
   11231                 :            :  * 'target'.
   11232                 :            :  *
   11233                 :            :  * The caller retains ownership of the arguments. */
   11234                 :            : void
   11235                 :          4 : vteprec_manager_set_target(const struct vteprec_manager *row, const char *target)
   11236                 :            : {
   11237                 :            :     struct ovsdb_datum datum;
   11238                 :            :     union ovsdb_atom key;
   11239                 :            : 
   11240         [ -  + ]:          4 :     ovs_assert(inited);
   11241                 :          4 :     datum.n = 1;
   11242                 :          4 :     datum.keys = &key;
   11243                 :          4 :     key.string = CONST_CAST(char *, target);
   11244                 :          4 :     datum.values = NULL;
   11245                 :          4 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_manager_columns[VTEPREC_MANAGER_COL_TARGET], &datum);
   11246                 :          4 : }
   11247                 :            : 
   11248                 :            : /* Adds the value 'new_value' to the "inactivity_probe" set column from the "Manager" table
   11249                 :            :  * in 'row'.
   11250                 :            :  *
   11251                 :            :  */
   11252                 :            : void
   11253                 :          0 : vteprec_manager_update_inactivity_probe_addvalue(const struct vteprec_manager *row, int64_t new_value)
   11254                 :            : {
   11255                 :            :     struct ovsdb_datum *datum;
   11256                 :            : 
   11257         [ #  # ]:          0 :     ovs_assert(inited);
   11258                 :            : 
   11259                 :          0 :     datum = xmalloc(sizeof *datum);
   11260                 :          0 :     datum->n = 1;
   11261                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   11262                 :          0 :     datum->values = NULL;
   11263                 :            : 
   11264                 :          0 :     datum->keys[0].integer = new_value;
   11265                 :            : 
   11266                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   11267                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE],
   11268                 :            :                                     datum);
   11269                 :          0 : }
   11270                 :            : 
   11271                 :            : /* Deletes the value 'delete_value' from the "inactivity_probe" set column from the
   11272                 :            :  * "Manager" table in 'row'.
   11273                 :            :  *
   11274                 :            :  */
   11275                 :            : void
   11276                 :          0 : vteprec_manager_update_inactivity_probe_delvalue(const struct vteprec_manager *row, int64_t delete_value)
   11277                 :            : {
   11278                 :            :     struct ovsdb_datum *datum;
   11279                 :            : 
   11280         [ #  # ]:          0 :     ovs_assert(inited);
   11281                 :            : 
   11282                 :          0 :     datum = xmalloc(sizeof *datum);
   11283                 :          0 :     datum->n = 1;
   11284                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   11285                 :          0 :     datum->values = NULL;
   11286                 :            : 
   11287                 :          0 :     datum->keys[0].integer = delete_value;
   11288                 :            : 
   11289                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   11290                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE],
   11291                 :            :                                     datum);
   11292                 :          0 : }
   11293                 :            : 
   11294                 :            : /* Adds the value 'new_value' to the "max_backoff" set column from the "Manager" table
   11295                 :            :  * in 'row'.
   11296                 :            :  *
   11297                 :            :  */
   11298                 :            : void
   11299                 :          0 : vteprec_manager_update_max_backoff_addvalue(const struct vteprec_manager *row, int64_t new_value)
   11300                 :            : {
   11301                 :            :     struct ovsdb_datum *datum;
   11302                 :            : 
   11303         [ #  # ]:          0 :     ovs_assert(inited);
   11304                 :            : 
   11305                 :          0 :     datum = xmalloc(sizeof *datum);
   11306                 :          0 :     datum->n = 1;
   11307                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   11308                 :          0 :     datum->values = NULL;
   11309                 :            : 
   11310                 :          0 :     datum->keys[0].integer = new_value;
   11311                 :            : 
   11312                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   11313                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF],
   11314                 :            :                                     datum);
   11315                 :          0 : }
   11316                 :            : 
   11317                 :            : /* Deletes the value 'delete_value' from the "max_backoff" set column from the
   11318                 :            :  * "Manager" table in 'row'.
   11319                 :            :  *
   11320                 :            :  */
   11321                 :            : void
   11322                 :          0 : vteprec_manager_update_max_backoff_delvalue(const struct vteprec_manager *row, int64_t delete_value)
   11323                 :            : {
   11324                 :            :     struct ovsdb_datum *datum;
   11325                 :            : 
   11326         [ #  # ]:          0 :     ovs_assert(inited);
   11327                 :            : 
   11328                 :          0 :     datum = xmalloc(sizeof *datum);
   11329                 :          0 :     datum->n = 1;
   11330                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   11331                 :          0 :     datum->values = NULL;
   11332                 :            : 
   11333                 :          0 :     datum->keys[0].integer = delete_value;
   11334                 :            : 
   11335                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   11336                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF],
   11337                 :            :                                     datum);
   11338                 :          0 : }
   11339                 :            : 
   11340                 :            : /* Sets an element of the "other_config" map column from the "Manager" table in 'row'
   11341                 :            :  * to 'new_value' given the key value 'new_key'.
   11342                 :            :  *
   11343                 :            :  */
   11344                 :            : void
   11345                 :          0 : vteprec_manager_update_other_config_setkey(const struct vteprec_manager *row, const char *new_key, const char *new_value)
   11346                 :            : {
   11347                 :            :     struct ovsdb_datum *datum;
   11348                 :            : 
   11349         [ #  # ]:          0 :     ovs_assert(inited);
   11350                 :            : 
   11351                 :          0 :     datum = xmalloc(sizeof *datum);
   11352                 :          0 :     datum->n = 1;
   11353                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   11354                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   11355                 :            : 
   11356                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   11357                 :          0 :     datum->values[0].string = xstrdup(new_value);
   11358                 :            : 
   11359                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   11360                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG],
   11361                 :            :                                     datum);
   11362                 :          0 : }
   11363                 :            : 
   11364                 :            : /* Deletes an element of the "other_config" map column from the "Manager" table in 'row'
   11365                 :            :  * given the key value 'delete_key'.
   11366                 :            :  *
   11367                 :            :  */
   11368                 :            : void
   11369                 :          0 : vteprec_manager_update_other_config_delkey(const struct vteprec_manager *row, const char *delete_key)
   11370                 :            : {
   11371                 :            :     struct ovsdb_datum *datum;
   11372                 :            : 
   11373         [ #  # ]:          0 :     ovs_assert(inited);
   11374                 :            : 
   11375                 :          0 :     datum = xmalloc(sizeof *datum);
   11376                 :          0 :     datum->n = 1;
   11377                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   11378                 :          0 :     datum->values = NULL;
   11379                 :            : 
   11380                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   11381                 :            : 
   11382                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   11383                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG],
   11384                 :            :                                     datum);
   11385                 :          0 : }
   11386                 :            : 
   11387                 :            : /* Sets an element of the "status" map column from the "Manager" table in 'row'
   11388                 :            :  * to 'new_value' given the key value 'new_key'.
   11389                 :            :  *
   11390                 :            :  */
   11391                 :            : void
   11392                 :          0 : vteprec_manager_update_status_setkey(const struct vteprec_manager *row, const char *new_key, const char *new_value)
   11393                 :            : {
   11394                 :            :     struct ovsdb_datum *datum;
   11395                 :            : 
   11396         [ #  # ]:          0 :     ovs_assert(inited);
   11397                 :            : 
   11398                 :          0 :     datum = xmalloc(sizeof *datum);
   11399                 :          0 :     datum->n = 1;
   11400                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   11401                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   11402                 :            : 
   11403                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   11404                 :          0 :     datum->values[0].string = xstrdup(new_value);
   11405                 :            : 
   11406                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   11407                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS],
   11408                 :            :                                     datum);
   11409                 :          0 : }
   11410                 :            : 
   11411                 :            : /* Deletes an element of the "status" map column from the "Manager" table in 'row'
   11412                 :            :  * given the key value 'delete_key'.
   11413                 :            :  *
   11414                 :            :  */
   11415                 :            : void
   11416                 :          0 : vteprec_manager_update_status_delkey(const struct vteprec_manager *row, const char *delete_key)
   11417                 :            : {
   11418                 :            :     struct ovsdb_datum *datum;
   11419                 :            : 
   11420         [ #  # ]:          0 :     ovs_assert(inited);
   11421                 :            : 
   11422                 :          0 :     datum = xmalloc(sizeof *datum);
   11423                 :          0 :     datum->n = 1;
   11424                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   11425                 :          0 :     datum->values = NULL;
   11426                 :            : 
   11427                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   11428                 :            : 
   11429                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   11430                 :            :                                     &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS],
   11431                 :            :                                     datum);
   11432                 :          0 : }
   11433                 :            : 
   11434                 :            : /* Sets the "inactivity_probe" column from the "Manager" table in 'row' to
   11435                 :            :  * the 'inactivity_probe' set with 'n_inactivity_probe' entries.
   11436                 :            :  *
   11437                 :            :  * 'n_inactivity_probe' may be 0 or 1; if it is 0, then 'inactivity_probe'
   11438                 :            :  * may be NULL.
   11439                 :            :  *
   11440                 :            :  * The caller retains ownership of the arguments. */
   11441                 :            : void
   11442                 :          0 : vteprec_manager_add_clause_inactivity_probe(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *inactivity_probe, size_t n_inactivity_probe)
   11443                 :            : {
   11444                 :            :     struct ovsdb_datum datum;
   11445                 :            :     union ovsdb_atom key;
   11446                 :            : 
   11447         [ #  # ]:          0 :     ovs_assert(inited);
   11448         [ #  # ]:          0 :     if (n_inactivity_probe) {
   11449                 :          0 :         datum.n = 1;
   11450                 :          0 :         datum.keys = &key;
   11451                 :          0 :         key.integer = *inactivity_probe;
   11452                 :            :     } else {
   11453                 :          0 :         datum.n = 0;
   11454                 :          0 :         datum.keys = NULL;
   11455                 :            :     }
   11456                 :          0 :     datum.values = NULL;
   11457                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11458                 :            :                           function,
   11459                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE],
   11460                 :            :                           &datum);
   11461                 :          0 : }
   11462                 :            : 
   11463                 :            : /* Sets the "is_connected" column from the "Manager" table in 'row' to
   11464                 :            :  * 'is_connected'.
   11465                 :            :  *
   11466                 :            :  * The caller retains ownership of the arguments. */
   11467                 :            : void
   11468                 :          0 : vteprec_manager_add_clause_is_connected(struct ovsdb_idl *idl, enum ovsdb_function function, bool is_connected)
   11469                 :            : {
   11470                 :            :     struct ovsdb_datum datum;
   11471                 :            :     union ovsdb_atom key;
   11472                 :            : 
   11473         [ #  # ]:          0 :     ovs_assert(inited);
   11474                 :          0 :     datum.n = 1;
   11475                 :          0 :     datum.keys = &key;
   11476                 :          0 :     key.boolean = is_connected;
   11477                 :          0 :     datum.values = NULL;
   11478                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11479                 :            :                           function,
   11480                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_IS_CONNECTED],
   11481                 :            :                           &datum);
   11482                 :          0 : }
   11483                 :            : 
   11484                 :            : /* Sets the "max_backoff" column from the "Manager" table in 'row' to
   11485                 :            :  * the 'max_backoff' set with 'n_max_backoff' entries.
   11486                 :            :  *
   11487                 :            :  * 'n_max_backoff' may be 0 or 1; if it is 0, then 'max_backoff'
   11488                 :            :  * may be NULL.
   11489                 :            :  *
   11490                 :            :  * Argument constraints: at least 1,000
   11491                 :            :  *
   11492                 :            :  * The caller retains ownership of the arguments. */
   11493                 :            : void
   11494                 :          0 : vteprec_manager_add_clause_max_backoff(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *max_backoff, size_t n_max_backoff)
   11495                 :            : {
   11496                 :            :     struct ovsdb_datum datum;
   11497                 :            :     union ovsdb_atom key;
   11498                 :            : 
   11499         [ #  # ]:          0 :     ovs_assert(inited);
   11500         [ #  # ]:          0 :     if (n_max_backoff) {
   11501                 :          0 :         datum.n = 1;
   11502                 :          0 :         datum.keys = &key;
   11503                 :          0 :         key.integer = *max_backoff;
   11504                 :            :     } else {
   11505                 :          0 :         datum.n = 0;
   11506                 :          0 :         datum.keys = NULL;
   11507                 :            :     }
   11508                 :          0 :     datum.values = NULL;
   11509                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11510                 :            :                           function,
   11511                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF],
   11512                 :            :                           &datum);
   11513                 :          0 : }
   11514                 :            : 
   11515                 :            : /* Sets the "other_config" column's value from the "Manager" table in 'row'
   11516                 :            :  * to 'other_config'.
   11517                 :            :  *
   11518                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   11519                 :            : void
   11520                 :          0 : vteprec_manager_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   11521                 :            : {
   11522                 :            :     struct ovsdb_datum datum;
   11523                 :            : 
   11524         [ #  # ]:          0 :     ovs_assert(inited);
   11525         [ #  # ]:          0 :     if (other_config) {
   11526                 :            :         struct smap_node *node;
   11527                 :            :         size_t i;
   11528                 :            : 
   11529                 :          0 :         datum.n = smap_count(other_config);
   11530                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11531                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11532                 :            : 
   11533                 :          0 :         i = 0;
   11534 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   11535                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11536                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11537                 :          0 :             i++;
   11538                 :            :         }
   11539                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11540                 :            :     } else {
   11541                 :          0 :         ovsdb_datum_init_empty(&datum);
   11542                 :            :     }
   11543                 :            : 
   11544                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   11545                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11546                 :            :                                    function,
   11547                 :            :                                    &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG],
   11548                 :            :                                    &datum);
   11549                 :            : 
   11550                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_manager_col_other_config.type);
   11551                 :          0 : }
   11552                 :            : 
   11553                 :            : 
   11554                 :            : /* Sets the "status" column's value from the "Manager" table in 'row'
   11555                 :            :  * to 'status'.
   11556                 :            :  *
   11557                 :            :  * The caller retains ownership of 'status' and everything in it. */
   11558                 :            : void
   11559                 :          0 : vteprec_manager_add_clause_status(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *status)
   11560                 :            : {
   11561                 :            :     struct ovsdb_datum datum;
   11562                 :            : 
   11563         [ #  # ]:          0 :     ovs_assert(inited);
   11564         [ #  # ]:          0 :     if (status) {
   11565                 :            :         struct smap_node *node;
   11566                 :            :         size_t i;
   11567                 :            : 
   11568                 :          0 :         datum.n = smap_count(status);
   11569                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11570                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11571                 :            : 
   11572                 :          0 :         i = 0;
   11573 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, status) {
   11574                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11575                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11576                 :          0 :             i++;
   11577                 :            :         }
   11578                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11579                 :            :     } else {
   11580                 :          0 :         ovsdb_datum_init_empty(&datum);
   11581                 :            :     }
   11582                 :            : 
   11583                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   11584                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11585                 :            :                                    function,
   11586                 :            :                                    &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS],
   11587                 :            :                                    &datum);
   11588                 :            : 
   11589                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_manager_col_status.type);
   11590                 :          0 : }
   11591                 :            : 
   11592                 :            : 
   11593                 :            : /* Sets the "target" column from the "Manager" table in 'row' to
   11594                 :            :  * 'target'.
   11595                 :            :  *
   11596                 :            :  * The caller retains ownership of the arguments. */
   11597                 :            : void
   11598                 :          0 : vteprec_manager_add_clause_target(struct ovsdb_idl *idl, enum ovsdb_function function, const char *target)
   11599                 :            : {
   11600                 :            :     struct ovsdb_datum datum;
   11601                 :            :     union ovsdb_atom key;
   11602                 :            : 
   11603         [ #  # ]:          0 :     ovs_assert(inited);
   11604                 :          0 :     datum.n = 1;
   11605                 :          0 :     datum.keys = &key;
   11606                 :          0 :     key.string = CONST_CAST(char *, target);
   11607                 :          0 :     datum.values = NULL;
   11608                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11609                 :            :                           function,
   11610                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_TARGET],
   11611                 :            :                           &datum);
   11612                 :          0 : }
   11613                 :            : void
   11614                 :          0 : vteprec_manager_add_clause_false(struct ovsdb_idl *idl)
   11615                 :            : {
   11616                 :            :     struct ovsdb_datum datum;
   11617                 :            : 
   11618                 :          0 :     ovsdb_datum_init_empty(&datum);
   11619                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], OVSDB_F_FALSE, NULL, &datum);
   11620                 :          0 : }
   11621                 :            : void
   11622                 :          0 : vteprec_manager_add_clause_true(struct ovsdb_idl *idl)
   11623                 :            : {
   11624                 :            :     struct ovsdb_datum datum;
   11625                 :            : 
   11626                 :          0 :     ovsdb_datum_init_empty(&datum);
   11627                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], OVSDB_F_TRUE, NULL, &datum);
   11628                 :          0 : }
   11629                 :            : 
   11630                 :            : /* Sets the "inactivity_probe" column from the "Manager" table in 'row' to
   11631                 :            :  * the 'inactivity_probe' set with 'n_inactivity_probe' entries.
   11632                 :            :  *
   11633                 :            :  * 'n_inactivity_probe' may be 0 or 1; if it is 0, then 'inactivity_probe'
   11634                 :            :  * may be NULL.
   11635                 :            :  *
   11636                 :            :  * The caller retains ownership of the arguments. */
   11637                 :            : void
   11638                 :          0 : vteprec_manager_remove_clause_inactivity_probe(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *inactivity_probe, size_t n_inactivity_probe)
   11639                 :            : {
   11640                 :            :     struct ovsdb_datum datum;
   11641                 :            :     union ovsdb_atom key;
   11642                 :            : 
   11643         [ #  # ]:          0 :     ovs_assert(inited);
   11644         [ #  # ]:          0 :     if (n_inactivity_probe) {
   11645                 :          0 :         datum.n = 1;
   11646                 :          0 :         datum.keys = &key;
   11647                 :          0 :         key.integer = *inactivity_probe;
   11648                 :            :     } else {
   11649                 :          0 :         datum.n = 0;
   11650                 :          0 :         datum.keys = NULL;
   11651                 :            :     }
   11652                 :          0 :     datum.values = NULL;
   11653                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11654                 :            :                           function,
   11655                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_INACTIVITY_PROBE],
   11656                 :            :                           &datum);
   11657                 :          0 : }
   11658                 :            : 
   11659                 :            : /* Sets the "is_connected" column from the "Manager" table in 'row' to
   11660                 :            :  * 'is_connected'.
   11661                 :            :  *
   11662                 :            :  * The caller retains ownership of the arguments. */
   11663                 :            : void
   11664                 :          0 : vteprec_manager_remove_clause_is_connected(struct ovsdb_idl *idl, enum ovsdb_function function, bool is_connected)
   11665                 :            : {
   11666                 :            :     struct ovsdb_datum datum;
   11667                 :            :     union ovsdb_atom key;
   11668                 :            : 
   11669         [ #  # ]:          0 :     ovs_assert(inited);
   11670                 :          0 :     datum.n = 1;
   11671                 :          0 :     datum.keys = &key;
   11672                 :          0 :     key.boolean = is_connected;
   11673                 :          0 :     datum.values = NULL;
   11674                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11675                 :            :                           function,
   11676                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_IS_CONNECTED],
   11677                 :            :                           &datum);
   11678                 :          0 : }
   11679                 :            : 
   11680                 :            : /* Sets the "max_backoff" column from the "Manager" table in 'row' to
   11681                 :            :  * the 'max_backoff' set with 'n_max_backoff' entries.
   11682                 :            :  *
   11683                 :            :  * 'n_max_backoff' may be 0 or 1; if it is 0, then 'max_backoff'
   11684                 :            :  * may be NULL.
   11685                 :            :  *
   11686                 :            :  * Argument constraints: at least 1,000
   11687                 :            :  *
   11688                 :            :  * The caller retains ownership of the arguments. */
   11689                 :            : void
   11690                 :          0 : vteprec_manager_remove_clause_max_backoff(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *max_backoff, size_t n_max_backoff)
   11691                 :            : {
   11692                 :            :     struct ovsdb_datum datum;
   11693                 :            :     union ovsdb_atom key;
   11694                 :            : 
   11695         [ #  # ]:          0 :     ovs_assert(inited);
   11696         [ #  # ]:          0 :     if (n_max_backoff) {
   11697                 :          0 :         datum.n = 1;
   11698                 :          0 :         datum.keys = &key;
   11699                 :          0 :         key.integer = *max_backoff;
   11700                 :            :     } else {
   11701                 :          0 :         datum.n = 0;
   11702                 :          0 :         datum.keys = NULL;
   11703                 :            :     }
   11704                 :          0 :     datum.values = NULL;
   11705                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11706                 :            :                           function,
   11707                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_MAX_BACKOFF],
   11708                 :            :                           &datum);
   11709                 :          0 : }
   11710                 :            : 
   11711                 :            : /* Sets the "other_config" column's value from the "Manager" table in 'row'
   11712                 :            :  * to 'other_config'.
   11713                 :            :  *
   11714                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   11715                 :            : void
   11716                 :          0 : vteprec_manager_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   11717                 :            : {
   11718                 :            :     struct ovsdb_datum datum;
   11719                 :            : 
   11720         [ #  # ]:          0 :     ovs_assert(inited);
   11721         [ #  # ]:          0 :     if (other_config) {
   11722                 :            :         struct smap_node *node;
   11723                 :            :         size_t i;
   11724                 :            : 
   11725                 :          0 :         datum.n = smap_count(other_config);
   11726                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11727                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11728                 :            : 
   11729                 :          0 :         i = 0;
   11730 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   11731                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11732                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11733                 :          0 :             i++;
   11734                 :            :         }
   11735                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11736                 :            :     } else {
   11737                 :          0 :         ovsdb_datum_init_empty(&datum);
   11738                 :            :     }
   11739                 :            : 
   11740                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11741                 :            :                                       function,
   11742                 :            :                                       &vteprec_manager_columns[VTEPREC_MANAGER_COL_OTHER_CONFIG],
   11743                 :            :                                       &datum);
   11744                 :            : 
   11745                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_manager_col_other_config.type);
   11746                 :          0 : }
   11747                 :            : 
   11748                 :            : 
   11749                 :            : /* Sets the "status" column's value from the "Manager" table in 'row'
   11750                 :            :  * to 'status'.
   11751                 :            :  *
   11752                 :            :  * The caller retains ownership of 'status' and everything in it. */
   11753                 :            : void
   11754                 :          0 : vteprec_manager_remove_clause_status(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *status)
   11755                 :            : {
   11756                 :            :     struct ovsdb_datum datum;
   11757                 :            : 
   11758         [ #  # ]:          0 :     ovs_assert(inited);
   11759         [ #  # ]:          0 :     if (status) {
   11760                 :            :         struct smap_node *node;
   11761                 :            :         size_t i;
   11762                 :            : 
   11763                 :          0 :         datum.n = smap_count(status);
   11764                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   11765                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   11766                 :            : 
   11767                 :          0 :         i = 0;
   11768 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, status) {
   11769                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   11770                 :          0 :             datum.values[i].string = xstrdup(node->value);
   11771                 :          0 :             i++;
   11772                 :            :         }
   11773                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   11774                 :            :     } else {
   11775                 :          0 :         ovsdb_datum_init_empty(&datum);
   11776                 :            :     }
   11777                 :            : 
   11778                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11779                 :            :                                       function,
   11780                 :            :                                       &vteprec_manager_columns[VTEPREC_MANAGER_COL_STATUS],
   11781                 :            :                                       &datum);
   11782                 :            : 
   11783                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_manager_col_status.type);
   11784                 :          0 : }
   11785                 :            : 
   11786                 :            : 
   11787                 :            : /* Sets the "target" column from the "Manager" table in 'row' to
   11788                 :            :  * 'target'.
   11789                 :            :  *
   11790                 :            :  * The caller retains ownership of the arguments. */
   11791                 :            : void
   11792                 :          0 : vteprec_manager_remove_clause_target(struct ovsdb_idl *idl, enum ovsdb_function function, const char *target)
   11793                 :            : {
   11794                 :            :     struct ovsdb_datum datum;
   11795                 :            :     union ovsdb_atom key;
   11796                 :            : 
   11797         [ #  # ]:          0 :     ovs_assert(inited);
   11798                 :          0 :     datum.n = 1;
   11799                 :          0 :     datum.keys = &key;
   11800                 :          0 :     key.string = CONST_CAST(char *, target);
   11801                 :          0 :     datum.values = NULL;
   11802                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER],
   11803                 :            :                           function,
   11804                 :            :                           &vteprec_manager_columns[VTEPREC_MANAGER_COL_TARGET],
   11805                 :            :                           &datum);
   11806                 :          0 : }
   11807                 :            : void
   11808                 :          0 : vteprec_manager_remove_clause_false(struct ovsdb_idl *idl)
   11809                 :            : {
   11810                 :            :     struct ovsdb_datum datum;
   11811                 :            : 
   11812                 :          0 :     ovsdb_datum_init_empty(&datum);
   11813                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], OVSDB_F_FALSE, NULL, &datum);
   11814                 :          0 : }
   11815                 :            : void
   11816                 :          0 : vteprec_manager_remove_clause_true(struct ovsdb_idl *idl)
   11817                 :            : {
   11818                 :            :     struct ovsdb_datum datum;
   11819                 :            : 
   11820                 :          0 :     ovsdb_datum_init_empty(&datum);
   11821                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MANAGER], OVSDB_F_TRUE, NULL, &datum);
   11822                 :          0 : }
   11823                 :            : 
   11824                 :            : struct ovsdb_idl_column vteprec_manager_columns[VTEPREC_MANAGER_N_COLUMNS];
   11825                 :            : 
   11826                 :            : static void
   11827                 :        741 : vteprec_manager_columns_init(void)
   11828                 :            : {
   11829                 :            :     struct ovsdb_idl_column *c;
   11830                 :            : 
   11831                 :            :     /* Initialize vteprec_manager_col_inactivity_probe. */
   11832                 :        741 :     c = &vteprec_manager_col_inactivity_probe;
   11833                 :        741 :     c->name = "inactivity_probe";
   11834                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   11835                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   11836                 :        741 :     c->type.n_min = 0;
   11837                 :        741 :     c->type.n_max = 1;
   11838                 :        741 :     c->mutable = true;
   11839                 :        741 :     c->parse = vteprec_manager_parse_inactivity_probe;
   11840                 :        741 :     c->unparse = vteprec_manager_unparse_inactivity_probe;
   11841                 :            : 
   11842                 :            :     /* Initialize vteprec_manager_col_is_connected. */
   11843                 :        741 :     c = &vteprec_manager_col_is_connected;
   11844                 :        741 :     c->name = "is_connected";
   11845                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_BOOLEAN);
   11846                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   11847                 :        741 :     c->type.n_min = 1;
   11848                 :        741 :     c->type.n_max = 1;
   11849                 :        741 :     c->mutable = true;
   11850                 :        741 :     c->parse = vteprec_manager_parse_is_connected;
   11851                 :        741 :     c->unparse = vteprec_manager_unparse_is_connected;
   11852                 :            : 
   11853                 :            :     /* Initialize vteprec_manager_col_max_backoff. */
   11854                 :        741 :     c = &vteprec_manager_col_max_backoff;
   11855                 :        741 :     c->name = "max_backoff";
   11856                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   11857                 :        741 :     c->type.key.u.integer.min = INT64_C(1000);
   11858                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   11859                 :        741 :     c->type.n_min = 0;
   11860                 :        741 :     c->type.n_max = 1;
   11861                 :        741 :     c->mutable = true;
   11862                 :        741 :     c->parse = vteprec_manager_parse_max_backoff;
   11863                 :        741 :     c->unparse = vteprec_manager_unparse_max_backoff;
   11864                 :            : 
   11865                 :            :     /* Initialize vteprec_manager_col_other_config. */
   11866                 :        741 :     c = &vteprec_manager_col_other_config;
   11867                 :        741 :     c->name = "other_config";
   11868                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   11869                 :        741 :     c->type.key.u.string.minLen = 0;
   11870                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   11871                 :        741 :     c->type.value.u.string.minLen = 0;
   11872                 :        741 :     c->type.n_min = 0;
   11873                 :        741 :     c->type.n_max = UINT_MAX;
   11874                 :        741 :     c->mutable = true;
   11875                 :        741 :     c->parse = vteprec_manager_parse_other_config;
   11876                 :        741 :     c->unparse = vteprec_manager_unparse_other_config;
   11877                 :            : 
   11878                 :            :     /* Initialize vteprec_manager_col_status. */
   11879                 :        741 :     c = &vteprec_manager_col_status;
   11880                 :        741 :     c->name = "status";
   11881                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   11882                 :        741 :     c->type.key.u.string.minLen = 0;
   11883                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   11884                 :        741 :     c->type.value.u.string.minLen = 0;
   11885                 :        741 :     c->type.n_min = 0;
   11886                 :        741 :     c->type.n_max = UINT_MAX;
   11887                 :        741 :     c->mutable = true;
   11888                 :        741 :     c->parse = vteprec_manager_parse_status;
   11889                 :        741 :     c->unparse = vteprec_manager_unparse_status;
   11890                 :            : 
   11891                 :            :     /* Initialize vteprec_manager_col_target. */
   11892                 :        741 :     c = &vteprec_manager_col_target;
   11893                 :        741 :     c->name = "target";
   11894                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   11895                 :        741 :     c->type.key.u.string.minLen = 0;
   11896                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   11897                 :        741 :     c->type.n_min = 1;
   11898                 :        741 :     c->type.n_max = 1;
   11899                 :        741 :     c->mutable = true;
   11900                 :        741 :     c->parse = vteprec_manager_parse_target;
   11901                 :        741 :     c->unparse = vteprec_manager_unparse_target;
   11902                 :        741 : }
   11903                 :            : 
   11904                 :            : /* Mcast_Macs_Local table. */
   11905                 :            : 
   11906                 :            : static void
   11907                 :        314 : vteprec_mcast_macs_local_parse_MAC(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   11908                 :            : {
   11909                 :        314 :     struct vteprec_mcast_macs_local *row = vteprec_mcast_macs_local_cast(row_);
   11910                 :            : 
   11911         [ -  + ]:        314 :     ovs_assert(inited);
   11912         [ +  - ]:        314 :     if (datum->n >= 1) {
   11913                 :        314 :         row->MAC = datum->keys[0].string;
   11914                 :            :     } else {
   11915                 :          0 :         row->MAC = "";
   11916                 :            :     }
   11917                 :        314 : }
   11918                 :            : 
   11919                 :            : static void
   11920                 :        295 : vteprec_mcast_macs_local_parse_ipaddr(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   11921                 :            : {
   11922                 :        295 :     struct vteprec_mcast_macs_local *row = vteprec_mcast_macs_local_cast(row_);
   11923                 :            : 
   11924         [ -  + ]:        295 :     ovs_assert(inited);
   11925         [ +  - ]:        295 :     if (datum->n >= 1) {
   11926                 :        295 :         row->ipaddr = datum->keys[0].string;
   11927                 :            :     } else {
   11928                 :          0 :         row->ipaddr = "";
   11929                 :            :     }
   11930                 :        295 : }
   11931                 :            : 
   11932                 :            : static void
   11933                 :        321 : vteprec_mcast_macs_local_parse_locator_set(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   11934                 :            : {
   11935                 :        321 :     struct vteprec_mcast_macs_local *row = vteprec_mcast_macs_local_cast(row_);
   11936                 :            : 
   11937         [ -  + ]:        321 :     ovs_assert(inited);
   11938         [ +  - ]:        321 :     if (datum->n >= 1) {
   11939                 :        321 :         row->locator_set = vteprec_physical_locator_set_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], &datum->keys[0].uuid));
   11940                 :            :     } else {
   11941                 :          0 :         row->locator_set = NULL;
   11942                 :            :     }
   11943                 :        321 : }
   11944                 :            : 
   11945                 :            : static void
   11946                 :        314 : vteprec_mcast_macs_local_parse_logical_switch(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   11947                 :            : {
   11948                 :        314 :     struct vteprec_mcast_macs_local *row = vteprec_mcast_macs_local_cast(row_);
   11949                 :            : 
   11950         [ -  + ]:        314 :     ovs_assert(inited);
   11951         [ +  - ]:        314 :     if (datum->n >= 1) {
   11952                 :        314 :         row->logical_switch = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->keys[0].uuid));
   11953                 :            :     } else {
   11954                 :          0 :         row->logical_switch = NULL;
   11955                 :            :     }
   11956                 :        314 : }
   11957                 :            : 
   11958                 :            : static void
   11959                 :        333 : vteprec_mcast_macs_local_unparse_MAC(struct ovsdb_idl_row *row OVS_UNUSED)
   11960                 :            : {
   11961                 :            :     /* Nothing to do. */
   11962                 :        333 : }
   11963                 :            : 
   11964                 :            : static void
   11965                 :        314 : vteprec_mcast_macs_local_unparse_ipaddr(struct ovsdb_idl_row *row OVS_UNUSED)
   11966                 :            : {
   11967                 :            :     /* Nothing to do. */
   11968                 :        314 : }
   11969                 :            : 
   11970                 :            : static void
   11971                 :        340 : vteprec_mcast_macs_local_unparse_locator_set(struct ovsdb_idl_row *row OVS_UNUSED)
   11972                 :            : {
   11973                 :            :     /* Nothing to do. */
   11974                 :        340 : }
   11975                 :            : 
   11976                 :            : static void
   11977                 :        333 : vteprec_mcast_macs_local_unparse_logical_switch(struct ovsdb_idl_row *row OVS_UNUSED)
   11978                 :            : {
   11979                 :            :     /* Nothing to do. */
   11980                 :        333 : }
   11981                 :            : 
   11982                 :            : static void
   11983                 :        167 : vteprec_mcast_macs_local_init__(struct ovsdb_idl_row *row)
   11984                 :            : {
   11985                 :        167 :     vteprec_mcast_macs_local_init(vteprec_mcast_macs_local_cast(row));
   11986                 :        167 : }
   11987                 :            : 
   11988                 :            : /* Clears the contents of 'row' in table "Mcast_Macs_Local". */
   11989                 :            : void
   11990                 :        167 : vteprec_mcast_macs_local_init(struct vteprec_mcast_macs_local *row)
   11991                 :            : {
   11992                 :        167 :     memset(row, 0, sizeof *row); 
   11993                 :        167 : }
   11994                 :            : 
   11995                 :            : /* Searches table "Mcast_Macs_Local" in 'idl' for a row with UUID 'uuid'.  Returns
   11996                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   11997                 :            : const struct vteprec_mcast_macs_local *
   11998                 :          0 : vteprec_mcast_macs_local_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   11999                 :            : {
   12000                 :          0 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], uuid));
   12001                 :            : }
   12002                 :            : 
   12003                 :            : /* Returns a row in table "Mcast_Macs_Local" in 'idl', or a null pointer if that
   12004                 :            :  * table is empty.
   12005                 :            :  *
   12006                 :            :  * Database tables are internally maintained as hash tables, so adding or
   12007                 :            :  * removing rows while traversing the same table can cause some rows to be
   12008                 :            :  * visited twice or not at apply. */
   12009                 :            : const struct vteprec_mcast_macs_local *
   12010                 :        484 : vteprec_mcast_macs_local_first(const struct ovsdb_idl *idl)
   12011                 :            : {
   12012                 :        484 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL]));
   12013                 :            : }
   12014                 :            : 
   12015                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   12016                 :            :  * is the last row in its table. */
   12017                 :            : const struct vteprec_mcast_macs_local *
   12018                 :        122 : vteprec_mcast_macs_local_next(const struct vteprec_mcast_macs_local *row)
   12019                 :            : {
   12020                 :        122 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_next_row(&row->header_));
   12021                 :            : }
   12022                 :            : 
   12023                 :          0 : unsigned int vteprec_mcast_macs_local_get_seqno(const struct ovsdb_idl *idl)
   12024                 :            : {
   12025                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL]);
   12026                 :            : }
   12027                 :            : 
   12028                 :          0 : unsigned int vteprec_mcast_macs_local_row_get_seqno(const struct vteprec_mcast_macs_local *row, enum ovsdb_idl_change change)
   12029                 :            : {
   12030                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   12031                 :            : }
   12032                 :            : 
   12033                 :            : const struct vteprec_mcast_macs_local *
   12034                 :          0 : vteprec_mcast_macs_local_track_get_first(const struct ovsdb_idl *idl)
   12035                 :            : {
   12036                 :          0 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL]));
   12037                 :            : }
   12038                 :            : 
   12039                 :            : const struct vteprec_mcast_macs_local
   12040                 :          0 : *vteprec_mcast_macs_local_track_get_next(const struct vteprec_mcast_macs_local *row)
   12041                 :            : {
   12042                 :          0 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_track_get_next(&row->header_));
   12043                 :            : }
   12044                 :            : 
   12045                 :            : 
   12046                 :            : /* Deletes 'row' from table "Mcast_Macs_Local".  'row' may be freed, so it must not be
   12047                 :            :  * accessed afterward.
   12048                 :            :  *
   12049                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12050                 :            : void
   12051                 :          4 : vteprec_mcast_macs_local_delete(const struct vteprec_mcast_macs_local *row)
   12052                 :            : {
   12053                 :          4 :     ovsdb_idl_txn_delete(&row->header_);
   12054                 :          4 : }
   12055                 :            : 
   12056                 :            : /* Inserts and returns a new row in the table "Mcast_Macs_Local" in the database
   12057                 :            :  * with open transaction 'txn'.
   12058                 :            :  *
   12059                 :            :  * The new row is assigned a randomly generated provisional UUID.
   12060                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   12061                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   12062                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   12063                 :            : struct vteprec_mcast_macs_local *
   12064                 :         19 : vteprec_mcast_macs_local_insert(struct ovsdb_idl_txn *txn)
   12065                 :            : {
   12066                 :         19 :     return vteprec_mcast_macs_local_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], NULL));
   12067                 :            : }
   12068                 :            : 
   12069                 :            : bool
   12070                 :          0 : vteprec_mcast_macs_local_is_updated(const struct vteprec_mcast_macs_local *row, enum vteprec_mcast_macs_local_column_id column)
   12071                 :            : {
   12072                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_mcast_macs_local_columns[column]);
   12073                 :            : }
   12074                 :            : 
   12075                 :            : /* Causes the original contents of column "MAC" in 'row' to be
   12076                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12077                 :            :  * "MAC" in 'row' changed (or if 'row' was deleted) between the
   12078                 :            :  * time that the IDL originally read its contents and the time that the
   12079                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12080                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12081                 :            :  * change has already been received).
   12082                 :            :  *
   12083                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12084                 :            :  * reads, an application should call this function any time "MAC" is
   12085                 :            :  * read as part of a read-modify-write operation.
   12086                 :            :  *
   12087                 :            :  * In some cases this function reduces to a no-op, because the current value
   12088                 :            :  * of "MAC" is already known:
   12089                 :            :  *
   12090                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12091                 :            :  *     vteprec_mcast_macs_local_insert()).
   12092                 :            :  *
   12093                 :            :  *   - If "MAC" has already been modified (with
   12094                 :            :  *     vteprec_mcast_macs_local_set_MAC()) within the current transaction.
   12095                 :            :  *
   12096                 :            :  * Because of the latter property, always call this function *before*
   12097                 :            :  * vteprec_mcast_macs_local_set_MAC() for a given read-modify-write.
   12098                 :            :  *
   12099                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12100                 :            : void
   12101                 :          0 : vteprec_mcast_macs_local_verify_MAC(const struct vteprec_mcast_macs_local *row)
   12102                 :            : {
   12103         [ #  # ]:          0 :     ovs_assert(inited);
   12104                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_MAC]);
   12105                 :          0 : }
   12106                 :            : 
   12107                 :            : /* Causes the original contents of column "ipaddr" in 'row' to be
   12108                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12109                 :            :  * "ipaddr" in 'row' changed (or if 'row' was deleted) between the
   12110                 :            :  * time that the IDL originally read its contents and the time that the
   12111                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12112                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12113                 :            :  * change has already been received).
   12114                 :            :  *
   12115                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12116                 :            :  * reads, an application should call this function any time "ipaddr" is
   12117                 :            :  * read as part of a read-modify-write operation.
   12118                 :            :  *
   12119                 :            :  * In some cases this function reduces to a no-op, because the current value
   12120                 :            :  * of "ipaddr" is already known:
   12121                 :            :  *
   12122                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12123                 :            :  *     vteprec_mcast_macs_local_insert()).
   12124                 :            :  *
   12125                 :            :  *   - If "ipaddr" has already been modified (with
   12126                 :            :  *     vteprec_mcast_macs_local_set_ipaddr()) within the current transaction.
   12127                 :            :  *
   12128                 :            :  * Because of the latter property, always call this function *before*
   12129                 :            :  * vteprec_mcast_macs_local_set_ipaddr() for a given read-modify-write.
   12130                 :            :  *
   12131                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12132                 :            : void
   12133                 :          0 : vteprec_mcast_macs_local_verify_ipaddr(const struct vteprec_mcast_macs_local *row)
   12134                 :            : {
   12135         [ #  # ]:          0 :     ovs_assert(inited);
   12136                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_IPADDR]);
   12137                 :          0 : }
   12138                 :            : 
   12139                 :            : /* Causes the original contents of column "locator_set" in 'row' to be
   12140                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12141                 :            :  * "locator_set" in 'row' changed (or if 'row' was deleted) between the
   12142                 :            :  * time that the IDL originally read its contents and the time that the
   12143                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12144                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12145                 :            :  * change has already been received).
   12146                 :            :  *
   12147                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12148                 :            :  * reads, an application should call this function any time "locator_set" is
   12149                 :            :  * read as part of a read-modify-write operation.
   12150                 :            :  *
   12151                 :            :  * In some cases this function reduces to a no-op, because the current value
   12152                 :            :  * of "locator_set" is already known:
   12153                 :            :  *
   12154                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12155                 :            :  *     vteprec_mcast_macs_local_insert()).
   12156                 :            :  *
   12157                 :            :  *   - If "locator_set" has already been modified (with
   12158                 :            :  *     vteprec_mcast_macs_local_set_locator_set()) within the current transaction.
   12159                 :            :  *
   12160                 :            :  * Because of the latter property, always call this function *before*
   12161                 :            :  * vteprec_mcast_macs_local_set_locator_set() for a given read-modify-write.
   12162                 :            :  *
   12163                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12164                 :            : void
   12165                 :          0 : vteprec_mcast_macs_local_verify_locator_set(const struct vteprec_mcast_macs_local *row)
   12166                 :            : {
   12167         [ #  # ]:          0 :     ovs_assert(inited);
   12168                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOCATOR_SET]);
   12169                 :          0 : }
   12170                 :            : 
   12171                 :            : /* Causes the original contents of column "logical_switch" in 'row' to be
   12172                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12173                 :            :  * "logical_switch" in 'row' changed (or if 'row' was deleted) between the
   12174                 :            :  * time that the IDL originally read its contents and the time that the
   12175                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12176                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12177                 :            :  * change has already been received).
   12178                 :            :  *
   12179                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12180                 :            :  * reads, an application should call this function any time "logical_switch" is
   12181                 :            :  * read as part of a read-modify-write operation.
   12182                 :            :  *
   12183                 :            :  * In some cases this function reduces to a no-op, because the current value
   12184                 :            :  * of "logical_switch" is already known:
   12185                 :            :  *
   12186                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12187                 :            :  *     vteprec_mcast_macs_local_insert()).
   12188                 :            :  *
   12189                 :            :  *   - If "logical_switch" has already been modified (with
   12190                 :            :  *     vteprec_mcast_macs_local_set_logical_switch()) within the current transaction.
   12191                 :            :  *
   12192                 :            :  * Because of the latter property, always call this function *before*
   12193                 :            :  * vteprec_mcast_macs_local_set_logical_switch() for a given read-modify-write.
   12194                 :            :  *
   12195                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12196                 :            : void
   12197                 :          0 : vteprec_mcast_macs_local_verify_logical_switch(const struct vteprec_mcast_macs_local *row)
   12198                 :            : {
   12199         [ #  # ]:          0 :     ovs_assert(inited);
   12200                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOGICAL_SWITCH]);
   12201                 :          0 : }
   12202                 :            : 
   12203                 :            : /* Returns the "MAC" column's value from the "Mcast_Macs_Local" table in 'row'
   12204                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12205                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12206                 :            :  * for a given key than implementing the same operation on the "cooked"
   12207                 :            :  * form in 'row'.
   12208                 :            :  *
   12209                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   12210                 :            :  * (This helps to avoid silent bugs if someone changes MAC's
   12211                 :            :  * type without updating the caller.)
   12212                 :            :  *
   12213                 :            :  * The caller must not modify or free the returned value.
   12214                 :            :  *
   12215                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12216                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12217                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12218                 :            :  * of it with ovsdb_datum_clone().
   12219                 :            :  *
   12220                 :            :  * This function is rarely useful, since it is easier to access the value
   12221                 :            :  * directly through the "MAC" member in vteprec_mcast_macs_local. */
   12222                 :            : const struct ovsdb_datum *
   12223                 :          0 : vteprec_mcast_macs_local_get_MAC(const struct vteprec_mcast_macs_local *row,
   12224                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12225                 :            : {
   12226         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   12227                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_local_col_MAC);
   12228                 :            : }
   12229                 :            : 
   12230                 :            : /* Returns the "ipaddr" column's value from the "Mcast_Macs_Local" table in 'row'
   12231                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12232                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12233                 :            :  * for a given key than implementing the same operation on the "cooked"
   12234                 :            :  * form in 'row'.
   12235                 :            :  *
   12236                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   12237                 :            :  * (This helps to avoid silent bugs if someone changes ipaddr's
   12238                 :            :  * type without updating the caller.)
   12239                 :            :  *
   12240                 :            :  * The caller must not modify or free the returned value.
   12241                 :            :  *
   12242                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12243                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12244                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12245                 :            :  * of it with ovsdb_datum_clone().
   12246                 :            :  *
   12247                 :            :  * This function is rarely useful, since it is easier to access the value
   12248                 :            :  * directly through the "ipaddr" member in vteprec_mcast_macs_local. */
   12249                 :            : const struct ovsdb_datum *
   12250                 :          0 : vteprec_mcast_macs_local_get_ipaddr(const struct vteprec_mcast_macs_local *row,
   12251                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12252                 :            : {
   12253         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   12254                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_local_col_ipaddr);
   12255                 :            : }
   12256                 :            : 
   12257                 :            : /* Returns the "locator_set" column's value from the "Mcast_Macs_Local" table in 'row'
   12258                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12259                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12260                 :            :  * for a given key than implementing the same operation on the "cooked"
   12261                 :            :  * form in 'row'.
   12262                 :            :  *
   12263                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   12264                 :            :  * (This helps to avoid silent bugs if someone changes locator_set's
   12265                 :            :  * type without updating the caller.)
   12266                 :            :  *
   12267                 :            :  * The caller must not modify or free the returned value.
   12268                 :            :  *
   12269                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12270                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12271                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12272                 :            :  * of it with ovsdb_datum_clone().
   12273                 :            :  *
   12274                 :            :  * This function is rarely useful, since it is easier to access the value
   12275                 :            :  * directly through the "locator_set" member in vteprec_mcast_macs_local. */
   12276                 :            : const struct ovsdb_datum *
   12277                 :          0 : vteprec_mcast_macs_local_get_locator_set(const struct vteprec_mcast_macs_local *row,
   12278                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12279                 :            : {
   12280         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   12281                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_local_col_locator_set);
   12282                 :            : }
   12283                 :            : 
   12284                 :            : /* Returns the "logical_switch" column's value from the "Mcast_Macs_Local" table in 'row'
   12285                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12286                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12287                 :            :  * for a given key than implementing the same operation on the "cooked"
   12288                 :            :  * form in 'row'.
   12289                 :            :  *
   12290                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   12291                 :            :  * (This helps to avoid silent bugs if someone changes logical_switch's
   12292                 :            :  * type without updating the caller.)
   12293                 :            :  *
   12294                 :            :  * The caller must not modify or free the returned value.
   12295                 :            :  *
   12296                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12297                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12298                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12299                 :            :  * of it with ovsdb_datum_clone().
   12300                 :            :  *
   12301                 :            :  * This function is rarely useful, since it is easier to access the value
   12302                 :            :  * directly through the "logical_switch" member in vteprec_mcast_macs_local. */
   12303                 :            : const struct ovsdb_datum *
   12304                 :          0 : vteprec_mcast_macs_local_get_logical_switch(const struct vteprec_mcast_macs_local *row,
   12305                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12306                 :            : {
   12307         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   12308                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_local_col_logical_switch);
   12309                 :            : }
   12310                 :            : 
   12311                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Local" table in 'row' to
   12312                 :            :  * 'MAC'.
   12313                 :            :  *
   12314                 :            :  * The caller retains ownership of the arguments. */
   12315                 :            : void
   12316                 :         19 : vteprec_mcast_macs_local_set_MAC(const struct vteprec_mcast_macs_local *row, const char *MAC)
   12317                 :            : {
   12318                 :            :     struct ovsdb_datum datum;
   12319                 :            :     union ovsdb_atom key;
   12320                 :            : 
   12321         [ -  + ]:         19 :     ovs_assert(inited);
   12322                 :         19 :     datum.n = 1;
   12323                 :         19 :     datum.keys = &key;
   12324                 :         19 :     key.string = CONST_CAST(char *, MAC);
   12325                 :         19 :     datum.values = NULL;
   12326                 :         19 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_MAC], &datum);
   12327                 :         19 : }
   12328                 :            : 
   12329                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Local" table in 'row' to
   12330                 :            :  * 'ipaddr'.
   12331                 :            :  *
   12332                 :            :  * The caller retains ownership of the arguments. */
   12333                 :            : void
   12334                 :          0 : vteprec_mcast_macs_local_set_ipaddr(const struct vteprec_mcast_macs_local *row, const char *ipaddr)
   12335                 :            : {
   12336                 :            :     struct ovsdb_datum datum;
   12337                 :            :     union ovsdb_atom key;
   12338                 :            : 
   12339         [ #  # ]:          0 :     ovs_assert(inited);
   12340                 :          0 :     datum.n = 1;
   12341                 :          0 :     datum.keys = &key;
   12342                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   12343                 :          0 :     datum.values = NULL;
   12344                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_IPADDR], &datum);
   12345                 :          0 : }
   12346                 :            : 
   12347                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Local" table in 'row' to
   12348                 :            :  * 'locator_set'.
   12349                 :            :  *
   12350                 :            :  * The caller retains ownership of the arguments. */
   12351                 :            : void
   12352                 :         26 : vteprec_mcast_macs_local_set_locator_set(const struct vteprec_mcast_macs_local *row, const struct vteprec_physical_locator_set *locator_set)
   12353                 :            : {
   12354                 :            :     struct ovsdb_datum datum;
   12355                 :            :     union ovsdb_atom key;
   12356                 :            : 
   12357         [ -  + ]:         26 :     ovs_assert(inited);
   12358                 :         26 :     datum.n = 1;
   12359                 :         26 :     datum.keys = &key;
   12360                 :         26 :     key.uuid = locator_set->header_.uuid;
   12361                 :         26 :     datum.values = NULL;
   12362                 :         26 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOCATOR_SET], &datum);
   12363                 :         26 : }
   12364                 :            : 
   12365                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Local" table in 'row' to
   12366                 :            :  * 'logical_switch'.
   12367                 :            :  *
   12368                 :            :  * The caller retains ownership of the arguments. */
   12369                 :            : void
   12370                 :         19 : vteprec_mcast_macs_local_set_logical_switch(const struct vteprec_mcast_macs_local *row, const struct vteprec_logical_switch *logical_switch)
   12371                 :            : {
   12372                 :            :     struct ovsdb_datum datum;
   12373                 :            :     union ovsdb_atom key;
   12374                 :            : 
   12375         [ -  + ]:         19 :     ovs_assert(inited);
   12376                 :         19 :     datum.n = 1;
   12377                 :         19 :     datum.keys = &key;
   12378                 :         19 :     key.uuid = logical_switch->header_.uuid;
   12379                 :         19 :     datum.values = NULL;
   12380                 :         19 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOGICAL_SWITCH], &datum);
   12381                 :         19 : }
   12382                 :            : 
   12383                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Local" table in 'row' to
   12384                 :            :  * 'MAC'.
   12385                 :            :  *
   12386                 :            :  * The caller retains ownership of the arguments. */
   12387                 :            : void
   12388                 :          0 : vteprec_mcast_macs_local_add_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   12389                 :            : {
   12390                 :            :     struct ovsdb_datum datum;
   12391                 :            :     union ovsdb_atom key;
   12392                 :            : 
   12393         [ #  # ]:          0 :     ovs_assert(inited);
   12394                 :          0 :     datum.n = 1;
   12395                 :          0 :     datum.keys = &key;
   12396                 :          0 :     key.string = CONST_CAST(char *, MAC);
   12397                 :          0 :     datum.values = NULL;
   12398                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12399                 :            :                           function,
   12400                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_MAC],
   12401                 :            :                           &datum);
   12402                 :          0 : }
   12403                 :            : 
   12404                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Local" table in 'row' to
   12405                 :            :  * 'ipaddr'.
   12406                 :            :  *
   12407                 :            :  * The caller retains ownership of the arguments. */
   12408                 :            : void
   12409                 :          0 : vteprec_mcast_macs_local_add_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   12410                 :            : {
   12411                 :            :     struct ovsdb_datum datum;
   12412                 :            :     union ovsdb_atom key;
   12413                 :            : 
   12414         [ #  # ]:          0 :     ovs_assert(inited);
   12415                 :          0 :     datum.n = 1;
   12416                 :          0 :     datum.keys = &key;
   12417                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   12418                 :          0 :     datum.values = NULL;
   12419                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12420                 :            :                           function,
   12421                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_IPADDR],
   12422                 :            :                           &datum);
   12423                 :          0 : }
   12424                 :            : 
   12425                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Local" table in 'row' to
   12426                 :            :  * 'locator_set'.
   12427                 :            :  *
   12428                 :            :  * The caller retains ownership of the arguments. */
   12429                 :            : void
   12430                 :          0 : vteprec_mcast_macs_local_add_clause_locator_set(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator_set)
   12431                 :            : {
   12432                 :            :     struct ovsdb_datum datum;
   12433                 :            :     union ovsdb_atom key;
   12434                 :            : 
   12435         [ #  # ]:          0 :     ovs_assert(inited);
   12436                 :          0 :     datum.n = 1;
   12437                 :          0 :     datum.keys = &key;
   12438                 :          0 :     key.uuid = *locator_set;
   12439                 :          0 :     datum.values = NULL;
   12440                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12441                 :            :                           function,
   12442                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOCATOR_SET],
   12443                 :            :                           &datum);
   12444                 :          0 : }
   12445                 :            : 
   12446                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Local" table in 'row' to
   12447                 :            :  * 'logical_switch'.
   12448                 :            :  *
   12449                 :            :  * The caller retains ownership of the arguments. */
   12450                 :            : void
   12451                 :          0 : vteprec_mcast_macs_local_add_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   12452                 :            : {
   12453                 :            :     struct ovsdb_datum datum;
   12454                 :            :     union ovsdb_atom key;
   12455                 :            : 
   12456         [ #  # ]:          0 :     ovs_assert(inited);
   12457                 :          0 :     datum.n = 1;
   12458                 :          0 :     datum.keys = &key;
   12459                 :          0 :     key.uuid = *logical_switch;
   12460                 :          0 :     datum.values = NULL;
   12461                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12462                 :            :                           function,
   12463                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOGICAL_SWITCH],
   12464                 :            :                           &datum);
   12465                 :          0 : }
   12466                 :            : void
   12467                 :          0 : vteprec_mcast_macs_local_add_clause_false(struct ovsdb_idl *idl)
   12468                 :            : {
   12469                 :            :     struct ovsdb_datum datum;
   12470                 :            : 
   12471                 :          0 :     ovsdb_datum_init_empty(&datum);
   12472                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], OVSDB_F_FALSE, NULL, &datum);
   12473                 :          0 : }
   12474                 :            : void
   12475                 :          0 : vteprec_mcast_macs_local_add_clause_true(struct ovsdb_idl *idl)
   12476                 :            : {
   12477                 :            :     struct ovsdb_datum datum;
   12478                 :            : 
   12479                 :          0 :     ovsdb_datum_init_empty(&datum);
   12480                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], OVSDB_F_TRUE, NULL, &datum);
   12481                 :          0 : }
   12482                 :            : 
   12483                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Local" table in 'row' to
   12484                 :            :  * 'MAC'.
   12485                 :            :  *
   12486                 :            :  * The caller retains ownership of the arguments. */
   12487                 :            : void
   12488                 :          0 : vteprec_mcast_macs_local_remove_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   12489                 :            : {
   12490                 :            :     struct ovsdb_datum datum;
   12491                 :            :     union ovsdb_atom key;
   12492                 :            : 
   12493         [ #  # ]:          0 :     ovs_assert(inited);
   12494                 :          0 :     datum.n = 1;
   12495                 :          0 :     datum.keys = &key;
   12496                 :          0 :     key.string = CONST_CAST(char *, MAC);
   12497                 :          0 :     datum.values = NULL;
   12498                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12499                 :            :                           function,
   12500                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_MAC],
   12501                 :            :                           &datum);
   12502                 :          0 : }
   12503                 :            : 
   12504                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Local" table in 'row' to
   12505                 :            :  * 'ipaddr'.
   12506                 :            :  *
   12507                 :            :  * The caller retains ownership of the arguments. */
   12508                 :            : void
   12509                 :          0 : vteprec_mcast_macs_local_remove_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   12510                 :            : {
   12511                 :            :     struct ovsdb_datum datum;
   12512                 :            :     union ovsdb_atom key;
   12513                 :            : 
   12514         [ #  # ]:          0 :     ovs_assert(inited);
   12515                 :          0 :     datum.n = 1;
   12516                 :          0 :     datum.keys = &key;
   12517                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   12518                 :          0 :     datum.values = NULL;
   12519                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12520                 :            :                           function,
   12521                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_IPADDR],
   12522                 :            :                           &datum);
   12523                 :          0 : }
   12524                 :            : 
   12525                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Local" table in 'row' to
   12526                 :            :  * 'locator_set'.
   12527                 :            :  *
   12528                 :            :  * The caller retains ownership of the arguments. */
   12529                 :            : void
   12530                 :          0 : vteprec_mcast_macs_local_remove_clause_locator_set(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator_set)
   12531                 :            : {
   12532                 :            :     struct ovsdb_datum datum;
   12533                 :            :     union ovsdb_atom key;
   12534                 :            : 
   12535         [ #  # ]:          0 :     ovs_assert(inited);
   12536                 :          0 :     datum.n = 1;
   12537                 :          0 :     datum.keys = &key;
   12538                 :          0 :     key.uuid = *locator_set;
   12539                 :          0 :     datum.values = NULL;
   12540                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12541                 :            :                           function,
   12542                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOCATOR_SET],
   12543                 :            :                           &datum);
   12544                 :          0 : }
   12545                 :            : 
   12546                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Local" table in 'row' to
   12547                 :            :  * 'logical_switch'.
   12548                 :            :  *
   12549                 :            :  * The caller retains ownership of the arguments. */
   12550                 :            : void
   12551                 :          0 : vteprec_mcast_macs_local_remove_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   12552                 :            : {
   12553                 :            :     struct ovsdb_datum datum;
   12554                 :            :     union ovsdb_atom key;
   12555                 :            : 
   12556         [ #  # ]:          0 :     ovs_assert(inited);
   12557                 :          0 :     datum.n = 1;
   12558                 :          0 :     datum.keys = &key;
   12559                 :          0 :     key.uuid = *logical_switch;
   12560                 :          0 :     datum.values = NULL;
   12561                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL],
   12562                 :            :                           function,
   12563                 :            :                           &vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_COL_LOGICAL_SWITCH],
   12564                 :            :                           &datum);
   12565                 :          0 : }
   12566                 :            : void
   12567                 :          0 : vteprec_mcast_macs_local_remove_clause_false(struct ovsdb_idl *idl)
   12568                 :            : {
   12569                 :            :     struct ovsdb_datum datum;
   12570                 :            : 
   12571                 :          0 :     ovsdb_datum_init_empty(&datum);
   12572                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], OVSDB_F_FALSE, NULL, &datum);
   12573                 :          0 : }
   12574                 :            : void
   12575                 :          0 : vteprec_mcast_macs_local_remove_clause_true(struct ovsdb_idl *idl)
   12576                 :            : {
   12577                 :            :     struct ovsdb_datum datum;
   12578                 :            : 
   12579                 :          0 :     ovsdb_datum_init_empty(&datum);
   12580                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_LOCAL], OVSDB_F_TRUE, NULL, &datum);
   12581                 :          0 : }
   12582                 :            : 
   12583                 :            : struct ovsdb_idl_column vteprec_mcast_macs_local_columns[VTEPREC_MCAST_MACS_LOCAL_N_COLUMNS];
   12584                 :            : 
   12585                 :            : static void
   12586                 :        741 : vteprec_mcast_macs_local_columns_init(void)
   12587                 :            : {
   12588                 :            :     struct ovsdb_idl_column *c;
   12589                 :            : 
   12590                 :            :     /* Initialize vteprec_mcast_macs_local_col_MAC. */
   12591                 :        741 :     c = &vteprec_mcast_macs_local_col_MAC;
   12592                 :        741 :     c->name = "MAC";
   12593                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   12594                 :        741 :     c->type.key.u.string.minLen = 0;
   12595                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   12596                 :        741 :     c->type.n_min = 1;
   12597                 :        741 :     c->type.n_max = 1;
   12598                 :        741 :     c->mutable = true;
   12599                 :        741 :     c->parse = vteprec_mcast_macs_local_parse_MAC;
   12600                 :        741 :     c->unparse = vteprec_mcast_macs_local_unparse_MAC;
   12601                 :            : 
   12602                 :            :     /* Initialize vteprec_mcast_macs_local_col_ipaddr. */
   12603                 :        741 :     c = &vteprec_mcast_macs_local_col_ipaddr;
   12604                 :        741 :     c->name = "ipaddr";
   12605                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   12606                 :        741 :     c->type.key.u.string.minLen = 0;
   12607                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   12608                 :        741 :     c->type.n_min = 1;
   12609                 :        741 :     c->type.n_max = 1;
   12610                 :        741 :     c->mutable = true;
   12611                 :        741 :     c->parse = vteprec_mcast_macs_local_parse_ipaddr;
   12612                 :        741 :     c->unparse = vteprec_mcast_macs_local_unparse_ipaddr;
   12613                 :            : 
   12614                 :            :     /* Initialize vteprec_mcast_macs_local_col_locator_set. */
   12615                 :        741 :     c = &vteprec_mcast_macs_local_col_locator_set;
   12616                 :        741 :     c->name = "locator_set";
   12617                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   12618                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator_Set";
   12619                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   12620                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   12621                 :        741 :     c->type.n_min = 1;
   12622                 :        741 :     c->type.n_max = 1;
   12623                 :        741 :     c->mutable = true;
   12624                 :        741 :     c->parse = vteprec_mcast_macs_local_parse_locator_set;
   12625                 :        741 :     c->unparse = vteprec_mcast_macs_local_unparse_locator_set;
   12626                 :            : 
   12627                 :            :     /* Initialize vteprec_mcast_macs_local_col_logical_switch. */
   12628                 :        741 :     c = &vteprec_mcast_macs_local_col_logical_switch;
   12629                 :        741 :     c->name = "logical_switch";
   12630                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   12631                 :        741 :     c->type.key.u.uuid.refTableName = "Logical_Switch";
   12632                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   12633                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   12634                 :        741 :     c->type.n_min = 1;
   12635                 :        741 :     c->type.n_max = 1;
   12636                 :        741 :     c->mutable = true;
   12637                 :        741 :     c->parse = vteprec_mcast_macs_local_parse_logical_switch;
   12638                 :        741 :     c->unparse = vteprec_mcast_macs_local_unparse_logical_switch;
   12639                 :        741 : }
   12640                 :            : 
   12641                 :            : /* Mcast_Macs_Remote table. */
   12642                 :            : 
   12643                 :            : static void
   12644                 :        233 : vteprec_mcast_macs_remote_parse_MAC(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   12645                 :            : {
   12646                 :        233 :     struct vteprec_mcast_macs_remote *row = vteprec_mcast_macs_remote_cast(row_);
   12647                 :            : 
   12648         [ -  + ]:        233 :     ovs_assert(inited);
   12649         [ +  - ]:        233 :     if (datum->n >= 1) {
   12650                 :        233 :         row->MAC = datum->keys[0].string;
   12651                 :            :     } else {
   12652                 :          0 :         row->MAC = "";
   12653                 :            :     }
   12654                 :        233 : }
   12655                 :            : 
   12656                 :            : static void
   12657                 :        215 : vteprec_mcast_macs_remote_parse_ipaddr(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   12658                 :            : {
   12659                 :        215 :     struct vteprec_mcast_macs_remote *row = vteprec_mcast_macs_remote_cast(row_);
   12660                 :            : 
   12661         [ -  + ]:        215 :     ovs_assert(inited);
   12662         [ +  - ]:        215 :     if (datum->n >= 1) {
   12663                 :        215 :         row->ipaddr = datum->keys[0].string;
   12664                 :            :     } else {
   12665                 :          0 :         row->ipaddr = "";
   12666                 :            :     }
   12667                 :        215 : }
   12668                 :            : 
   12669                 :            : static void
   12670                 :        240 : vteprec_mcast_macs_remote_parse_locator_set(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   12671                 :            : {
   12672                 :        240 :     struct vteprec_mcast_macs_remote *row = vteprec_mcast_macs_remote_cast(row_);
   12673                 :            : 
   12674         [ -  + ]:        240 :     ovs_assert(inited);
   12675         [ +  - ]:        240 :     if (datum->n >= 1) {
   12676                 :        240 :         row->locator_set = vteprec_physical_locator_set_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], &datum->keys[0].uuid));
   12677                 :            :     } else {
   12678                 :          0 :         row->locator_set = NULL;
   12679                 :            :     }
   12680                 :        240 : }
   12681                 :            : 
   12682                 :            : static void
   12683                 :        233 : vteprec_mcast_macs_remote_parse_logical_switch(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   12684                 :            : {
   12685                 :        233 :     struct vteprec_mcast_macs_remote *row = vteprec_mcast_macs_remote_cast(row_);
   12686                 :            : 
   12687         [ -  + ]:        233 :     ovs_assert(inited);
   12688         [ +  - ]:        233 :     if (datum->n >= 1) {
   12689                 :        233 :         row->logical_switch = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->keys[0].uuid));
   12690                 :            :     } else {
   12691                 :          0 :         row->logical_switch = NULL;
   12692                 :            :     }
   12693                 :        233 : }
   12694                 :            : 
   12695                 :            : static void
   12696                 :        251 : vteprec_mcast_macs_remote_unparse_MAC(struct ovsdb_idl_row *row OVS_UNUSED)
   12697                 :            : {
   12698                 :            :     /* Nothing to do. */
   12699                 :        251 : }
   12700                 :            : 
   12701                 :            : static void
   12702                 :        233 : vteprec_mcast_macs_remote_unparse_ipaddr(struct ovsdb_idl_row *row OVS_UNUSED)
   12703                 :            : {
   12704                 :            :     /* Nothing to do. */
   12705                 :        233 : }
   12706                 :            : 
   12707                 :            : static void
   12708                 :        258 : vteprec_mcast_macs_remote_unparse_locator_set(struct ovsdb_idl_row *row OVS_UNUSED)
   12709                 :            : {
   12710                 :            :     /* Nothing to do. */
   12711                 :        258 : }
   12712                 :            : 
   12713                 :            : static void
   12714                 :        251 : vteprec_mcast_macs_remote_unparse_logical_switch(struct ovsdb_idl_row *row OVS_UNUSED)
   12715                 :            : {
   12716                 :            :     /* Nothing to do. */
   12717                 :        251 : }
   12718                 :            : 
   12719                 :            : static void
   12720                 :        119 : vteprec_mcast_macs_remote_init__(struct ovsdb_idl_row *row)
   12721                 :            : {
   12722                 :        119 :     vteprec_mcast_macs_remote_init(vteprec_mcast_macs_remote_cast(row));
   12723                 :        119 : }
   12724                 :            : 
   12725                 :            : /* Clears the contents of 'row' in table "Mcast_Macs_Remote". */
   12726                 :            : void
   12727                 :        119 : vteprec_mcast_macs_remote_init(struct vteprec_mcast_macs_remote *row)
   12728                 :            : {
   12729                 :        119 :     memset(row, 0, sizeof *row); 
   12730                 :        119 : }
   12731                 :            : 
   12732                 :            : /* Searches table "Mcast_Macs_Remote" in 'idl' for a row with UUID 'uuid'.  Returns
   12733                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   12734                 :            : const struct vteprec_mcast_macs_remote *
   12735                 :          0 : vteprec_mcast_macs_remote_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   12736                 :            : {
   12737                 :          0 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], uuid));
   12738                 :            : }
   12739                 :            : 
   12740                 :            : /* Returns a row in table "Mcast_Macs_Remote" in 'idl', or a null pointer if that
   12741                 :            :  * table is empty.
   12742                 :            :  *
   12743                 :            :  * Database tables are internally maintained as hash tables, so adding or
   12744                 :            :  * removing rows while traversing the same table can cause some rows to be
   12745                 :            :  * visited twice or not at apply. */
   12746                 :            : const struct vteprec_mcast_macs_remote *
   12747                 :        719 : vteprec_mcast_macs_remote_first(const struct ovsdb_idl *idl)
   12748                 :            : {
   12749                 :        719 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE]));
   12750                 :            : }
   12751                 :            : 
   12752                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   12753                 :            :  * is the last row in its table. */
   12754                 :            : const struct vteprec_mcast_macs_remote *
   12755                 :        176 : vteprec_mcast_macs_remote_next(const struct vteprec_mcast_macs_remote *row)
   12756                 :            : {
   12757                 :        176 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_next_row(&row->header_));
   12758                 :            : }
   12759                 :            : 
   12760                 :          0 : unsigned int vteprec_mcast_macs_remote_get_seqno(const struct ovsdb_idl *idl)
   12761                 :            : {
   12762                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE]);
   12763                 :            : }
   12764                 :            : 
   12765                 :          0 : unsigned int vteprec_mcast_macs_remote_row_get_seqno(const struct vteprec_mcast_macs_remote *row, enum ovsdb_idl_change change)
   12766                 :            : {
   12767                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   12768                 :            : }
   12769                 :            : 
   12770                 :            : const struct vteprec_mcast_macs_remote *
   12771                 :          0 : vteprec_mcast_macs_remote_track_get_first(const struct ovsdb_idl *idl)
   12772                 :            : {
   12773                 :          0 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE]));
   12774                 :            : }
   12775                 :            : 
   12776                 :            : const struct vteprec_mcast_macs_remote
   12777                 :          0 : *vteprec_mcast_macs_remote_track_get_next(const struct vteprec_mcast_macs_remote *row)
   12778                 :            : {
   12779                 :          0 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_track_get_next(&row->header_));
   12780                 :            : }
   12781                 :            : 
   12782                 :            : 
   12783                 :            : /* Deletes 'row' from table "Mcast_Macs_Remote".  'row' may be freed, so it must not be
   12784                 :            :  * accessed afterward.
   12785                 :            :  *
   12786                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12787                 :            : void
   12788                 :         10 : vteprec_mcast_macs_remote_delete(const struct vteprec_mcast_macs_remote *row)
   12789                 :            : {
   12790                 :         10 :     ovsdb_idl_txn_delete(&row->header_);
   12791                 :         10 : }
   12792                 :            : 
   12793                 :            : /* Inserts and returns a new row in the table "Mcast_Macs_Remote" in the database
   12794                 :            :  * with open transaction 'txn'.
   12795                 :            :  *
   12796                 :            :  * The new row is assigned a randomly generated provisional UUID.
   12797                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   12798                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   12799                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   12800                 :            : struct vteprec_mcast_macs_remote *
   12801                 :         18 : vteprec_mcast_macs_remote_insert(struct ovsdb_idl_txn *txn)
   12802                 :            : {
   12803                 :         18 :     return vteprec_mcast_macs_remote_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], NULL));
   12804                 :            : }
   12805                 :            : 
   12806                 :            : bool
   12807                 :          0 : vteprec_mcast_macs_remote_is_updated(const struct vteprec_mcast_macs_remote *row, enum vteprec_mcast_macs_remote_column_id column)
   12808                 :            : {
   12809                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_mcast_macs_remote_columns[column]);
   12810                 :            : }
   12811                 :            : 
   12812                 :            : /* Causes the original contents of column "MAC" in 'row' to be
   12813                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12814                 :            :  * "MAC" in 'row' changed (or if 'row' was deleted) between the
   12815                 :            :  * time that the IDL originally read its contents and the time that the
   12816                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12817                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12818                 :            :  * change has already been received).
   12819                 :            :  *
   12820                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12821                 :            :  * reads, an application should call this function any time "MAC" is
   12822                 :            :  * read as part of a read-modify-write operation.
   12823                 :            :  *
   12824                 :            :  * In some cases this function reduces to a no-op, because the current value
   12825                 :            :  * of "MAC" is already known:
   12826                 :            :  *
   12827                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12828                 :            :  *     vteprec_mcast_macs_remote_insert()).
   12829                 :            :  *
   12830                 :            :  *   - If "MAC" has already been modified (with
   12831                 :            :  *     vteprec_mcast_macs_remote_set_MAC()) within the current transaction.
   12832                 :            :  *
   12833                 :            :  * Because of the latter property, always call this function *before*
   12834                 :            :  * vteprec_mcast_macs_remote_set_MAC() for a given read-modify-write.
   12835                 :            :  *
   12836                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12837                 :            : void
   12838                 :          0 : vteprec_mcast_macs_remote_verify_MAC(const struct vteprec_mcast_macs_remote *row)
   12839                 :            : {
   12840         [ #  # ]:          0 :     ovs_assert(inited);
   12841                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_MAC]);
   12842                 :          0 : }
   12843                 :            : 
   12844                 :            : /* Causes the original contents of column "ipaddr" in 'row' to be
   12845                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12846                 :            :  * "ipaddr" in 'row' changed (or if 'row' was deleted) between the
   12847                 :            :  * time that the IDL originally read its contents and the time that the
   12848                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12849                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12850                 :            :  * change has already been received).
   12851                 :            :  *
   12852                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12853                 :            :  * reads, an application should call this function any time "ipaddr" is
   12854                 :            :  * read as part of a read-modify-write operation.
   12855                 :            :  *
   12856                 :            :  * In some cases this function reduces to a no-op, because the current value
   12857                 :            :  * of "ipaddr" is already known:
   12858                 :            :  *
   12859                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12860                 :            :  *     vteprec_mcast_macs_remote_insert()).
   12861                 :            :  *
   12862                 :            :  *   - If "ipaddr" has already been modified (with
   12863                 :            :  *     vteprec_mcast_macs_remote_set_ipaddr()) within the current transaction.
   12864                 :            :  *
   12865                 :            :  * Because of the latter property, always call this function *before*
   12866                 :            :  * vteprec_mcast_macs_remote_set_ipaddr() for a given read-modify-write.
   12867                 :            :  *
   12868                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12869                 :            : void
   12870                 :          0 : vteprec_mcast_macs_remote_verify_ipaddr(const struct vteprec_mcast_macs_remote *row)
   12871                 :            : {
   12872         [ #  # ]:          0 :     ovs_assert(inited);
   12873                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_IPADDR]);
   12874                 :          0 : }
   12875                 :            : 
   12876                 :            : /* Causes the original contents of column "locator_set" in 'row' to be
   12877                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12878                 :            :  * "locator_set" in 'row' changed (or if 'row' was deleted) between the
   12879                 :            :  * time that the IDL originally read its contents and the time that the
   12880                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12881                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12882                 :            :  * change has already been received).
   12883                 :            :  *
   12884                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12885                 :            :  * reads, an application should call this function any time "locator_set" is
   12886                 :            :  * read as part of a read-modify-write operation.
   12887                 :            :  *
   12888                 :            :  * In some cases this function reduces to a no-op, because the current value
   12889                 :            :  * of "locator_set" is already known:
   12890                 :            :  *
   12891                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12892                 :            :  *     vteprec_mcast_macs_remote_insert()).
   12893                 :            :  *
   12894                 :            :  *   - If "locator_set" has already been modified (with
   12895                 :            :  *     vteprec_mcast_macs_remote_set_locator_set()) within the current transaction.
   12896                 :            :  *
   12897                 :            :  * Because of the latter property, always call this function *before*
   12898                 :            :  * vteprec_mcast_macs_remote_set_locator_set() for a given read-modify-write.
   12899                 :            :  *
   12900                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12901                 :            : void
   12902                 :          0 : vteprec_mcast_macs_remote_verify_locator_set(const struct vteprec_mcast_macs_remote *row)
   12903                 :            : {
   12904         [ #  # ]:          0 :     ovs_assert(inited);
   12905                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOCATOR_SET]);
   12906                 :          0 : }
   12907                 :            : 
   12908                 :            : /* Causes the original contents of column "logical_switch" in 'row' to be
   12909                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   12910                 :            :  * "logical_switch" in 'row' changed (or if 'row' was deleted) between the
   12911                 :            :  * time that the IDL originally read its contents and the time that the
   12912                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   12913                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   12914                 :            :  * change has already been received).
   12915                 :            :  *
   12916                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   12917                 :            :  * reads, an application should call this function any time "logical_switch" is
   12918                 :            :  * read as part of a read-modify-write operation.
   12919                 :            :  *
   12920                 :            :  * In some cases this function reduces to a no-op, because the current value
   12921                 :            :  * of "logical_switch" is already known:
   12922                 :            :  *
   12923                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   12924                 :            :  *     vteprec_mcast_macs_remote_insert()).
   12925                 :            :  *
   12926                 :            :  *   - If "logical_switch" has already been modified (with
   12927                 :            :  *     vteprec_mcast_macs_remote_set_logical_switch()) within the current transaction.
   12928                 :            :  *
   12929                 :            :  * Because of the latter property, always call this function *before*
   12930                 :            :  * vteprec_mcast_macs_remote_set_logical_switch() for a given read-modify-write.
   12931                 :            :  *
   12932                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   12933                 :            : void
   12934                 :          0 : vteprec_mcast_macs_remote_verify_logical_switch(const struct vteprec_mcast_macs_remote *row)
   12935                 :            : {
   12936         [ #  # ]:          0 :     ovs_assert(inited);
   12937                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOGICAL_SWITCH]);
   12938                 :          0 : }
   12939                 :            : 
   12940                 :            : /* Returns the "MAC" column's value from the "Mcast_Macs_Remote" table in 'row'
   12941                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12942                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12943                 :            :  * for a given key than implementing the same operation on the "cooked"
   12944                 :            :  * form in 'row'.
   12945                 :            :  *
   12946                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   12947                 :            :  * (This helps to avoid silent bugs if someone changes MAC's
   12948                 :            :  * type without updating the caller.)
   12949                 :            :  *
   12950                 :            :  * The caller must not modify or free the returned value.
   12951                 :            :  *
   12952                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12953                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12954                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12955                 :            :  * of it with ovsdb_datum_clone().
   12956                 :            :  *
   12957                 :            :  * This function is rarely useful, since it is easier to access the value
   12958                 :            :  * directly through the "MAC" member in vteprec_mcast_macs_remote. */
   12959                 :            : const struct ovsdb_datum *
   12960                 :          0 : vteprec_mcast_macs_remote_get_MAC(const struct vteprec_mcast_macs_remote *row,
   12961                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12962                 :            : {
   12963         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   12964                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_remote_col_MAC);
   12965                 :            : }
   12966                 :            : 
   12967                 :            : /* Returns the "ipaddr" column's value from the "Mcast_Macs_Remote" table in 'row'
   12968                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12969                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12970                 :            :  * for a given key than implementing the same operation on the "cooked"
   12971                 :            :  * form in 'row'.
   12972                 :            :  *
   12973                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   12974                 :            :  * (This helps to avoid silent bugs if someone changes ipaddr's
   12975                 :            :  * type without updating the caller.)
   12976                 :            :  *
   12977                 :            :  * The caller must not modify or free the returned value.
   12978                 :            :  *
   12979                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   12980                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   12981                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   12982                 :            :  * of it with ovsdb_datum_clone().
   12983                 :            :  *
   12984                 :            :  * This function is rarely useful, since it is easier to access the value
   12985                 :            :  * directly through the "ipaddr" member in vteprec_mcast_macs_remote. */
   12986                 :            : const struct ovsdb_datum *
   12987                 :          0 : vteprec_mcast_macs_remote_get_ipaddr(const struct vteprec_mcast_macs_remote *row,
   12988                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   12989                 :            : {
   12990         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   12991                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_remote_col_ipaddr);
   12992                 :            : }
   12993                 :            : 
   12994                 :            : /* Returns the "locator_set" column's value from the "Mcast_Macs_Remote" table in 'row'
   12995                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   12996                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   12997                 :            :  * for a given key than implementing the same operation on the "cooked"
   12998                 :            :  * form in 'row'.
   12999                 :            :  *
   13000                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   13001                 :            :  * (This helps to avoid silent bugs if someone changes locator_set's
   13002                 :            :  * type without updating the caller.)
   13003                 :            :  *
   13004                 :            :  * The caller must not modify or free the returned value.
   13005                 :            :  *
   13006                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   13007                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   13008                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   13009                 :            :  * of it with ovsdb_datum_clone().
   13010                 :            :  *
   13011                 :            :  * This function is rarely useful, since it is easier to access the value
   13012                 :            :  * directly through the "locator_set" member in vteprec_mcast_macs_remote. */
   13013                 :            : const struct ovsdb_datum *
   13014                 :          0 : vteprec_mcast_macs_remote_get_locator_set(const struct vteprec_mcast_macs_remote *row,
   13015                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   13016                 :            : {
   13017         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   13018                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_remote_col_locator_set);
   13019                 :            : }
   13020                 :            : 
   13021                 :            : /* Returns the "logical_switch" column's value from the "Mcast_Macs_Remote" table in 'row'
   13022                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   13023                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   13024                 :            :  * for a given key than implementing the same operation on the "cooked"
   13025                 :            :  * form in 'row'.
   13026                 :            :  *
   13027                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   13028                 :            :  * (This helps to avoid silent bugs if someone changes logical_switch's
   13029                 :            :  * type without updating the caller.)
   13030                 :            :  *
   13031                 :            :  * The caller must not modify or free the returned value.
   13032                 :            :  *
   13033                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   13034                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   13035                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   13036                 :            :  * of it with ovsdb_datum_clone().
   13037                 :            :  *
   13038                 :            :  * This function is rarely useful, since it is easier to access the value
   13039                 :            :  * directly through the "logical_switch" member in vteprec_mcast_macs_remote. */
   13040                 :            : const struct ovsdb_datum *
   13041                 :          0 : vteprec_mcast_macs_remote_get_logical_switch(const struct vteprec_mcast_macs_remote *row,
   13042                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   13043                 :            : {
   13044         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   13045                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_mcast_macs_remote_col_logical_switch);
   13046                 :            : }
   13047                 :            : 
   13048                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Remote" table in 'row' to
   13049                 :            :  * 'MAC'.
   13050                 :            :  *
   13051                 :            :  * The caller retains ownership of the arguments. */
   13052                 :            : void
   13053                 :         18 : vteprec_mcast_macs_remote_set_MAC(const struct vteprec_mcast_macs_remote *row, const char *MAC)
   13054                 :            : {
   13055                 :            :     struct ovsdb_datum datum;
   13056                 :            :     union ovsdb_atom key;
   13057                 :            : 
   13058         [ -  + ]:         18 :     ovs_assert(inited);
   13059                 :         18 :     datum.n = 1;
   13060                 :         18 :     datum.keys = &key;
   13061                 :         18 :     key.string = CONST_CAST(char *, MAC);
   13062                 :         18 :     datum.values = NULL;
   13063                 :         18 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_MAC], &datum);
   13064                 :         18 : }
   13065                 :            : 
   13066                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Remote" table in 'row' to
   13067                 :            :  * 'ipaddr'.
   13068                 :            :  *
   13069                 :            :  * The caller retains ownership of the arguments. */
   13070                 :            : void
   13071                 :          0 : vteprec_mcast_macs_remote_set_ipaddr(const struct vteprec_mcast_macs_remote *row, const char *ipaddr)
   13072                 :            : {
   13073                 :            :     struct ovsdb_datum datum;
   13074                 :            :     union ovsdb_atom key;
   13075                 :            : 
   13076         [ #  # ]:          0 :     ovs_assert(inited);
   13077                 :          0 :     datum.n = 1;
   13078                 :          0 :     datum.keys = &key;
   13079                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   13080                 :          0 :     datum.values = NULL;
   13081                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_IPADDR], &datum);
   13082                 :          0 : }
   13083                 :            : 
   13084                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Remote" table in 'row' to
   13085                 :            :  * 'locator_set'.
   13086                 :            :  *
   13087                 :            :  * The caller retains ownership of the arguments. */
   13088                 :            : void
   13089                 :         25 : vteprec_mcast_macs_remote_set_locator_set(const struct vteprec_mcast_macs_remote *row, const struct vteprec_physical_locator_set *locator_set)
   13090                 :            : {
   13091                 :            :     struct ovsdb_datum datum;
   13092                 :            :     union ovsdb_atom key;
   13093                 :            : 
   13094         [ -  + ]:         25 :     ovs_assert(inited);
   13095                 :         25 :     datum.n = 1;
   13096                 :         25 :     datum.keys = &key;
   13097                 :         25 :     key.uuid = locator_set->header_.uuid;
   13098                 :         25 :     datum.values = NULL;
   13099                 :         25 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOCATOR_SET], &datum);
   13100                 :         25 : }
   13101                 :            : 
   13102                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Remote" table in 'row' to
   13103                 :            :  * 'logical_switch'.
   13104                 :            :  *
   13105                 :            :  * The caller retains ownership of the arguments. */
   13106                 :            : void
   13107                 :         18 : vteprec_mcast_macs_remote_set_logical_switch(const struct vteprec_mcast_macs_remote *row, const struct vteprec_logical_switch *logical_switch)
   13108                 :            : {
   13109                 :            :     struct ovsdb_datum datum;
   13110                 :            :     union ovsdb_atom key;
   13111                 :            : 
   13112         [ -  + ]:         18 :     ovs_assert(inited);
   13113                 :         18 :     datum.n = 1;
   13114                 :         18 :     datum.keys = &key;
   13115                 :         18 :     key.uuid = logical_switch->header_.uuid;
   13116                 :         18 :     datum.values = NULL;
   13117                 :         18 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOGICAL_SWITCH], &datum);
   13118                 :         18 : }
   13119                 :            : 
   13120                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Remote" table in 'row' to
   13121                 :            :  * 'MAC'.
   13122                 :            :  *
   13123                 :            :  * The caller retains ownership of the arguments. */
   13124                 :            : void
   13125                 :          0 : vteprec_mcast_macs_remote_add_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   13126                 :            : {
   13127                 :            :     struct ovsdb_datum datum;
   13128                 :            :     union ovsdb_atom key;
   13129                 :            : 
   13130         [ #  # ]:          0 :     ovs_assert(inited);
   13131                 :          0 :     datum.n = 1;
   13132                 :          0 :     datum.keys = &key;
   13133                 :          0 :     key.string = CONST_CAST(char *, MAC);
   13134                 :          0 :     datum.values = NULL;
   13135                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13136                 :            :                           function,
   13137                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_MAC],
   13138                 :            :                           &datum);
   13139                 :          0 : }
   13140                 :            : 
   13141                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Remote" table in 'row' to
   13142                 :            :  * 'ipaddr'.
   13143                 :            :  *
   13144                 :            :  * The caller retains ownership of the arguments. */
   13145                 :            : void
   13146                 :          0 : vteprec_mcast_macs_remote_add_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   13147                 :            : {
   13148                 :            :     struct ovsdb_datum datum;
   13149                 :            :     union ovsdb_atom key;
   13150                 :            : 
   13151         [ #  # ]:          0 :     ovs_assert(inited);
   13152                 :          0 :     datum.n = 1;
   13153                 :          0 :     datum.keys = &key;
   13154                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   13155                 :          0 :     datum.values = NULL;
   13156                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13157                 :            :                           function,
   13158                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_IPADDR],
   13159                 :            :                           &datum);
   13160                 :          0 : }
   13161                 :            : 
   13162                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Remote" table in 'row' to
   13163                 :            :  * 'locator_set'.
   13164                 :            :  *
   13165                 :            :  * The caller retains ownership of the arguments. */
   13166                 :            : void
   13167                 :          0 : vteprec_mcast_macs_remote_add_clause_locator_set(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator_set)
   13168                 :            : {
   13169                 :            :     struct ovsdb_datum datum;
   13170                 :            :     union ovsdb_atom key;
   13171                 :            : 
   13172         [ #  # ]:          0 :     ovs_assert(inited);
   13173                 :          0 :     datum.n = 1;
   13174                 :          0 :     datum.keys = &key;
   13175                 :          0 :     key.uuid = *locator_set;
   13176                 :          0 :     datum.values = NULL;
   13177                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13178                 :            :                           function,
   13179                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOCATOR_SET],
   13180                 :            :                           &datum);
   13181                 :          0 : }
   13182                 :            : 
   13183                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Remote" table in 'row' to
   13184                 :            :  * 'logical_switch'.
   13185                 :            :  *
   13186                 :            :  * The caller retains ownership of the arguments. */
   13187                 :            : void
   13188                 :          0 : vteprec_mcast_macs_remote_add_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   13189                 :            : {
   13190                 :            :     struct ovsdb_datum datum;
   13191                 :            :     union ovsdb_atom key;
   13192                 :            : 
   13193         [ #  # ]:          0 :     ovs_assert(inited);
   13194                 :          0 :     datum.n = 1;
   13195                 :          0 :     datum.keys = &key;
   13196                 :          0 :     key.uuid = *logical_switch;
   13197                 :          0 :     datum.values = NULL;
   13198                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13199                 :            :                           function,
   13200                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOGICAL_SWITCH],
   13201                 :            :                           &datum);
   13202                 :          0 : }
   13203                 :            : void
   13204                 :          0 : vteprec_mcast_macs_remote_add_clause_false(struct ovsdb_idl *idl)
   13205                 :            : {
   13206                 :            :     struct ovsdb_datum datum;
   13207                 :            : 
   13208                 :          0 :     ovsdb_datum_init_empty(&datum);
   13209                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], OVSDB_F_FALSE, NULL, &datum);
   13210                 :          0 : }
   13211                 :            : void
   13212                 :          0 : vteprec_mcast_macs_remote_add_clause_true(struct ovsdb_idl *idl)
   13213                 :            : {
   13214                 :            :     struct ovsdb_datum datum;
   13215                 :            : 
   13216                 :          0 :     ovsdb_datum_init_empty(&datum);
   13217                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], OVSDB_F_TRUE, NULL, &datum);
   13218                 :          0 : }
   13219                 :            : 
   13220                 :            : /* Sets the "MAC" column from the "Mcast_Macs_Remote" table in 'row' to
   13221                 :            :  * 'MAC'.
   13222                 :            :  *
   13223                 :            :  * The caller retains ownership of the arguments. */
   13224                 :            : void
   13225                 :          0 : vteprec_mcast_macs_remote_remove_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   13226                 :            : {
   13227                 :            :     struct ovsdb_datum datum;
   13228                 :            :     union ovsdb_atom key;
   13229                 :            : 
   13230         [ #  # ]:          0 :     ovs_assert(inited);
   13231                 :          0 :     datum.n = 1;
   13232                 :          0 :     datum.keys = &key;
   13233                 :          0 :     key.string = CONST_CAST(char *, MAC);
   13234                 :          0 :     datum.values = NULL;
   13235                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13236                 :            :                           function,
   13237                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_MAC],
   13238                 :            :                           &datum);
   13239                 :          0 : }
   13240                 :            : 
   13241                 :            : /* Sets the "ipaddr" column from the "Mcast_Macs_Remote" table in 'row' to
   13242                 :            :  * 'ipaddr'.
   13243                 :            :  *
   13244                 :            :  * The caller retains ownership of the arguments. */
   13245                 :            : void
   13246                 :          0 : vteprec_mcast_macs_remote_remove_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   13247                 :            : {
   13248                 :            :     struct ovsdb_datum datum;
   13249                 :            :     union ovsdb_atom key;
   13250                 :            : 
   13251         [ #  # ]:          0 :     ovs_assert(inited);
   13252                 :          0 :     datum.n = 1;
   13253                 :          0 :     datum.keys = &key;
   13254                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   13255                 :          0 :     datum.values = NULL;
   13256                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13257                 :            :                           function,
   13258                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_IPADDR],
   13259                 :            :                           &datum);
   13260                 :          0 : }
   13261                 :            : 
   13262                 :            : /* Sets the "locator_set" column from the "Mcast_Macs_Remote" table in 'row' to
   13263                 :            :  * 'locator_set'.
   13264                 :            :  *
   13265                 :            :  * The caller retains ownership of the arguments. */
   13266                 :            : void
   13267                 :          0 : vteprec_mcast_macs_remote_remove_clause_locator_set(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator_set)
   13268                 :            : {
   13269                 :            :     struct ovsdb_datum datum;
   13270                 :            :     union ovsdb_atom key;
   13271                 :            : 
   13272         [ #  # ]:          0 :     ovs_assert(inited);
   13273                 :          0 :     datum.n = 1;
   13274                 :          0 :     datum.keys = &key;
   13275                 :          0 :     key.uuid = *locator_set;
   13276                 :          0 :     datum.values = NULL;
   13277                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13278                 :            :                           function,
   13279                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOCATOR_SET],
   13280                 :            :                           &datum);
   13281                 :          0 : }
   13282                 :            : 
   13283                 :            : /* Sets the "logical_switch" column from the "Mcast_Macs_Remote" table in 'row' to
   13284                 :            :  * 'logical_switch'.
   13285                 :            :  *
   13286                 :            :  * The caller retains ownership of the arguments. */
   13287                 :            : void
   13288                 :          0 : vteprec_mcast_macs_remote_remove_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   13289                 :            : {
   13290                 :            :     struct ovsdb_datum datum;
   13291                 :            :     union ovsdb_atom key;
   13292                 :            : 
   13293         [ #  # ]:          0 :     ovs_assert(inited);
   13294                 :          0 :     datum.n = 1;
   13295                 :          0 :     datum.keys = &key;
   13296                 :          0 :     key.uuid = *logical_switch;
   13297                 :          0 :     datum.values = NULL;
   13298                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE],
   13299                 :            :                           function,
   13300                 :            :                           &vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_COL_LOGICAL_SWITCH],
   13301                 :            :                           &datum);
   13302                 :          0 : }
   13303                 :            : void
   13304                 :          0 : vteprec_mcast_macs_remote_remove_clause_false(struct ovsdb_idl *idl)
   13305                 :            : {
   13306                 :            :     struct ovsdb_datum datum;
   13307                 :            : 
   13308                 :          0 :     ovsdb_datum_init_empty(&datum);
   13309                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], OVSDB_F_FALSE, NULL, &datum);
   13310                 :          0 : }
   13311                 :            : void
   13312                 :          0 : vteprec_mcast_macs_remote_remove_clause_true(struct ovsdb_idl *idl)
   13313                 :            : {
   13314                 :            :     struct ovsdb_datum datum;
   13315                 :            : 
   13316                 :          0 :     ovsdb_datum_init_empty(&datum);
   13317                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_MCAST_MACS_REMOTE], OVSDB_F_TRUE, NULL, &datum);
   13318                 :          0 : }
   13319                 :            : 
   13320                 :            : struct ovsdb_idl_column vteprec_mcast_macs_remote_columns[VTEPREC_MCAST_MACS_REMOTE_N_COLUMNS];
   13321                 :            : 
   13322                 :            : static void
   13323                 :        741 : vteprec_mcast_macs_remote_columns_init(void)
   13324                 :            : {
   13325                 :            :     struct ovsdb_idl_column *c;
   13326                 :            : 
   13327                 :            :     /* Initialize vteprec_mcast_macs_remote_col_MAC. */
   13328                 :        741 :     c = &vteprec_mcast_macs_remote_col_MAC;
   13329                 :        741 :     c->name = "MAC";
   13330                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   13331                 :        741 :     c->type.key.u.string.minLen = 0;
   13332                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   13333                 :        741 :     c->type.n_min = 1;
   13334                 :        741 :     c->type.n_max = 1;
   13335                 :        741 :     c->mutable = true;
   13336                 :        741 :     c->parse = vteprec_mcast_macs_remote_parse_MAC;
   13337                 :        741 :     c->unparse = vteprec_mcast_macs_remote_unparse_MAC;
   13338                 :            : 
   13339                 :            :     /* Initialize vteprec_mcast_macs_remote_col_ipaddr. */
   13340                 :        741 :     c = &vteprec_mcast_macs_remote_col_ipaddr;
   13341                 :        741 :     c->name = "ipaddr";
   13342                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   13343                 :        741 :     c->type.key.u.string.minLen = 0;
   13344                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   13345                 :        741 :     c->type.n_min = 1;
   13346                 :        741 :     c->type.n_max = 1;
   13347                 :        741 :     c->mutable = true;
   13348                 :        741 :     c->parse = vteprec_mcast_macs_remote_parse_ipaddr;
   13349                 :        741 :     c->unparse = vteprec_mcast_macs_remote_unparse_ipaddr;
   13350                 :            : 
   13351                 :            :     /* Initialize vteprec_mcast_macs_remote_col_locator_set. */
   13352                 :        741 :     c = &vteprec_mcast_macs_remote_col_locator_set;
   13353                 :        741 :     c->name = "locator_set";
   13354                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   13355                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator_Set";
   13356                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   13357                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   13358                 :        741 :     c->type.n_min = 1;
   13359                 :        741 :     c->type.n_max = 1;
   13360                 :        741 :     c->mutable = true;
   13361                 :        741 :     c->parse = vteprec_mcast_macs_remote_parse_locator_set;
   13362                 :        741 :     c->unparse = vteprec_mcast_macs_remote_unparse_locator_set;
   13363                 :            : 
   13364                 :            :     /* Initialize vteprec_mcast_macs_remote_col_logical_switch. */
   13365                 :        741 :     c = &vteprec_mcast_macs_remote_col_logical_switch;
   13366                 :        741 :     c->name = "logical_switch";
   13367                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   13368                 :        741 :     c->type.key.u.uuid.refTableName = "Logical_Switch";
   13369                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   13370                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   13371                 :        741 :     c->type.n_min = 1;
   13372                 :        741 :     c->type.n_max = 1;
   13373                 :        741 :     c->mutable = true;
   13374                 :        741 :     c->parse = vteprec_mcast_macs_remote_parse_logical_switch;
   13375                 :        741 :     c->unparse = vteprec_mcast_macs_remote_unparse_logical_switch;
   13376                 :        741 : }
   13377                 :            : 
   13378                 :            : /* Physical_Locator table. */
   13379                 :            : 
   13380                 :            : static void
   13381                 :        404 : vteprec_physical_locator_parse_dst_ip(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   13382                 :            : {
   13383                 :        404 :     struct vteprec_physical_locator *row = vteprec_physical_locator_cast(row_);
   13384                 :            : 
   13385         [ -  + ]:        404 :     ovs_assert(inited);
   13386         [ +  - ]:        404 :     if (datum->n >= 1) {
   13387                 :        404 :         row->dst_ip = datum->keys[0].string;
   13388                 :            :     } else {
   13389                 :          0 :         row->dst_ip = "";
   13390                 :            :     }
   13391                 :        404 : }
   13392                 :            : 
   13393                 :            : static void
   13394                 :        404 : vteprec_physical_locator_parse_encapsulation_type(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   13395                 :            : {
   13396                 :        404 :     struct vteprec_physical_locator *row = vteprec_physical_locator_cast(row_);
   13397                 :            : 
   13398         [ -  + ]:        404 :     ovs_assert(inited);
   13399         [ +  - ]:        404 :     if (datum->n >= 1) {
   13400                 :        404 :         row->encapsulation_type = datum->keys[0].string;
   13401                 :            :     } else {
   13402                 :          0 :         row->encapsulation_type = "";
   13403                 :            :     }
   13404                 :        404 : }
   13405                 :            : 
   13406                 :            : static void
   13407                 :        355 : vteprec_physical_locator_parse_tunnel_key(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   13408                 :            : {
   13409                 :        355 :     struct vteprec_physical_locator *row = vteprec_physical_locator_cast(row_);
   13410                 :        355 :     size_t n = MIN(1, datum->n);
   13411                 :            :     size_t i;
   13412                 :            : 
   13413         [ -  + ]:        355 :     ovs_assert(inited);
   13414                 :        355 :     row->tunnel_key = NULL;
   13415                 :        355 :     row->n_tunnel_key = 0;
   13416         [ -  + ]:        355 :     for (i = 0; i < n; i++) {
   13417         [ #  # ]:          0 :         if (!row->n_tunnel_key) {
   13418                 :          0 :             row->tunnel_key = xmalloc(n * sizeof *row->tunnel_key);
   13419                 :            :         }
   13420                 :          0 :         row->tunnel_key[row->n_tunnel_key] = datum->keys[i].integer;
   13421                 :          0 :         row->n_tunnel_key++;
   13422                 :            :     }
   13423                 :        355 : }
   13424                 :            : 
   13425                 :            : static void
   13426                 :        453 : vteprec_physical_locator_unparse_dst_ip(struct ovsdb_idl_row *row OVS_UNUSED)
   13427                 :            : {
   13428                 :            :     /* Nothing to do. */
   13429                 :        453 : }
   13430                 :            : 
   13431                 :            : static void
   13432                 :        453 : vteprec_physical_locator_unparse_encapsulation_type(struct ovsdb_idl_row *row OVS_UNUSED)
   13433                 :            : {
   13434                 :            :     /* Nothing to do. */
   13435                 :        453 : }
   13436                 :            : 
   13437                 :            : static void
   13438                 :        404 : vteprec_physical_locator_unparse_tunnel_key(struct ovsdb_idl_row *row_)
   13439                 :            : {
   13440                 :        404 :     struct vteprec_physical_locator *row = vteprec_physical_locator_cast(row_);
   13441                 :            : 
   13442         [ -  + ]:        404 :     ovs_assert(inited);
   13443                 :        404 :     free(row->tunnel_key);
   13444                 :        404 : }
   13445                 :            : 
   13446                 :            : static void
   13447                 :        520 : vteprec_physical_locator_init__(struct ovsdb_idl_row *row)
   13448                 :            : {
   13449                 :        520 :     vteprec_physical_locator_init(vteprec_physical_locator_cast(row));
   13450                 :        520 : }
   13451                 :            : 
   13452                 :            : /* Clears the contents of 'row' in table "Physical_Locator". */
   13453                 :            : void
   13454                 :        520 : vteprec_physical_locator_init(struct vteprec_physical_locator *row)
   13455                 :            : {
   13456                 :        520 :     memset(row, 0, sizeof *row); 
   13457                 :        520 : }
   13458                 :            : 
   13459                 :            : /* Searches table "Physical_Locator" in 'idl' for a row with UUID 'uuid'.  Returns
   13460                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   13461                 :            : const struct vteprec_physical_locator *
   13462                 :          0 : vteprec_physical_locator_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   13463                 :            : {
   13464                 :          0 :     return vteprec_physical_locator_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], uuid));
   13465                 :            : }
   13466                 :            : 
   13467                 :            : /* Returns a row in table "Physical_Locator" in 'idl', or a null pointer if that
   13468                 :            :  * table is empty.
   13469                 :            :  *
   13470                 :            :  * Database tables are internally maintained as hash tables, so adding or
   13471                 :            :  * removing rows while traversing the same table can cause some rows to be
   13472                 :            :  * visited twice or not at apply. */
   13473                 :            : const struct vteprec_physical_locator *
   13474                 :        216 : vteprec_physical_locator_first(const struct ovsdb_idl *idl)
   13475                 :            : {
   13476                 :        216 :     return vteprec_physical_locator_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR]));
   13477                 :            : }
   13478                 :            : 
   13479                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   13480                 :            :  * is the last row in its table. */
   13481                 :            : const struct vteprec_physical_locator *
   13482                 :        201 : vteprec_physical_locator_next(const struct vteprec_physical_locator *row)
   13483                 :            : {
   13484                 :        201 :     return vteprec_physical_locator_cast(ovsdb_idl_next_row(&row->header_));
   13485                 :            : }
   13486                 :            : 
   13487                 :          0 : unsigned int vteprec_physical_locator_get_seqno(const struct ovsdb_idl *idl)
   13488                 :            : {
   13489                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR]);
   13490                 :            : }
   13491                 :            : 
   13492                 :          0 : unsigned int vteprec_physical_locator_row_get_seqno(const struct vteprec_physical_locator *row, enum ovsdb_idl_change change)
   13493                 :            : {
   13494                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   13495                 :            : }
   13496                 :            : 
   13497                 :            : const struct vteprec_physical_locator *
   13498                 :          0 : vteprec_physical_locator_track_get_first(const struct ovsdb_idl *idl)
   13499                 :            : {
   13500                 :          0 :     return vteprec_physical_locator_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR]));
   13501                 :            : }
   13502                 :            : 
   13503                 :            : const struct vteprec_physical_locator
   13504                 :          0 : *vteprec_physical_locator_track_get_next(const struct vteprec_physical_locator *row)
   13505                 :            : {
   13506                 :          0 :     return vteprec_physical_locator_cast(ovsdb_idl_track_get_next(&row->header_));
   13507                 :            : }
   13508                 :            : 
   13509                 :            : 
   13510                 :            : /* Deletes 'row' from table "Physical_Locator".  'row' may be freed, so it must not be
   13511                 :            :  * accessed afterward.
   13512                 :            :  *
   13513                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   13514                 :            : void
   13515                 :          0 : vteprec_physical_locator_delete(const struct vteprec_physical_locator *row)
   13516                 :            : {
   13517                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
   13518                 :          0 : }
   13519                 :            : 
   13520                 :            : /* Inserts and returns a new row in the table "Physical_Locator" in the database
   13521                 :            :  * with open transaction 'txn'.
   13522                 :            :  *
   13523                 :            :  * The new row is assigned a randomly generated provisional UUID.
   13524                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   13525                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   13526                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   13527                 :            : struct vteprec_physical_locator *
   13528                 :         49 : vteprec_physical_locator_insert(struct ovsdb_idl_txn *txn)
   13529                 :            : {
   13530                 :         49 :     return vteprec_physical_locator_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], NULL));
   13531                 :            : }
   13532                 :            : 
   13533                 :            : bool
   13534                 :          0 : vteprec_physical_locator_is_updated(const struct vteprec_physical_locator *row, enum vteprec_physical_locator_column_id column)
   13535                 :            : {
   13536                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_physical_locator_columns[column]);
   13537                 :            : }
   13538                 :            : 
   13539                 :            : /* Causes the original contents of column "dst_ip" in 'row' to be
   13540                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   13541                 :            :  * "dst_ip" in 'row' changed (or if 'row' was deleted) between the
   13542                 :            :  * time that the IDL originally read its contents and the time that the
   13543                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   13544                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   13545                 :            :  * change has already been received).
   13546                 :            :  *
   13547                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   13548                 :            :  * reads, an application should call this function any time "dst_ip" is
   13549                 :            :  * read as part of a read-modify-write operation.
   13550                 :            :  *
   13551                 :            :  * In some cases this function reduces to a no-op, because the current value
   13552                 :            :  * of "dst_ip" is already known:
   13553                 :            :  *
   13554                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   13555                 :            :  *     vteprec_physical_locator_insert()).
   13556                 :            :  *
   13557                 :            :  *   - If "dst_ip" has already been modified (with
   13558                 :            :  *     vteprec_physical_locator_set_dst_ip()) within the current transaction.
   13559                 :            :  *
   13560                 :            :  * Because of the latter property, always call this function *before*
   13561                 :            :  * vteprec_physical_locator_set_dst_ip() for a given read-modify-write.
   13562                 :            :  *
   13563                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   13564                 :            : void
   13565                 :          0 : vteprec_physical_locator_verify_dst_ip(const struct vteprec_physical_locator *row)
   13566                 :            : {
   13567         [ #  # ]:          0 :     ovs_assert(inited);
   13568                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_DST_IP]);
   13569                 :          0 : }
   13570                 :            : 
   13571                 :            : /* Causes the original contents of column "encapsulation_type" in 'row' to be
   13572                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   13573                 :            :  * "encapsulation_type" in 'row' changed (or if 'row' was deleted) between the
   13574                 :            :  * time that the IDL originally read its contents and the time that the
   13575                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   13576                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   13577                 :            :  * change has already been received).
   13578                 :            :  *
   13579                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   13580                 :            :  * reads, an application should call this function any time "encapsulation_type" is
   13581                 :            :  * read as part of a read-modify-write operation.
   13582                 :            :  *
   13583                 :            :  * In some cases this function reduces to a no-op, because the current value
   13584                 :            :  * of "encapsulation_type" is already known:
   13585                 :            :  *
   13586                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   13587                 :            :  *     vteprec_physical_locator_insert()).
   13588                 :            :  *
   13589                 :            :  *   - If "encapsulation_type" has already been modified (with
   13590                 :            :  *     vteprec_physical_locator_set_encapsulation_type()) within the current transaction.
   13591                 :            :  *
   13592                 :            :  * Because of the latter property, always call this function *before*
   13593                 :            :  * vteprec_physical_locator_set_encapsulation_type() for a given read-modify-write.
   13594                 :            :  *
   13595                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   13596                 :            : void
   13597                 :          0 : vteprec_physical_locator_verify_encapsulation_type(const struct vteprec_physical_locator *row)
   13598                 :            : {
   13599         [ #  # ]:          0 :     ovs_assert(inited);
   13600                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_ENCAPSULATION_TYPE]);
   13601                 :          0 : }
   13602                 :            : 
   13603                 :            : /* Causes the original contents of column "tunnel_key" in 'row' to be
   13604                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   13605                 :            :  * "tunnel_key" in 'row' changed (or if 'row' was deleted) between the
   13606                 :            :  * time that the IDL originally read its contents and the time that the
   13607                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   13608                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   13609                 :            :  * change has already been received).
   13610                 :            :  *
   13611                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   13612                 :            :  * reads, an application should call this function any time "tunnel_key" is
   13613                 :            :  * read as part of a read-modify-write operation.
   13614                 :            :  *
   13615                 :            :  * In some cases this function reduces to a no-op, because the current value
   13616                 :            :  * of "tunnel_key" is already known:
   13617                 :            :  *
   13618                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   13619                 :            :  *     vteprec_physical_locator_insert()).
   13620                 :            :  *
   13621                 :            :  *   - If "tunnel_key" has already been modified (with
   13622                 :            :  *     vteprec_physical_locator_set_tunnel_key()) within the current transaction.
   13623                 :            :  *
   13624                 :            :  * Because of the latter property, always call this function *before*
   13625                 :            :  * vteprec_physical_locator_set_tunnel_key() for a given read-modify-write.
   13626                 :            :  *
   13627                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   13628                 :            : void
   13629                 :          0 : vteprec_physical_locator_verify_tunnel_key(const struct vteprec_physical_locator *row)
   13630                 :            : {
   13631         [ #  # ]:          0 :     ovs_assert(inited);
   13632                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY]);
   13633                 :          0 : }
   13634                 :            : 
   13635                 :            : /* Returns the "dst_ip" column's value from the "Physical_Locator" table in 'row'
   13636                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   13637                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   13638                 :            :  * for a given key than implementing the same operation on the "cooked"
   13639                 :            :  * form in 'row'.
   13640                 :            :  *
   13641                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   13642                 :            :  * (This helps to avoid silent bugs if someone changes dst_ip's
   13643                 :            :  * type without updating the caller.)
   13644                 :            :  *
   13645                 :            :  * The caller must not modify or free the returned value.
   13646                 :            :  *
   13647                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   13648                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   13649                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   13650                 :            :  * of it with ovsdb_datum_clone().
   13651                 :            :  *
   13652                 :            :  * This function is rarely useful, since it is easier to access the value
   13653                 :            :  * directly through the "dst_ip" member in vteprec_physical_locator. */
   13654                 :            : const struct ovsdb_datum *
   13655                 :          0 : vteprec_physical_locator_get_dst_ip(const struct vteprec_physical_locator *row,
   13656                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   13657                 :            : {
   13658         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   13659                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_locator_col_dst_ip);
   13660                 :            : }
   13661                 :            : 
   13662                 :            : /* Returns the "encapsulation_type" column's value from the "Physical_Locator" table in 'row'
   13663                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   13664                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   13665                 :            :  * for a given key than implementing the same operation on the "cooked"
   13666                 :            :  * form in 'row'.
   13667                 :            :  *
   13668                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   13669                 :            :  * (This helps to avoid silent bugs if someone changes encapsulation_type's
   13670                 :            :  * type without updating the caller.)
   13671                 :            :  *
   13672                 :            :  * The caller must not modify or free the returned value.
   13673                 :            :  *
   13674                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   13675                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   13676                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   13677                 :            :  * of it with ovsdb_datum_clone().
   13678                 :            :  *
   13679                 :            :  * This function is rarely useful, since it is easier to access the value
   13680                 :            :  * directly through the "encapsulation_type" member in vteprec_physical_locator. */
   13681                 :            : const struct ovsdb_datum *
   13682                 :          0 : vteprec_physical_locator_get_encapsulation_type(const struct vteprec_physical_locator *row,
   13683                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   13684                 :            : {
   13685         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   13686                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_locator_col_encapsulation_type);
   13687                 :            : }
   13688                 :            : 
   13689                 :            : /* Returns the "tunnel_key" column's value from the "Physical_Locator" table in 'row'
   13690                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   13691                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   13692                 :            :  * for a given key than implementing the same operation on the "cooked"
   13693                 :            :  * form in 'row'.
   13694                 :            :  *
   13695                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   13696                 :            :  * (This helps to avoid silent bugs if someone changes tunnel_key's
   13697                 :            :  * type without updating the caller.)
   13698                 :            :  *
   13699                 :            :  * The caller must not modify or free the returned value.
   13700                 :            :  *
   13701                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   13702                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   13703                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   13704                 :            :  * of it with ovsdb_datum_clone().
   13705                 :            :  *
   13706                 :            :  * This function is rarely useful, since it is easier to access the value
   13707                 :            :  * directly through the "tunnel_key" member in vteprec_physical_locator. */
   13708                 :            : const struct ovsdb_datum *
   13709                 :          0 : vteprec_physical_locator_get_tunnel_key(const struct vteprec_physical_locator *row,
   13710                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   13711                 :            : {
   13712         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   13713                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_locator_col_tunnel_key);
   13714                 :            : }
   13715                 :            : 
   13716                 :            : /* Sets the "dst_ip" column from the "Physical_Locator" table in 'row' to
   13717                 :            :  * 'dst_ip'.
   13718                 :            :  *
   13719                 :            :  * The caller retains ownership of the arguments. */
   13720                 :            : void
   13721                 :         49 : vteprec_physical_locator_set_dst_ip(const struct vteprec_physical_locator *row, const char *dst_ip)
   13722                 :            : {
   13723                 :            :     struct ovsdb_datum datum;
   13724                 :            :     union ovsdb_atom key;
   13725                 :            : 
   13726         [ -  + ]:         49 :     ovs_assert(inited);
   13727                 :         49 :     datum.n = 1;
   13728                 :         49 :     datum.keys = &key;
   13729                 :         49 :     key.string = CONST_CAST(char *, dst_ip);
   13730                 :         49 :     datum.values = NULL;
   13731                 :         49 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_DST_IP], &datum);
   13732                 :         49 : }
   13733                 :            : 
   13734                 :            : /* Sets the "encapsulation_type" column from the "Physical_Locator" table in 'row' to
   13735                 :            :  * 'encapsulation_type'.
   13736                 :            :  *
   13737                 :            :  * Argument constraints: must be "vxlan_over_ipv4"
   13738                 :            :  *
   13739                 :            :  * The caller retains ownership of the arguments. */
   13740                 :            : void
   13741                 :         49 : vteprec_physical_locator_set_encapsulation_type(const struct vteprec_physical_locator *row, const char *encapsulation_type)
   13742                 :            : {
   13743                 :            :     struct ovsdb_datum datum;
   13744                 :            :     union ovsdb_atom key;
   13745                 :            : 
   13746         [ -  + ]:         49 :     ovs_assert(inited);
   13747                 :         49 :     datum.n = 1;
   13748                 :         49 :     datum.keys = &key;
   13749                 :         49 :     key.string = CONST_CAST(char *, encapsulation_type);
   13750                 :         49 :     datum.values = NULL;
   13751                 :         49 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_ENCAPSULATION_TYPE], &datum);
   13752                 :         49 : }
   13753                 :            : 
   13754                 :            : /* Sets the "tunnel_key" column from the "Physical_Locator" table in 'row' to
   13755                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
   13756                 :            :  *
   13757                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
   13758                 :            :  * may be NULL.
   13759                 :            :  *
   13760                 :            :  * The caller retains ownership of the arguments. */
   13761                 :            : void
   13762                 :          0 : vteprec_physical_locator_set_tunnel_key(const struct vteprec_physical_locator *row, const int64_t *tunnel_key, size_t n_tunnel_key)
   13763                 :            : {
   13764                 :            :     struct ovsdb_datum datum;
   13765                 :            :     union ovsdb_atom key;
   13766                 :            : 
   13767         [ #  # ]:          0 :     ovs_assert(inited);
   13768         [ #  # ]:          0 :     if (n_tunnel_key) {
   13769                 :          0 :         datum.n = 1;
   13770                 :          0 :         datum.keys = &key;
   13771                 :          0 :         key.integer = *tunnel_key;
   13772                 :            :     } else {
   13773                 :          0 :         datum.n = 0;
   13774                 :          0 :         datum.keys = NULL;
   13775                 :            :     }
   13776                 :          0 :     datum.values = NULL;
   13777                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY], &datum);
   13778                 :          0 : }
   13779                 :            : 
   13780                 :            : /* Adds the value 'new_value' to the "tunnel_key" set column from the "Physical_Locator" table
   13781                 :            :  * in 'row'.
   13782                 :            :  *
   13783                 :            :  */
   13784                 :            : void
   13785                 :          0 : vteprec_physical_locator_update_tunnel_key_addvalue(const struct vteprec_physical_locator *row, int64_t new_value)
   13786                 :            : {
   13787                 :            :     struct ovsdb_datum *datum;
   13788                 :            : 
   13789         [ #  # ]:          0 :     ovs_assert(inited);
   13790                 :            : 
   13791                 :          0 :     datum = xmalloc(sizeof *datum);
   13792                 :          0 :     datum->n = 1;
   13793                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   13794                 :          0 :     datum->values = NULL;
   13795                 :            : 
   13796                 :          0 :     datum->keys[0].integer = new_value;
   13797                 :            : 
   13798                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   13799                 :            :                                     &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY],
   13800                 :            :                                     datum);
   13801                 :          0 : }
   13802                 :            : 
   13803                 :            : /* Deletes the value 'delete_value' from the "tunnel_key" set column from the
   13804                 :            :  * "Physical_Locator" table in 'row'.
   13805                 :            :  *
   13806                 :            :  */
   13807                 :            : void
   13808                 :          0 : vteprec_physical_locator_update_tunnel_key_delvalue(const struct vteprec_physical_locator *row, int64_t delete_value)
   13809                 :            : {
   13810                 :            :     struct ovsdb_datum *datum;
   13811                 :            : 
   13812         [ #  # ]:          0 :     ovs_assert(inited);
   13813                 :            : 
   13814                 :          0 :     datum = xmalloc(sizeof *datum);
   13815                 :          0 :     datum->n = 1;
   13816                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   13817                 :          0 :     datum->values = NULL;
   13818                 :            : 
   13819                 :          0 :     datum->keys[0].integer = delete_value;
   13820                 :            : 
   13821                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   13822                 :            :                                     &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY],
   13823                 :            :                                     datum);
   13824                 :          0 : }
   13825                 :            : 
   13826                 :            : /* Sets the "dst_ip" column from the "Physical_Locator" table in 'row' to
   13827                 :            :  * 'dst_ip'.
   13828                 :            :  *
   13829                 :            :  * The caller retains ownership of the arguments. */
   13830                 :            : void
   13831                 :          0 : vteprec_physical_locator_add_clause_dst_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dst_ip)
   13832                 :            : {
   13833                 :            :     struct ovsdb_datum datum;
   13834                 :            :     union ovsdb_atom key;
   13835                 :            : 
   13836         [ #  # ]:          0 :     ovs_assert(inited);
   13837                 :          0 :     datum.n = 1;
   13838                 :          0 :     datum.keys = &key;
   13839                 :          0 :     key.string = CONST_CAST(char *, dst_ip);
   13840                 :          0 :     datum.values = NULL;
   13841                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13842                 :            :                           function,
   13843                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_DST_IP],
   13844                 :            :                           &datum);
   13845                 :          0 : }
   13846                 :            : 
   13847                 :            : /* Sets the "encapsulation_type" column from the "Physical_Locator" table in 'row' to
   13848                 :            :  * 'encapsulation_type'.
   13849                 :            :  *
   13850                 :            :  * Argument constraints: must be "vxlan_over_ipv4"
   13851                 :            :  *
   13852                 :            :  * The caller retains ownership of the arguments. */
   13853                 :            : void
   13854                 :          0 : vteprec_physical_locator_add_clause_encapsulation_type(struct ovsdb_idl *idl, enum ovsdb_function function, const char *encapsulation_type)
   13855                 :            : {
   13856                 :            :     struct ovsdb_datum datum;
   13857                 :            :     union ovsdb_atom key;
   13858                 :            : 
   13859         [ #  # ]:          0 :     ovs_assert(inited);
   13860                 :          0 :     datum.n = 1;
   13861                 :          0 :     datum.keys = &key;
   13862                 :          0 :     key.string = CONST_CAST(char *, encapsulation_type);
   13863                 :          0 :     datum.values = NULL;
   13864                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13865                 :            :                           function,
   13866                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_ENCAPSULATION_TYPE],
   13867                 :            :                           &datum);
   13868                 :          0 : }
   13869                 :            : 
   13870                 :            : /* Sets the "tunnel_key" column from the "Physical_Locator" table in 'row' to
   13871                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
   13872                 :            :  *
   13873                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
   13874                 :            :  * may be NULL.
   13875                 :            :  *
   13876                 :            :  * The caller retains ownership of the arguments. */
   13877                 :            : void
   13878                 :          0 : vteprec_physical_locator_add_clause_tunnel_key(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tunnel_key, size_t n_tunnel_key)
   13879                 :            : {
   13880                 :            :     struct ovsdb_datum datum;
   13881                 :            :     union ovsdb_atom key;
   13882                 :            : 
   13883         [ #  # ]:          0 :     ovs_assert(inited);
   13884         [ #  # ]:          0 :     if (n_tunnel_key) {
   13885                 :          0 :         datum.n = 1;
   13886                 :          0 :         datum.keys = &key;
   13887                 :          0 :         key.integer = *tunnel_key;
   13888                 :            :     } else {
   13889                 :          0 :         datum.n = 0;
   13890                 :          0 :         datum.keys = NULL;
   13891                 :            :     }
   13892                 :          0 :     datum.values = NULL;
   13893                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13894                 :            :                           function,
   13895                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY],
   13896                 :            :                           &datum);
   13897                 :          0 : }
   13898                 :            : void
   13899                 :          0 : vteprec_physical_locator_add_clause_false(struct ovsdb_idl *idl)
   13900                 :            : {
   13901                 :            :     struct ovsdb_datum datum;
   13902                 :            : 
   13903                 :          0 :     ovsdb_datum_init_empty(&datum);
   13904                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], OVSDB_F_FALSE, NULL, &datum);
   13905                 :          0 : }
   13906                 :            : void
   13907                 :          0 : vteprec_physical_locator_add_clause_true(struct ovsdb_idl *idl)
   13908                 :            : {
   13909                 :            :     struct ovsdb_datum datum;
   13910                 :            : 
   13911                 :          0 :     ovsdb_datum_init_empty(&datum);
   13912                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], OVSDB_F_TRUE, NULL, &datum);
   13913                 :          0 : }
   13914                 :            : 
   13915                 :            : /* Sets the "dst_ip" column from the "Physical_Locator" table in 'row' to
   13916                 :            :  * 'dst_ip'.
   13917                 :            :  *
   13918                 :            :  * The caller retains ownership of the arguments. */
   13919                 :            : void
   13920                 :          0 : vteprec_physical_locator_remove_clause_dst_ip(struct ovsdb_idl *idl, enum ovsdb_function function, const char *dst_ip)
   13921                 :            : {
   13922                 :            :     struct ovsdb_datum datum;
   13923                 :            :     union ovsdb_atom key;
   13924                 :            : 
   13925         [ #  # ]:          0 :     ovs_assert(inited);
   13926                 :          0 :     datum.n = 1;
   13927                 :          0 :     datum.keys = &key;
   13928                 :          0 :     key.string = CONST_CAST(char *, dst_ip);
   13929                 :          0 :     datum.values = NULL;
   13930                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13931                 :            :                           function,
   13932                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_DST_IP],
   13933                 :            :                           &datum);
   13934                 :          0 : }
   13935                 :            : 
   13936                 :            : /* Sets the "encapsulation_type" column from the "Physical_Locator" table in 'row' to
   13937                 :            :  * 'encapsulation_type'.
   13938                 :            :  *
   13939                 :            :  * Argument constraints: must be "vxlan_over_ipv4"
   13940                 :            :  *
   13941                 :            :  * The caller retains ownership of the arguments. */
   13942                 :            : void
   13943                 :          0 : vteprec_physical_locator_remove_clause_encapsulation_type(struct ovsdb_idl *idl, enum ovsdb_function function, const char *encapsulation_type)
   13944                 :            : {
   13945                 :            :     struct ovsdb_datum datum;
   13946                 :            :     union ovsdb_atom key;
   13947                 :            : 
   13948         [ #  # ]:          0 :     ovs_assert(inited);
   13949                 :          0 :     datum.n = 1;
   13950                 :          0 :     datum.keys = &key;
   13951                 :          0 :     key.string = CONST_CAST(char *, encapsulation_type);
   13952                 :          0 :     datum.values = NULL;
   13953                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13954                 :            :                           function,
   13955                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_ENCAPSULATION_TYPE],
   13956                 :            :                           &datum);
   13957                 :          0 : }
   13958                 :            : 
   13959                 :            : /* Sets the "tunnel_key" column from the "Physical_Locator" table in 'row' to
   13960                 :            :  * the 'tunnel_key' set with 'n_tunnel_key' entries.
   13961                 :            :  *
   13962                 :            :  * 'n_tunnel_key' may be 0 or 1; if it is 0, then 'tunnel_key'
   13963                 :            :  * may be NULL.
   13964                 :            :  *
   13965                 :            :  * The caller retains ownership of the arguments. */
   13966                 :            : void
   13967                 :          0 : vteprec_physical_locator_remove_clause_tunnel_key(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *tunnel_key, size_t n_tunnel_key)
   13968                 :            : {
   13969                 :            :     struct ovsdb_datum datum;
   13970                 :            :     union ovsdb_atom key;
   13971                 :            : 
   13972         [ #  # ]:          0 :     ovs_assert(inited);
   13973         [ #  # ]:          0 :     if (n_tunnel_key) {
   13974                 :          0 :         datum.n = 1;
   13975                 :          0 :         datum.keys = &key;
   13976                 :          0 :         key.integer = *tunnel_key;
   13977                 :            :     } else {
   13978                 :          0 :         datum.n = 0;
   13979                 :          0 :         datum.keys = NULL;
   13980                 :            :     }
   13981                 :          0 :     datum.values = NULL;
   13982                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR],
   13983                 :            :                           function,
   13984                 :            :                           &vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_COL_TUNNEL_KEY],
   13985                 :            :                           &datum);
   13986                 :          0 : }
   13987                 :            : void
   13988                 :          0 : vteprec_physical_locator_remove_clause_false(struct ovsdb_idl *idl)
   13989                 :            : {
   13990                 :            :     struct ovsdb_datum datum;
   13991                 :            : 
   13992                 :          0 :     ovsdb_datum_init_empty(&datum);
   13993                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], OVSDB_F_FALSE, NULL, &datum);
   13994                 :          0 : }
   13995                 :            : void
   13996                 :          0 : vteprec_physical_locator_remove_clause_true(struct ovsdb_idl *idl)
   13997                 :            : {
   13998                 :            :     struct ovsdb_datum datum;
   13999                 :            : 
   14000                 :          0 :     ovsdb_datum_init_empty(&datum);
   14001                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], OVSDB_F_TRUE, NULL, &datum);
   14002                 :          0 : }
   14003                 :            : 
   14004                 :            : struct ovsdb_idl_column vteprec_physical_locator_columns[VTEPREC_PHYSICAL_LOCATOR_N_COLUMNS];
   14005                 :            : 
   14006                 :            : static void
   14007                 :        741 : vteprec_physical_locator_columns_init(void)
   14008                 :            : {
   14009                 :            :     struct ovsdb_idl_column *c;
   14010                 :            : 
   14011                 :            :     /* Initialize vteprec_physical_locator_col_dst_ip. */
   14012                 :        741 :     c = &vteprec_physical_locator_col_dst_ip;
   14013                 :        741 :     c->name = "dst_ip";
   14014                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   14015                 :        741 :     c->type.key.u.string.minLen = 0;
   14016                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   14017                 :        741 :     c->type.n_min = 1;
   14018                 :        741 :     c->type.n_max = 1;
   14019                 :        741 :     c->mutable = false;
   14020                 :        741 :     c->parse = vteprec_physical_locator_parse_dst_ip;
   14021                 :        741 :     c->unparse = vteprec_physical_locator_unparse_dst_ip;
   14022                 :            : 
   14023                 :            :     /* Initialize vteprec_physical_locator_col_encapsulation_type. */
   14024                 :        741 :     c = &vteprec_physical_locator_col_encapsulation_type;
   14025                 :        741 :     c->name = "encapsulation_type";
   14026                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   14027                 :        741 :     c->type.key.enum_ = xmalloc(sizeof *c->type.key.enum_);
   14028                 :        741 :     c->type.key.enum_->n = 1;
   14029                 :        741 :     c->type.key.enum_->keys = xmalloc(1 * sizeof *c->type.key.enum_->keys);
   14030                 :        741 :     c->type.key.enum_->keys[0].string = xstrdup("vxlan_over_ipv4");
   14031                 :        741 :     c->type.key.enum_->values = NULL;
   14032                 :        741 :     c->type.key.u.string.minLen = 0;
   14033                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   14034                 :        741 :     c->type.n_min = 1;
   14035                 :        741 :     c->type.n_max = 1;
   14036                 :        741 :     c->mutable = false;
   14037                 :        741 :     c->parse = vteprec_physical_locator_parse_encapsulation_type;
   14038                 :        741 :     c->unparse = vteprec_physical_locator_unparse_encapsulation_type;
   14039                 :            : 
   14040                 :            :     /* Initialize vteprec_physical_locator_col_tunnel_key. */
   14041                 :        741 :     c = &vteprec_physical_locator_col_tunnel_key;
   14042                 :        741 :     c->name = "tunnel_key";
   14043                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   14044                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   14045                 :        741 :     c->type.n_min = 0;
   14046                 :        741 :     c->type.n_max = 1;
   14047                 :        741 :     c->mutable = true;
   14048                 :        741 :     c->parse = vteprec_physical_locator_parse_tunnel_key;
   14049                 :        741 :     c->unparse = vteprec_physical_locator_unparse_tunnel_key;
   14050                 :        741 : }
   14051                 :            : 
   14052                 :            : /* Physical_Locator_Set table. */
   14053                 :            : 
   14054                 :            : static void
   14055                 :        461 : vteprec_physical_locator_set_parse_locators(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14056                 :            : {
   14057                 :        461 :     struct vteprec_physical_locator_set *row = vteprec_physical_locator_set_cast(row_);
   14058                 :            :     size_t i;
   14059                 :            : 
   14060         [ -  + ]:        461 :     ovs_assert(inited);
   14061                 :        461 :     row->locators = NULL;
   14062                 :        461 :     row->n_locators = 0;
   14063         [ +  + ]:       1111 :     for (i = 0; i < datum->n; i++) {
   14064                 :        650 :         struct vteprec_physical_locator *keyRow = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[i].uuid));
   14065         [ +  + ]:        650 :         if (keyRow) {
   14066         [ +  + ]:        462 :             if (!row->n_locators) {
   14067                 :        357 :                 row->locators = xmalloc(datum->n * sizeof *row->locators);
   14068                 :            :             }
   14069                 :        462 :             row->locators[row->n_locators] = keyRow;
   14070                 :        462 :             row->n_locators++;
   14071                 :            :         }
   14072                 :            :     }
   14073                 :        461 : }
   14074                 :            : 
   14075                 :            : static void
   14076                 :        512 : vteprec_physical_locator_set_unparse_locators(struct ovsdb_idl_row *row_)
   14077                 :            : {
   14078                 :        512 :     struct vteprec_physical_locator_set *row = vteprec_physical_locator_set_cast(row_);
   14079                 :            : 
   14080         [ -  + ]:        512 :     ovs_assert(inited);
   14081                 :        512 :     free(row->locators);
   14082                 :        512 : }
   14083                 :            : 
   14084                 :            : static void
   14085                 :        314 : vteprec_physical_locator_set_init__(struct ovsdb_idl_row *row)
   14086                 :            : {
   14087                 :        314 :     vteprec_physical_locator_set_init(vteprec_physical_locator_set_cast(row));
   14088                 :        314 : }
   14089                 :            : 
   14090                 :            : /* Clears the contents of 'row' in table "Physical_Locator_Set". */
   14091                 :            : void
   14092                 :        314 : vteprec_physical_locator_set_init(struct vteprec_physical_locator_set *row)
   14093                 :            : {
   14094                 :        314 :     memset(row, 0, sizeof *row); 
   14095                 :        314 : }
   14096                 :            : 
   14097                 :            : /* Searches table "Physical_Locator_Set" in 'idl' for a row with UUID 'uuid'.  Returns
   14098                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   14099                 :            : const struct vteprec_physical_locator_set *
   14100                 :          0 : vteprec_physical_locator_set_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   14101                 :            : {
   14102                 :          0 :     return vteprec_physical_locator_set_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], uuid));
   14103                 :            : }
   14104                 :            : 
   14105                 :            : /* Returns a row in table "Physical_Locator_Set" in 'idl', or a null pointer if that
   14106                 :            :  * table is empty.
   14107                 :            :  *
   14108                 :            :  * Database tables are internally maintained as hash tables, so adding or
   14109                 :            :  * removing rows while traversing the same table can cause some rows to be
   14110                 :            :  * visited twice or not at apply. */
   14111                 :            : const struct vteprec_physical_locator_set *
   14112                 :          0 : vteprec_physical_locator_set_first(const struct ovsdb_idl *idl)
   14113                 :            : {
   14114                 :          0 :     return vteprec_physical_locator_set_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET]));
   14115                 :            : }
   14116                 :            : 
   14117                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   14118                 :            :  * is the last row in its table. */
   14119                 :            : const struct vteprec_physical_locator_set *
   14120                 :          0 : vteprec_physical_locator_set_next(const struct vteprec_physical_locator_set *row)
   14121                 :            : {
   14122                 :          0 :     return vteprec_physical_locator_set_cast(ovsdb_idl_next_row(&row->header_));
   14123                 :            : }
   14124                 :            : 
   14125                 :          0 : unsigned int vteprec_physical_locator_set_get_seqno(const struct ovsdb_idl *idl)
   14126                 :            : {
   14127                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET]);
   14128                 :            : }
   14129                 :            : 
   14130                 :          0 : unsigned int vteprec_physical_locator_set_row_get_seqno(const struct vteprec_physical_locator_set *row, enum ovsdb_idl_change change)
   14131                 :            : {
   14132                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   14133                 :            : }
   14134                 :            : 
   14135                 :            : const struct vteprec_physical_locator_set *
   14136                 :          0 : vteprec_physical_locator_set_track_get_first(const struct ovsdb_idl *idl)
   14137                 :            : {
   14138                 :          0 :     return vteprec_physical_locator_set_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET]));
   14139                 :            : }
   14140                 :            : 
   14141                 :            : const struct vteprec_physical_locator_set
   14142                 :          0 : *vteprec_physical_locator_set_track_get_next(const struct vteprec_physical_locator_set *row)
   14143                 :            : {
   14144                 :          0 :     return vteprec_physical_locator_set_cast(ovsdb_idl_track_get_next(&row->header_));
   14145                 :            : }
   14146                 :            : 
   14147                 :            : 
   14148                 :            : /* Deletes 'row' from table "Physical_Locator_Set".  'row' may be freed, so it must not be
   14149                 :            :  * accessed afterward.
   14150                 :            :  *
   14151                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14152                 :            : void
   14153                 :          0 : vteprec_physical_locator_set_delete(const struct vteprec_physical_locator_set *row)
   14154                 :            : {
   14155                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
   14156                 :          0 : }
   14157                 :            : 
   14158                 :            : /* Inserts and returns a new row in the table "Physical_Locator_Set" in the database
   14159                 :            :  * with open transaction 'txn'.
   14160                 :            :  *
   14161                 :            :  * The new row is assigned a randomly generated provisional UUID.
   14162                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   14163                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   14164                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   14165                 :            : struct vteprec_physical_locator_set *
   14166                 :         51 : vteprec_physical_locator_set_insert(struct ovsdb_idl_txn *txn)
   14167                 :            : {
   14168                 :         51 :     return vteprec_physical_locator_set_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], NULL));
   14169                 :            : }
   14170                 :            : 
   14171                 :            : bool
   14172                 :          0 : vteprec_physical_locator_set_is_updated(const struct vteprec_physical_locator_set *row, enum vteprec_physical_locator_set_column_id column)
   14173                 :            : {
   14174                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_physical_locator_set_columns[column]);
   14175                 :            : }
   14176                 :            : 
   14177                 :            : /* Causes the original contents of column "locators" in 'row' to be
   14178                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14179                 :            :  * "locators" in 'row' changed (or if 'row' was deleted) between the
   14180                 :            :  * time that the IDL originally read its contents and the time that the
   14181                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14182                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14183                 :            :  * change has already been received).
   14184                 :            :  *
   14185                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14186                 :            :  * reads, an application should call this function any time "locators" is
   14187                 :            :  * read as part of a read-modify-write operation.
   14188                 :            :  *
   14189                 :            :  * In some cases this function reduces to a no-op, because the current value
   14190                 :            :  * of "locators" is already known:
   14191                 :            :  *
   14192                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14193                 :            :  *     vteprec_physical_locator_set_insert()).
   14194                 :            :  *
   14195                 :            :  *   - If "locators" has already been modified (with
   14196                 :            :  *     vteprec_physical_locator_set_set_locators()) within the current transaction.
   14197                 :            :  *
   14198                 :            :  * Because of the latter property, always call this function *before*
   14199                 :            :  * vteprec_physical_locator_set_set_locators() for a given read-modify-write.
   14200                 :            :  *
   14201                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14202                 :            : void
   14203                 :          0 : vteprec_physical_locator_set_verify_locators(const struct vteprec_physical_locator_set *row)
   14204                 :            : {
   14205         [ #  # ]:          0 :     ovs_assert(inited);
   14206                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS]);
   14207                 :          0 : }
   14208                 :            : 
   14209                 :            : /* Returns the "locators" column's value from the "Physical_Locator_Set" table in 'row'
   14210                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   14211                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   14212                 :            :  * for a given key than implementing the same operation on the "cooked"
   14213                 :            :  * form in 'row'.
   14214                 :            :  *
   14215                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   14216                 :            :  * (This helps to avoid silent bugs if someone changes locators's
   14217                 :            :  * type without updating the caller.)
   14218                 :            :  *
   14219                 :            :  * The caller must not modify or free the returned value.
   14220                 :            :  *
   14221                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   14222                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   14223                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   14224                 :            :  * of it with ovsdb_datum_clone().
   14225                 :            :  *
   14226                 :            :  * This function is rarely useful, since it is easier to access the value
   14227                 :            :  * directly through the "locators" member in vteprec_physical_locator_set. */
   14228                 :            : const struct ovsdb_datum *
   14229                 :          0 : vteprec_physical_locator_set_get_locators(const struct vteprec_physical_locator_set *row,
   14230                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   14231                 :            : {
   14232         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   14233                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_locator_set_col_locators);
   14234                 :            : }
   14235                 :            : 
   14236                 :            : /* Sets the "locators" column from the "Physical_Locator_Set" table in 'row' to
   14237                 :            :  * the 'locators' set with 'n_locators' entries.
   14238                 :            :  *
   14239                 :            :  * The caller retains ownership of the arguments. */
   14240                 :            : void
   14241                 :         51 : vteprec_physical_locator_set_set_locators(const struct vteprec_physical_locator_set *row, struct vteprec_physical_locator **locators, size_t n_locators)
   14242                 :            : {
   14243                 :            :     struct ovsdb_datum datum;
   14244                 :            :     size_t i;
   14245                 :            : 
   14246         [ -  + ]:         51 :     ovs_assert(inited);
   14247                 :         51 :     datum.n = n_locators;
   14248         [ +  - ]:         51 :     datum.keys = n_locators ? xmalloc(n_locators * sizeof *datum.keys) : NULL;
   14249                 :         51 :     datum.values = NULL;
   14250         [ +  + ]:        120 :     for (i = 0; i < n_locators; i++) {
   14251                 :         69 :         datum.keys[i].uuid = locators[i]->header_.uuid;
   14252                 :            :     }
   14253                 :         51 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   14254                 :         51 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS], &datum);
   14255                 :         51 : }
   14256                 :            : 
   14257                 :            : /* Adds the value 'new_value' to the "locators" set column from the "Physical_Locator_Set" table
   14258                 :            :  * in 'row'.
   14259                 :            :  *
   14260                 :            :  */
   14261                 :            : void
   14262                 :          0 : vteprec_physical_locator_set_update_locators_addvalue(const struct vteprec_physical_locator_set *row, const struct vteprec_physical_locator *new_value)
   14263                 :            : {
   14264                 :            :     struct ovsdb_datum *datum;
   14265                 :            : 
   14266         [ #  # ]:          0 :     ovs_assert(inited);
   14267                 :            : 
   14268                 :          0 :     datum = xmalloc(sizeof *datum);
   14269                 :          0 :     datum->n = 1;
   14270                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   14271                 :          0 :     datum->values = NULL;
   14272                 :            : 
   14273                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
   14274                 :            : 
   14275                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   14276                 :            :                                     &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS],
   14277                 :            :                                     datum);
   14278                 :          0 : }
   14279                 :            : 
   14280                 :            : /* Deletes the value 'delete_value' from the "locators" set column from the
   14281                 :            :  * "Physical_Locator_Set" table in 'row'.
   14282                 :            :  *
   14283                 :            :  */
   14284                 :            : void
   14285                 :          0 : vteprec_physical_locator_set_update_locators_delvalue(const struct vteprec_physical_locator_set *row, const struct vteprec_physical_locator *delete_value)
   14286                 :            : {
   14287                 :            :     struct ovsdb_datum *datum;
   14288                 :            : 
   14289         [ #  # ]:          0 :     ovs_assert(inited);
   14290                 :            : 
   14291                 :          0 :     datum = xmalloc(sizeof *datum);
   14292                 :          0 :     datum->n = 1;
   14293                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   14294                 :          0 :     datum->values = NULL;
   14295                 :            : 
   14296                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
   14297                 :            : 
   14298                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   14299                 :            :                                     &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS],
   14300                 :            :                                     datum);
   14301                 :          0 : }
   14302                 :            : 
   14303                 :            : /* Sets the "locators" column from the "Physical_Locator_Set" table in 'row' to
   14304                 :            :  * the 'locators' set with 'n_locators' entries.
   14305                 :            :  *
   14306                 :            :  * The caller retains ownership of the arguments. */
   14307                 :            : void
   14308                 :          0 : vteprec_physical_locator_set_add_clause_locators(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **locators, size_t n_locators)
   14309                 :            : {
   14310                 :            :     struct ovsdb_datum datum;
   14311                 :            :     size_t i;
   14312                 :            : 
   14313         [ #  # ]:          0 :     ovs_assert(inited);
   14314                 :          0 :     datum.n = n_locators;
   14315         [ #  # ]:          0 :     datum.keys = n_locators ? xmalloc(n_locators * sizeof *datum.keys) : NULL;
   14316                 :          0 :     datum.values = NULL;
   14317         [ #  # ]:          0 :     for (i = 0; i < n_locators; i++) {
   14318                 :          0 :         datum.keys[i].uuid = *locators[i];
   14319                 :            :     }
   14320                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   14321                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET],
   14322                 :            :                           function,
   14323                 :            :                           &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS],
   14324                 :            :                           &datum);
   14325                 :          0 :     free(datum.keys);
   14326                 :          0 : }
   14327                 :            : void
   14328                 :          0 : vteprec_physical_locator_set_add_clause_false(struct ovsdb_idl *idl)
   14329                 :            : {
   14330                 :            :     struct ovsdb_datum datum;
   14331                 :            : 
   14332                 :          0 :     ovsdb_datum_init_empty(&datum);
   14333                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], OVSDB_F_FALSE, NULL, &datum);
   14334                 :          0 : }
   14335                 :            : void
   14336                 :          0 : vteprec_physical_locator_set_add_clause_true(struct ovsdb_idl *idl)
   14337                 :            : {
   14338                 :            :     struct ovsdb_datum datum;
   14339                 :            : 
   14340                 :          0 :     ovsdb_datum_init_empty(&datum);
   14341                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], OVSDB_F_TRUE, NULL, &datum);
   14342                 :          0 : }
   14343                 :            : 
   14344                 :            : /* Sets the "locators" column from the "Physical_Locator_Set" table in 'row' to
   14345                 :            :  * the 'locators' set with 'n_locators' entries.
   14346                 :            :  *
   14347                 :            :  * The caller retains ownership of the arguments. */
   14348                 :            : void
   14349                 :          0 : vteprec_physical_locator_set_remove_clause_locators(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **locators, size_t n_locators)
   14350                 :            : {
   14351                 :            :     struct ovsdb_datum datum;
   14352                 :            :     size_t i;
   14353                 :            : 
   14354         [ #  # ]:          0 :     ovs_assert(inited);
   14355                 :          0 :     datum.n = n_locators;
   14356         [ #  # ]:          0 :     datum.keys = n_locators ? xmalloc(n_locators * sizeof *datum.keys) : NULL;
   14357                 :          0 :     datum.values = NULL;
   14358         [ #  # ]:          0 :     for (i = 0; i < n_locators; i++) {
   14359                 :          0 :         datum.keys[i].uuid = *locators[i];
   14360                 :            :     }
   14361                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   14362                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET],
   14363                 :            :                           function,
   14364                 :            :                           &vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_COL_LOCATORS],
   14365                 :            :                           &datum);
   14366                 :          0 :     free(datum.keys);
   14367                 :          0 : }
   14368                 :            : void
   14369                 :          0 : vteprec_physical_locator_set_remove_clause_false(struct ovsdb_idl *idl)
   14370                 :            : {
   14371                 :            :     struct ovsdb_datum datum;
   14372                 :            : 
   14373                 :          0 :     ovsdb_datum_init_empty(&datum);
   14374                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], OVSDB_F_FALSE, NULL, &datum);
   14375                 :          0 : }
   14376                 :            : void
   14377                 :          0 : vteprec_physical_locator_set_remove_clause_true(struct ovsdb_idl *idl)
   14378                 :            : {
   14379                 :            :     struct ovsdb_datum datum;
   14380                 :            : 
   14381                 :          0 :     ovsdb_datum_init_empty(&datum);
   14382                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR_SET], OVSDB_F_TRUE, NULL, &datum);
   14383                 :          0 : }
   14384                 :            : 
   14385                 :            : struct ovsdb_idl_column vteprec_physical_locator_set_columns[VTEPREC_PHYSICAL_LOCATOR_SET_N_COLUMNS];
   14386                 :            : 
   14387                 :            : static void
   14388                 :        741 : vteprec_physical_locator_set_columns_init(void)
   14389                 :            : {
   14390                 :            :     struct ovsdb_idl_column *c;
   14391                 :            : 
   14392                 :            :     /* Initialize vteprec_physical_locator_set_col_locators. */
   14393                 :        741 :     c = &vteprec_physical_locator_set_col_locators;
   14394                 :        741 :     c->name = "locators";
   14395                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   14396                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
   14397                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   14398                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   14399                 :        741 :     c->type.n_min = 1;
   14400                 :        741 :     c->type.n_max = UINT_MAX;
   14401                 :        741 :     c->mutable = false;
   14402                 :        741 :     c->parse = vteprec_physical_locator_set_parse_locators;
   14403                 :        741 :     c->unparse = vteprec_physical_locator_set_unparse_locators;
   14404                 :        741 : }
   14405                 :            : 
   14406                 :            : /* Physical_Port table. */
   14407                 :            : 
   14408                 :            : static void
   14409                 :        666 : vteprec_physical_port_parse_acl_bindings(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14410                 :            : {
   14411                 :        666 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14412                 :            :     size_t i;
   14413                 :            : 
   14414         [ -  + ]:        666 :     ovs_assert(inited);
   14415                 :        666 :     row->key_acl_bindings = NULL;
   14416                 :        666 :     row->value_acl_bindings = NULL;
   14417                 :        666 :     row->n_acl_bindings = 0;
   14418         [ -  + ]:        666 :     for (i = 0; i < datum->n; i++) {
   14419                 :          0 :         struct vteprec_acl *valueRow = vteprec_acl_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_ACL], &datum->values[i].uuid));
   14420         [ #  # ]:          0 :         if (valueRow) {
   14421         [ #  # ]:          0 :             if (!row->n_acl_bindings) {
   14422                 :          0 :                 row->key_acl_bindings = xmalloc(datum->n * sizeof *row->key_acl_bindings);
   14423                 :          0 :                 row->value_acl_bindings = xmalloc(datum->n * sizeof *row->value_acl_bindings);
   14424                 :            :             }
   14425                 :          0 :             row->key_acl_bindings[row->n_acl_bindings] = datum->keys[i].integer;
   14426                 :          0 :             row->value_acl_bindings[row->n_acl_bindings] = valueRow;
   14427                 :          0 :             row->n_acl_bindings++;
   14428                 :            :         }
   14429                 :            :     }
   14430                 :        666 : }
   14431                 :            : 
   14432                 :            : static void
   14433                 :        666 : vteprec_physical_port_parse_description(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14434                 :            : {
   14435                 :        666 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14436                 :            : 
   14437         [ -  + ]:        666 :     ovs_assert(inited);
   14438         [ +  - ]:        666 :     if (datum->n >= 1) {
   14439                 :        666 :         row->description = datum->keys[0].string;
   14440                 :            :     } else {
   14441                 :          0 :         row->description = "";
   14442                 :            :     }
   14443                 :        666 : }
   14444                 :            : 
   14445                 :            : static void
   14446                 :        695 : vteprec_physical_port_parse_name(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14447                 :            : {
   14448                 :        695 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14449                 :            : 
   14450         [ -  + ]:        695 :     ovs_assert(inited);
   14451         [ +  - ]:        695 :     if (datum->n >= 1) {
   14452                 :        695 :         row->name = datum->keys[0].string;
   14453                 :            :     } else {
   14454                 :          0 :         row->name = "";
   14455                 :            :     }
   14456                 :        695 : }
   14457                 :            : 
   14458                 :            : static void
   14459                 :        666 : vteprec_physical_port_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14460                 :            : {
   14461                 :        666 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14462                 :            :     size_t i;
   14463                 :            : 
   14464         [ -  + ]:        666 :     ovs_assert(inited);
   14465                 :        666 :     smap_init(&row->other_config);
   14466         [ -  + ]:        666 :     for (i = 0; i < datum->n; i++) {
   14467                 :          0 :         smap_add(&row->other_config,
   14468                 :          0 :                  datum->keys[i].string,
   14469                 :          0 :                  datum->values[i].string);
   14470                 :            :     }
   14471                 :        666 : }
   14472                 :            : 
   14473                 :            : static void
   14474                 :        666 : vteprec_physical_port_parse_port_fault_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14475                 :            : {
   14476                 :        666 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14477                 :            :     size_t i;
   14478                 :            : 
   14479         [ -  + ]:        666 :     ovs_assert(inited);
   14480                 :        666 :     row->port_fault_status = NULL;
   14481                 :        666 :     row->n_port_fault_status = 0;
   14482         [ -  + ]:        666 :     for (i = 0; i < datum->n; i++) {
   14483         [ #  # ]:          0 :         if (!row->n_port_fault_status) {
   14484                 :          0 :             row->port_fault_status = xmalloc(datum->n * sizeof *row->port_fault_status);
   14485                 :            :         }
   14486                 :          0 :         row->port_fault_status[row->n_port_fault_status] = datum->keys[i].string;
   14487                 :          0 :         row->n_port_fault_status++;
   14488                 :            :     }
   14489                 :        666 : }
   14490                 :            : 
   14491                 :            : static void
   14492                 :        691 : vteprec_physical_port_parse_vlan_bindings(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14493                 :            : {
   14494                 :        691 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14495                 :            :     size_t i;
   14496                 :            : 
   14497         [ -  + ]:        691 :     ovs_assert(inited);
   14498                 :        691 :     row->key_vlan_bindings = NULL;
   14499                 :        691 :     row->value_vlan_bindings = NULL;
   14500                 :        691 :     row->n_vlan_bindings = 0;
   14501         [ +  + ]:       1150 :     for (i = 0; i < datum->n; i++) {
   14502                 :        459 :         struct vteprec_logical_switch *valueRow = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->values[i].uuid));
   14503         [ +  + ]:        459 :         if (valueRow) {
   14504         [ +  + ]:        275 :             if (!row->n_vlan_bindings) {
   14505                 :        218 :                 row->key_vlan_bindings = xmalloc(datum->n * sizeof *row->key_vlan_bindings);
   14506                 :        218 :                 row->value_vlan_bindings = xmalloc(datum->n * sizeof *row->value_vlan_bindings);
   14507                 :            :             }
   14508                 :        275 :             row->key_vlan_bindings[row->n_vlan_bindings] = datum->keys[i].integer;
   14509                 :        275 :             row->value_vlan_bindings[row->n_vlan_bindings] = valueRow;
   14510                 :        275 :             row->n_vlan_bindings++;
   14511                 :            :         }
   14512                 :            :     }
   14513                 :        691 : }
   14514                 :            : 
   14515                 :            : static void
   14516                 :        675 : vteprec_physical_port_parse_vlan_stats(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   14517                 :            : {
   14518                 :        675 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14519                 :            :     size_t i;
   14520                 :            : 
   14521         [ -  + ]:        675 :     ovs_assert(inited);
   14522                 :        675 :     row->key_vlan_stats = NULL;
   14523                 :        675 :     row->value_vlan_stats = NULL;
   14524                 :        675 :     row->n_vlan_stats = 0;
   14525         [ +  + ]:        769 :     for (i = 0; i < datum->n; i++) {
   14526                 :         94 :         struct vteprec_logical_binding_stats *valueRow = vteprec_logical_binding_stats_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_BINDING_STATS], &datum->values[i].uuid));
   14527         [ +  + ]:         94 :         if (valueRow) {
   14528         [ +  + ]:         81 :             if (!row->n_vlan_stats) {
   14529                 :         62 :                 row->key_vlan_stats = xmalloc(datum->n * sizeof *row->key_vlan_stats);
   14530                 :         62 :                 row->value_vlan_stats = xmalloc(datum->n * sizeof *row->value_vlan_stats);
   14531                 :            :             }
   14532                 :         81 :             row->key_vlan_stats[row->n_vlan_stats] = datum->keys[i].integer;
   14533                 :         81 :             row->value_vlan_stats[row->n_vlan_stats] = valueRow;
   14534                 :         81 :             row->n_vlan_stats++;
   14535                 :            :         }
   14536                 :            :     }
   14537                 :        675 : }
   14538                 :            : 
   14539                 :            : static void
   14540                 :        695 : vteprec_physical_port_unparse_acl_bindings(struct ovsdb_idl_row *row_)
   14541                 :            : {
   14542                 :        695 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14543                 :            : 
   14544         [ -  + ]:        695 :     ovs_assert(inited);
   14545                 :        695 :     free(row->key_acl_bindings);
   14546                 :        695 :     free(row->value_acl_bindings);
   14547                 :        695 : }
   14548                 :            : 
   14549                 :            : static void
   14550                 :        695 : vteprec_physical_port_unparse_description(struct ovsdb_idl_row *row OVS_UNUSED)
   14551                 :            : {
   14552                 :            :     /* Nothing to do. */
   14553                 :        695 : }
   14554                 :            : 
   14555                 :            : static void
   14556                 :        724 : vteprec_physical_port_unparse_name(struct ovsdb_idl_row *row OVS_UNUSED)
   14557                 :            : {
   14558                 :            :     /* Nothing to do. */
   14559                 :        724 : }
   14560                 :            : 
   14561                 :            : static void
   14562                 :        695 : vteprec_physical_port_unparse_other_config(struct ovsdb_idl_row *row_)
   14563                 :            : {
   14564                 :        695 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14565                 :            : 
   14566         [ -  + ]:        695 :     ovs_assert(inited);
   14567                 :        695 :     smap_destroy(&row->other_config);
   14568                 :        695 : }
   14569                 :            : 
   14570                 :            : static void
   14571                 :        695 : vteprec_physical_port_unparse_port_fault_status(struct ovsdb_idl_row *row_)
   14572                 :            : {
   14573                 :        695 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14574                 :            : 
   14575         [ -  + ]:        695 :     ovs_assert(inited);
   14576                 :        695 :     free(row->port_fault_status);
   14577                 :        695 : }
   14578                 :            : 
   14579                 :            : static void
   14580                 :        720 : vteprec_physical_port_unparse_vlan_bindings(struct ovsdb_idl_row *row_)
   14581                 :            : {
   14582                 :        720 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14583                 :            : 
   14584         [ -  + ]:        720 :     ovs_assert(inited);
   14585                 :        720 :     free(row->key_vlan_bindings);
   14586                 :        720 :     free(row->value_vlan_bindings);
   14587                 :        720 : }
   14588                 :            : 
   14589                 :            : static void
   14590                 :        704 : vteprec_physical_port_unparse_vlan_stats(struct ovsdb_idl_row *row_)
   14591                 :            : {
   14592                 :        704 :     struct vteprec_physical_port *row = vteprec_physical_port_cast(row_);
   14593                 :            : 
   14594         [ -  + ]:        704 :     ovs_assert(inited);
   14595                 :        704 :     free(row->key_vlan_stats);
   14596                 :        704 :     free(row->value_vlan_stats);
   14597                 :        704 : }
   14598                 :            : 
   14599                 :            : static void
   14600                 :        450 : vteprec_physical_port_init__(struct ovsdb_idl_row *row)
   14601                 :            : {
   14602                 :        450 :     vteprec_physical_port_init(vteprec_physical_port_cast(row));
   14603                 :        450 : }
   14604                 :            : 
   14605                 :            : /* Clears the contents of 'row' in table "Physical_Port". */
   14606                 :            : void
   14607                 :        450 : vteprec_physical_port_init(struct vteprec_physical_port *row)
   14608                 :            : {
   14609                 :        450 :     memset(row, 0, sizeof *row); 
   14610                 :        450 :     smap_init(&row->other_config);
   14611                 :        450 : }
   14612                 :            : 
   14613                 :            : /* Searches table "Physical_Port" in 'idl' for a row with UUID 'uuid'.  Returns
   14614                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   14615                 :            : const struct vteprec_physical_port *
   14616                 :          0 : vteprec_physical_port_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   14617                 :            : {
   14618                 :          0 :     return vteprec_physical_port_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], uuid));
   14619                 :            : }
   14620                 :            : 
   14621                 :            : /* Returns a row in table "Physical_Port" in 'idl', or a null pointer if that
   14622                 :            :  * table is empty.
   14623                 :            :  *
   14624                 :            :  * Database tables are internally maintained as hash tables, so adding or
   14625                 :            :  * removing rows while traversing the same table can cause some rows to be
   14626                 :            :  * visited twice or not at apply. */
   14627                 :            : const struct vteprec_physical_port *
   14628                 :          0 : vteprec_physical_port_first(const struct ovsdb_idl *idl)
   14629                 :            : {
   14630                 :          0 :     return vteprec_physical_port_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT]));
   14631                 :            : }
   14632                 :            : 
   14633                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   14634                 :            :  * is the last row in its table. */
   14635                 :            : const struct vteprec_physical_port *
   14636                 :          0 : vteprec_physical_port_next(const struct vteprec_physical_port *row)
   14637                 :            : {
   14638                 :          0 :     return vteprec_physical_port_cast(ovsdb_idl_next_row(&row->header_));
   14639                 :            : }
   14640                 :            : 
   14641                 :          0 : unsigned int vteprec_physical_port_get_seqno(const struct ovsdb_idl *idl)
   14642                 :            : {
   14643                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT]);
   14644                 :            : }
   14645                 :            : 
   14646                 :          0 : unsigned int vteprec_physical_port_row_get_seqno(const struct vteprec_physical_port *row, enum ovsdb_idl_change change)
   14647                 :            : {
   14648                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   14649                 :            : }
   14650                 :            : 
   14651                 :            : const struct vteprec_physical_port *
   14652                 :          0 : vteprec_physical_port_track_get_first(const struct ovsdb_idl *idl)
   14653                 :            : {
   14654                 :          0 :     return vteprec_physical_port_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT]));
   14655                 :            : }
   14656                 :            : 
   14657                 :            : const struct vteprec_physical_port
   14658                 :          0 : *vteprec_physical_port_track_get_next(const struct vteprec_physical_port *row)
   14659                 :            : {
   14660                 :          0 :     return vteprec_physical_port_cast(ovsdb_idl_track_get_next(&row->header_));
   14661                 :            : }
   14662                 :            : 
   14663                 :            : 
   14664                 :            : /* Deletes 'row' from table "Physical_Port".  'row' may be freed, so it must not be
   14665                 :            :  * accessed afterward.
   14666                 :            :  *
   14667                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14668                 :            : void
   14669                 :          7 : vteprec_physical_port_delete(const struct vteprec_physical_port *row)
   14670                 :            : {
   14671                 :          7 :     ovsdb_idl_txn_delete(&row->header_);
   14672                 :          7 : }
   14673                 :            : 
   14674                 :            : /* Inserts and returns a new row in the table "Physical_Port" in the database
   14675                 :            :  * with open transaction 'txn'.
   14676                 :            :  *
   14677                 :            :  * The new row is assigned a randomly generated provisional UUID.
   14678                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   14679                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   14680                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   14681                 :            : struct vteprec_physical_port *
   14682                 :         29 : vteprec_physical_port_insert(struct ovsdb_idl_txn *txn)
   14683                 :            : {
   14684                 :         29 :     return vteprec_physical_port_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], NULL));
   14685                 :            : }
   14686                 :            : 
   14687                 :            : bool
   14688                 :          0 : vteprec_physical_port_is_updated(const struct vteprec_physical_port *row, enum vteprec_physical_port_column_id column)
   14689                 :            : {
   14690                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_physical_port_columns[column]);
   14691                 :            : }
   14692                 :            : 
   14693                 :            : /* Causes the original contents of column "acl_bindings" in 'row' to be
   14694                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14695                 :            :  * "acl_bindings" in 'row' changed (or if 'row' was deleted) between the
   14696                 :            :  * time that the IDL originally read its contents and the time that the
   14697                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14698                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14699                 :            :  * change has already been received).
   14700                 :            :  *
   14701                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14702                 :            :  * reads, an application should call this function any time "acl_bindings" is
   14703                 :            :  * read as part of a read-modify-write operation.
   14704                 :            :  *
   14705                 :            :  * In some cases this function reduces to a no-op, because the current value
   14706                 :            :  * of "acl_bindings" is already known:
   14707                 :            :  *
   14708                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14709                 :            :  *     vteprec_physical_port_insert()).
   14710                 :            :  *
   14711                 :            :  *   - If "acl_bindings" has already been modified (with
   14712                 :            :  *     vteprec_physical_port_set_acl_bindings()) within the current transaction.
   14713                 :            :  *
   14714                 :            :  * Because of the latter property, always call this function *before*
   14715                 :            :  * vteprec_physical_port_set_acl_bindings() for a given read-modify-write.
   14716                 :            :  *
   14717                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14718                 :            : void
   14719                 :          0 : vteprec_physical_port_verify_acl_bindings(const struct vteprec_physical_port *row)
   14720                 :            : {
   14721         [ #  # ]:          0 :     ovs_assert(inited);
   14722                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS]);
   14723                 :          0 : }
   14724                 :            : 
   14725                 :            : /* Causes the original contents of column "description" in 'row' to be
   14726                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14727                 :            :  * "description" in 'row' changed (or if 'row' was deleted) between the
   14728                 :            :  * time that the IDL originally read its contents and the time that the
   14729                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14730                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14731                 :            :  * change has already been received).
   14732                 :            :  *
   14733                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14734                 :            :  * reads, an application should call this function any time "description" is
   14735                 :            :  * read as part of a read-modify-write operation.
   14736                 :            :  *
   14737                 :            :  * In some cases this function reduces to a no-op, because the current value
   14738                 :            :  * of "description" is already known:
   14739                 :            :  *
   14740                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14741                 :            :  *     vteprec_physical_port_insert()).
   14742                 :            :  *
   14743                 :            :  *   - If "description" has already been modified (with
   14744                 :            :  *     vteprec_physical_port_set_description()) within the current transaction.
   14745                 :            :  *
   14746                 :            :  * Because of the latter property, always call this function *before*
   14747                 :            :  * vteprec_physical_port_set_description() for a given read-modify-write.
   14748                 :            :  *
   14749                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14750                 :            : void
   14751                 :          0 : vteprec_physical_port_verify_description(const struct vteprec_physical_port *row)
   14752                 :            : {
   14753         [ #  # ]:          0 :     ovs_assert(inited);
   14754                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION]);
   14755                 :          0 : }
   14756                 :            : 
   14757                 :            : /* Causes the original contents of column "name" in 'row' to be
   14758                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14759                 :            :  * "name" in 'row' changed (or if 'row' was deleted) between the
   14760                 :            :  * time that the IDL originally read its contents and the time that the
   14761                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14762                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14763                 :            :  * change has already been received).
   14764                 :            :  *
   14765                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14766                 :            :  * reads, an application should call this function any time "name" is
   14767                 :            :  * read as part of a read-modify-write operation.
   14768                 :            :  *
   14769                 :            :  * In some cases this function reduces to a no-op, because the current value
   14770                 :            :  * of "name" is already known:
   14771                 :            :  *
   14772                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14773                 :            :  *     vteprec_physical_port_insert()).
   14774                 :            :  *
   14775                 :            :  *   - If "name" has already been modified (with
   14776                 :            :  *     vteprec_physical_port_set_name()) within the current transaction.
   14777                 :            :  *
   14778                 :            :  * Because of the latter property, always call this function *before*
   14779                 :            :  * vteprec_physical_port_set_name() for a given read-modify-write.
   14780                 :            :  *
   14781                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14782                 :            : void
   14783                 :          0 : vteprec_physical_port_verify_name(const struct vteprec_physical_port *row)
   14784                 :            : {
   14785         [ #  # ]:          0 :     ovs_assert(inited);
   14786                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_NAME]);
   14787                 :          0 : }
   14788                 :            : 
   14789                 :            : /* Causes the original contents of column "other_config" in 'row' to be
   14790                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14791                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
   14792                 :            :  * time that the IDL originally read its contents and the time that the
   14793                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14794                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14795                 :            :  * change has already been received).
   14796                 :            :  *
   14797                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14798                 :            :  * reads, an application should call this function any time "other_config" is
   14799                 :            :  * read as part of a read-modify-write operation.
   14800                 :            :  *
   14801                 :            :  * In some cases this function reduces to a no-op, because the current value
   14802                 :            :  * of "other_config" is already known:
   14803                 :            :  *
   14804                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14805                 :            :  *     vteprec_physical_port_insert()).
   14806                 :            :  *
   14807                 :            :  *   - If "other_config" has already been modified (with
   14808                 :            :  *     vteprec_physical_port_set_other_config()) within the current transaction.
   14809                 :            :  *
   14810                 :            :  * Because of the latter property, always call this function *before*
   14811                 :            :  * vteprec_physical_port_set_other_config() for a given read-modify-write.
   14812                 :            :  *
   14813                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14814                 :            : void
   14815                 :          0 : vteprec_physical_port_verify_other_config(const struct vteprec_physical_port *row)
   14816                 :            : {
   14817         [ #  # ]:          0 :     ovs_assert(inited);
   14818                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG]);
   14819                 :          0 : }
   14820                 :            : 
   14821                 :            : /* Causes the original contents of column "port_fault_status" in 'row' to be
   14822                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14823                 :            :  * "port_fault_status" in 'row' changed (or if 'row' was deleted) between the
   14824                 :            :  * time that the IDL originally read its contents and the time that the
   14825                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14826                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14827                 :            :  * change has already been received).
   14828                 :            :  *
   14829                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14830                 :            :  * reads, an application should call this function any time "port_fault_status" is
   14831                 :            :  * read as part of a read-modify-write operation.
   14832                 :            :  *
   14833                 :            :  * In some cases this function reduces to a no-op, because the current value
   14834                 :            :  * of "port_fault_status" is already known:
   14835                 :            :  *
   14836                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14837                 :            :  *     vteprec_physical_port_insert()).
   14838                 :            :  *
   14839                 :            :  *   - If "port_fault_status" has already been modified (with
   14840                 :            :  *     vteprec_physical_port_set_port_fault_status()) within the current transaction.
   14841                 :            :  *
   14842                 :            :  * Because of the latter property, always call this function *before*
   14843                 :            :  * vteprec_physical_port_set_port_fault_status() for a given read-modify-write.
   14844                 :            :  *
   14845                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14846                 :            : void
   14847                 :          0 : vteprec_physical_port_verify_port_fault_status(const struct vteprec_physical_port *row)
   14848                 :            : {
   14849         [ #  # ]:          0 :     ovs_assert(inited);
   14850                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS]);
   14851                 :          0 : }
   14852                 :            : 
   14853                 :            : /* Causes the original contents of column "vlan_bindings" in 'row' to be
   14854                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14855                 :            :  * "vlan_bindings" in 'row' changed (or if 'row' was deleted) between the
   14856                 :            :  * time that the IDL originally read its contents and the time that the
   14857                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14858                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14859                 :            :  * change has already been received).
   14860                 :            :  *
   14861                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14862                 :            :  * reads, an application should call this function any time "vlan_bindings" is
   14863                 :            :  * read as part of a read-modify-write operation.
   14864                 :            :  *
   14865                 :            :  * In some cases this function reduces to a no-op, because the current value
   14866                 :            :  * of "vlan_bindings" is already known:
   14867                 :            :  *
   14868                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14869                 :            :  *     vteprec_physical_port_insert()).
   14870                 :            :  *
   14871                 :            :  *   - If "vlan_bindings" has already been modified (with
   14872                 :            :  *     vteprec_physical_port_set_vlan_bindings()) within the current transaction.
   14873                 :            :  *
   14874                 :            :  * Because of the latter property, always call this function *before*
   14875                 :            :  * vteprec_physical_port_set_vlan_bindings() for a given read-modify-write.
   14876                 :            :  *
   14877                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14878                 :            : void
   14879                 :          0 : vteprec_physical_port_verify_vlan_bindings(const struct vteprec_physical_port *row)
   14880                 :            : {
   14881         [ #  # ]:          0 :     ovs_assert(inited);
   14882                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS]);
   14883                 :          0 : }
   14884                 :            : 
   14885                 :            : /* Causes the original contents of column "vlan_stats" in 'row' to be
   14886                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   14887                 :            :  * "vlan_stats" in 'row' changed (or if 'row' was deleted) between the
   14888                 :            :  * time that the IDL originally read its contents and the time that the
   14889                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   14890                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   14891                 :            :  * change has already been received).
   14892                 :            :  *
   14893                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   14894                 :            :  * reads, an application should call this function any time "vlan_stats" is
   14895                 :            :  * read as part of a read-modify-write operation.
   14896                 :            :  *
   14897                 :            :  * In some cases this function reduces to a no-op, because the current value
   14898                 :            :  * of "vlan_stats" is already known:
   14899                 :            :  *
   14900                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   14901                 :            :  *     vteprec_physical_port_insert()).
   14902                 :            :  *
   14903                 :            :  *   - If "vlan_stats" has already been modified (with
   14904                 :            :  *     vteprec_physical_port_set_vlan_stats()) within the current transaction.
   14905                 :            :  *
   14906                 :            :  * Because of the latter property, always call this function *before*
   14907                 :            :  * vteprec_physical_port_set_vlan_stats() for a given read-modify-write.
   14908                 :            :  *
   14909                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   14910                 :            : void
   14911                 :          0 : vteprec_physical_port_verify_vlan_stats(const struct vteprec_physical_port *row)
   14912                 :            : {
   14913         [ #  # ]:          0 :     ovs_assert(inited);
   14914                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS]);
   14915                 :          0 : }
   14916                 :            : 
   14917                 :            : /* Returns the "acl_bindings" column's value from the "Physical_Port" table in 'row'
   14918                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   14919                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   14920                 :            :  * for a given key than implementing the same operation on the "cooked"
   14921                 :            :  * form in 'row'.
   14922                 :            :  *
   14923                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   14924                 :            :  * 'value_type' must be OVSDB_TYPE_UUID.
   14925                 :            :  * (This helps to avoid silent bugs if someone changes acl_bindings's
   14926                 :            :  * type without updating the caller.)
   14927                 :            :  *
   14928                 :            :  * The caller must not modify or free the returned value.
   14929                 :            :  *
   14930                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   14931                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   14932                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   14933                 :            :  * of it with ovsdb_datum_clone().
   14934                 :            :  *
   14935                 :            :  * This function is rarely useful, since it is easier to access the value
   14936                 :            :  * directly through the "acl_bindings" member in vteprec_physical_port. */
   14937                 :            : const struct ovsdb_datum *
   14938                 :          0 : vteprec_physical_port_get_acl_bindings(const struct vteprec_physical_port *row,
   14939                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   14940                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   14941                 :            : {
   14942         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   14943         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_UUID);
   14944                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_acl_bindings);
   14945                 :            : }
   14946                 :            : 
   14947                 :            : /* Returns the "description" column's value from the "Physical_Port" table in 'row'
   14948                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   14949                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   14950                 :            :  * for a given key than implementing the same operation on the "cooked"
   14951                 :            :  * form in 'row'.
   14952                 :            :  *
   14953                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   14954                 :            :  * (This helps to avoid silent bugs if someone changes description's
   14955                 :            :  * type without updating the caller.)
   14956                 :            :  *
   14957                 :            :  * The caller must not modify or free the returned value.
   14958                 :            :  *
   14959                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   14960                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   14961                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   14962                 :            :  * of it with ovsdb_datum_clone().
   14963                 :            :  *
   14964                 :            :  * This function is rarely useful, since it is easier to access the value
   14965                 :            :  * directly through the "description" member in vteprec_physical_port. */
   14966                 :            : const struct ovsdb_datum *
   14967                 :          0 : vteprec_physical_port_get_description(const struct vteprec_physical_port *row,
   14968                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   14969                 :            : {
   14970         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   14971                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_description);
   14972                 :            : }
   14973                 :            : 
   14974                 :            : /* Returns the "name" column's value from the "Physical_Port" table in 'row'
   14975                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   14976                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   14977                 :            :  * for a given key than implementing the same operation on the "cooked"
   14978                 :            :  * form in 'row'.
   14979                 :            :  *
   14980                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   14981                 :            :  * (This helps to avoid silent bugs if someone changes name's
   14982                 :            :  * type without updating the caller.)
   14983                 :            :  *
   14984                 :            :  * The caller must not modify or free the returned value.
   14985                 :            :  *
   14986                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   14987                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   14988                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   14989                 :            :  * of it with ovsdb_datum_clone().
   14990                 :            :  *
   14991                 :            :  * This function is rarely useful, since it is easier to access the value
   14992                 :            :  * directly through the "name" member in vteprec_physical_port. */
   14993                 :            : const struct ovsdb_datum *
   14994                 :          0 : vteprec_physical_port_get_name(const struct vteprec_physical_port *row,
   14995                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   14996                 :            : {
   14997         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   14998                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_name);
   14999                 :            : }
   15000                 :            : 
   15001                 :            : /* Returns the "other_config" column's value from the "Physical_Port" table in 'row'
   15002                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   15003                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   15004                 :            :  * for a given key than implementing the same operation on the "cooked"
   15005                 :            :  * form in 'row'.
   15006                 :            :  *
   15007                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   15008                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   15009                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
   15010                 :            :  * type without updating the caller.)
   15011                 :            :  *
   15012                 :            :  * The caller must not modify or free the returned value.
   15013                 :            :  *
   15014                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   15015                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   15016                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   15017                 :            :  * of it with ovsdb_datum_clone().
   15018                 :            :  *
   15019                 :            :  * This function is rarely useful, since it is easier to access the value
   15020                 :            :  * directly through the "other_config" member in vteprec_physical_port. */
   15021                 :            : const struct ovsdb_datum *
   15022                 :          0 : vteprec_physical_port_get_other_config(const struct vteprec_physical_port *row,
   15023                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   15024                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   15025                 :            : {
   15026         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   15027         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   15028                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_other_config);
   15029                 :            : }
   15030                 :            : 
   15031                 :            : /* Returns the "port_fault_status" column's value from the "Physical_Port" table in 'row'
   15032                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   15033                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   15034                 :            :  * for a given key than implementing the same operation on the "cooked"
   15035                 :            :  * form in 'row'.
   15036                 :            :  *
   15037                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   15038                 :            :  * (This helps to avoid silent bugs if someone changes port_fault_status's
   15039                 :            :  * type without updating the caller.)
   15040                 :            :  *
   15041                 :            :  * The caller must not modify or free the returned value.
   15042                 :            :  *
   15043                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   15044                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   15045                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   15046                 :            :  * of it with ovsdb_datum_clone().
   15047                 :            :  *
   15048                 :            :  * This function is rarely useful, since it is easier to access the value
   15049                 :            :  * directly through the "port_fault_status" member in vteprec_physical_port. */
   15050                 :            : const struct ovsdb_datum *
   15051                 :          0 : vteprec_physical_port_get_port_fault_status(const struct vteprec_physical_port *row,
   15052                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   15053                 :            : {
   15054         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   15055                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_port_fault_status);
   15056                 :            : }
   15057                 :            : 
   15058                 :            : /* Returns the "vlan_bindings" column's value from the "Physical_Port" table in 'row'
   15059                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   15060                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   15061                 :            :  * for a given key than implementing the same operation on the "cooked"
   15062                 :            :  * form in 'row'.
   15063                 :            :  *
   15064                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   15065                 :            :  * 'value_type' must be OVSDB_TYPE_UUID.
   15066                 :            :  * (This helps to avoid silent bugs if someone changes vlan_bindings's
   15067                 :            :  * type without updating the caller.)
   15068                 :            :  *
   15069                 :            :  * The caller must not modify or free the returned value.
   15070                 :            :  *
   15071                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   15072                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   15073                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   15074                 :            :  * of it with ovsdb_datum_clone().
   15075                 :            :  *
   15076                 :            :  * This function is rarely useful, since it is easier to access the value
   15077                 :            :  * directly through the "vlan_bindings" member in vteprec_physical_port. */
   15078                 :            : const struct ovsdb_datum *
   15079                 :          0 : vteprec_physical_port_get_vlan_bindings(const struct vteprec_physical_port *row,
   15080                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   15081                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   15082                 :            : {
   15083         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   15084         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_UUID);
   15085                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_vlan_bindings);
   15086                 :            : }
   15087                 :            : 
   15088                 :            : /* Returns the "vlan_stats" column's value from the "Physical_Port" table in 'row'
   15089                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   15090                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   15091                 :            :  * for a given key than implementing the same operation on the "cooked"
   15092                 :            :  * form in 'row'.
   15093                 :            :  *
   15094                 :            :  * 'key_type' must be OVSDB_TYPE_INTEGER.
   15095                 :            :  * 'value_type' must be OVSDB_TYPE_UUID.
   15096                 :            :  * (This helps to avoid silent bugs if someone changes vlan_stats's
   15097                 :            :  * type without updating the caller.)
   15098                 :            :  *
   15099                 :            :  * The caller must not modify or free the returned value.
   15100                 :            :  *
   15101                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   15102                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   15103                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   15104                 :            :  * of it with ovsdb_datum_clone().
   15105                 :            :  *
   15106                 :            :  * This function is rarely useful, since it is easier to access the value
   15107                 :            :  * directly through the "vlan_stats" member in vteprec_physical_port. */
   15108                 :            : const struct ovsdb_datum *
   15109                 :          0 : vteprec_physical_port_get_vlan_stats(const struct vteprec_physical_port *row,
   15110                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   15111                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   15112                 :            : {
   15113         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_INTEGER);
   15114         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_UUID);
   15115                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_port_col_vlan_stats);
   15116                 :            : }
   15117                 :            : 
   15118                 :            : /* Sets the "acl_bindings" column from the "Physical_Port" table in 'row' to
   15119                 :            :  * the map with keys 'key_acl_bindings' and values 'value_acl_bindings'
   15120                 :            :  * with 'n_acl_bindings' entries.
   15121                 :            :  *
   15122                 :            :  * Argument constraints: key in range 0 to 4,095
   15123                 :            :  *
   15124                 :            :  * The caller retains ownership of the arguments. */
   15125                 :            : void
   15126                 :          0 : vteprec_physical_port_set_acl_bindings(const struct vteprec_physical_port *row, const int64_t *key_acl_bindings, struct vteprec_acl **value_acl_bindings, size_t n_acl_bindings)
   15127                 :            : {
   15128                 :            :     struct ovsdb_datum datum;
   15129                 :            :     size_t i;
   15130                 :            : 
   15131         [ #  # ]:          0 :     ovs_assert(inited);
   15132                 :          0 :     datum.n = n_acl_bindings;
   15133         [ #  # ]:          0 :     datum.keys = n_acl_bindings ? xmalloc(n_acl_bindings * sizeof *datum.keys) : NULL;
   15134                 :          0 :     datum.values = xmalloc(n_acl_bindings * sizeof *datum.values);
   15135         [ #  # ]:          0 :     for (i = 0; i < n_acl_bindings; i++) {
   15136                 :          0 :         datum.keys[i].integer = key_acl_bindings[i];
   15137                 :          0 :         datum.values[i].uuid = value_acl_bindings[i]->header_.uuid;
   15138                 :            :     }
   15139                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15140                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS], &datum);
   15141                 :          0 : }
   15142                 :            : 
   15143                 :            : /* Sets the "description" column from the "Physical_Port" table in 'row' to
   15144                 :            :  * 'description'.
   15145                 :            :  *
   15146                 :            :  * The caller retains ownership of the arguments. */
   15147                 :            : void
   15148                 :          0 : vteprec_physical_port_set_description(const struct vteprec_physical_port *row, const char *description)
   15149                 :            : {
   15150                 :            :     struct ovsdb_datum datum;
   15151                 :            :     union ovsdb_atom key;
   15152                 :            : 
   15153         [ #  # ]:          0 :     ovs_assert(inited);
   15154                 :          0 :     datum.n = 1;
   15155                 :          0 :     datum.keys = &key;
   15156                 :          0 :     key.string = CONST_CAST(char *, description);
   15157                 :          0 :     datum.values = NULL;
   15158                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION], &datum);
   15159                 :          0 : }
   15160                 :            : 
   15161                 :            : /* Sets the "name" column from the "Physical_Port" table in 'row' to
   15162                 :            :  * 'name'.
   15163                 :            :  *
   15164                 :            :  * The caller retains ownership of the arguments. */
   15165                 :            : void
   15166                 :         29 : vteprec_physical_port_set_name(const struct vteprec_physical_port *row, const char *name)
   15167                 :            : {
   15168                 :            :     struct ovsdb_datum datum;
   15169                 :            :     union ovsdb_atom key;
   15170                 :            : 
   15171         [ -  + ]:         29 :     ovs_assert(inited);
   15172                 :         29 :     datum.n = 1;
   15173                 :         29 :     datum.keys = &key;
   15174                 :         29 :     key.string = CONST_CAST(char *, name);
   15175                 :         29 :     datum.values = NULL;
   15176                 :         29 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_NAME], &datum);
   15177                 :         29 : }
   15178                 :            : 
   15179                 :            : /* Sets the "other_config" column's value from the "Physical_Port" table in 'row'
   15180                 :            :  * to 'other_config'.
   15181                 :            :  *
   15182                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   15183                 :            : void
   15184                 :          0 : vteprec_physical_port_set_other_config(const struct vteprec_physical_port *row, const struct smap *other_config)
   15185                 :            : {
   15186                 :            :     struct ovsdb_datum datum;
   15187                 :            : 
   15188         [ #  # ]:          0 :     ovs_assert(inited);
   15189         [ #  # ]:          0 :     if (other_config) {
   15190                 :            :         struct smap_node *node;
   15191                 :            :         size_t i;
   15192                 :            : 
   15193                 :          0 :         datum.n = smap_count(other_config);
   15194                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   15195                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   15196                 :            : 
   15197                 :          0 :         i = 0;
   15198 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   15199                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   15200                 :          0 :             datum.values[i].string = xstrdup(node->value);
   15201                 :          0 :             i++;
   15202                 :            :         }
   15203                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   15204                 :            :     } else {
   15205                 :          0 :         ovsdb_datum_init_empty(&datum);
   15206                 :            :     }
   15207                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   15208                 :            :                         &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG],
   15209                 :            :                         &datum);
   15210                 :          0 : }
   15211                 :            : 
   15212                 :            : 
   15213                 :            : /* Sets the "port_fault_status" column from the "Physical_Port" table in 'row' to
   15214                 :            :  * the 'port_fault_status' set with 'n_port_fault_status' entries.
   15215                 :            :  *
   15216                 :            :  * The caller retains ownership of the arguments. */
   15217                 :            : void
   15218                 :          0 : vteprec_physical_port_set_port_fault_status(const struct vteprec_physical_port *row, const char **port_fault_status, size_t n_port_fault_status)
   15219                 :            : {
   15220                 :            :     struct ovsdb_datum datum;
   15221                 :            :     size_t i;
   15222                 :            : 
   15223         [ #  # ]:          0 :     ovs_assert(inited);
   15224                 :          0 :     datum.n = n_port_fault_status;
   15225         [ #  # ]:          0 :     datum.keys = n_port_fault_status ? xmalloc(n_port_fault_status * sizeof *datum.keys) : NULL;
   15226                 :          0 :     datum.values = NULL;
   15227         [ #  # ]:          0 :     for (i = 0; i < n_port_fault_status; i++) {
   15228                 :          0 :         datum.keys[i].string = xstrdup(port_fault_status[i]);
   15229                 :            :     }
   15230                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   15231                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS], &datum);
   15232                 :          0 : }
   15233                 :            : 
   15234                 :            : /* Sets the "vlan_bindings" column from the "Physical_Port" table in 'row' to
   15235                 :            :  * the map with keys 'key_vlan_bindings' and values 'value_vlan_bindings'
   15236                 :            :  * with 'n_vlan_bindings' entries.
   15237                 :            :  *
   15238                 :            :  * Argument constraints: key in range 0 to 4,095
   15239                 :            :  *
   15240                 :            :  * The caller retains ownership of the arguments. */
   15241                 :            : void
   15242                 :         25 : vteprec_physical_port_set_vlan_bindings(const struct vteprec_physical_port *row, const int64_t *key_vlan_bindings, struct vteprec_logical_switch **value_vlan_bindings, size_t n_vlan_bindings)
   15243                 :            : {
   15244                 :            :     struct ovsdb_datum datum;
   15245                 :            :     size_t i;
   15246                 :            : 
   15247         [ -  + ]:         25 :     ovs_assert(inited);
   15248                 :         25 :     datum.n = n_vlan_bindings;
   15249         [ +  + ]:         25 :     datum.keys = n_vlan_bindings ? xmalloc(n_vlan_bindings * sizeof *datum.keys) : NULL;
   15250                 :         25 :     datum.values = xmalloc(n_vlan_bindings * sizeof *datum.values);
   15251         [ +  + ]:         55 :     for (i = 0; i < n_vlan_bindings; i++) {
   15252                 :         30 :         datum.keys[i].integer = key_vlan_bindings[i];
   15253                 :         30 :         datum.values[i].uuid = value_vlan_bindings[i]->header_.uuid;
   15254                 :            :     }
   15255                 :         25 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15256                 :         25 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS], &datum);
   15257                 :         25 : }
   15258                 :            : 
   15259                 :            : /* Sets the "vlan_stats" column from the "Physical_Port" table in 'row' to
   15260                 :            :  * the map with keys 'key_vlan_stats' and values 'value_vlan_stats'
   15261                 :            :  * with 'n_vlan_stats' entries.
   15262                 :            :  *
   15263                 :            :  * Argument constraints: key in range 0 to 4,095
   15264                 :            :  *
   15265                 :            :  * The caller retains ownership of the arguments. */
   15266                 :            : void
   15267                 :          0 : vteprec_physical_port_set_vlan_stats(const struct vteprec_physical_port *row, const int64_t *key_vlan_stats, struct vteprec_logical_binding_stats **value_vlan_stats, size_t n_vlan_stats)
   15268                 :            : {
   15269                 :            :     struct ovsdb_datum datum;
   15270                 :            :     size_t i;
   15271                 :            : 
   15272         [ #  # ]:          0 :     ovs_assert(inited);
   15273                 :          0 :     datum.n = n_vlan_stats;
   15274         [ #  # ]:          0 :     datum.keys = n_vlan_stats ? xmalloc(n_vlan_stats * sizeof *datum.keys) : NULL;
   15275                 :          0 :     datum.values = xmalloc(n_vlan_stats * sizeof *datum.values);
   15276         [ #  # ]:          0 :     for (i = 0; i < n_vlan_stats; i++) {
   15277                 :          0 :         datum.keys[i].integer = key_vlan_stats[i];
   15278                 :          0 :         datum.values[i].uuid = value_vlan_stats[i]->header_.uuid;
   15279                 :            :     }
   15280                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15281                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS], &datum);
   15282                 :          0 : }
   15283                 :            : 
   15284                 :            : /* Sets an element of the "acl_bindings" map column from the "Physical_Port" table in 'row'
   15285                 :            :  * to 'new_value' given the key value 'new_key'.
   15286                 :            :  *
   15287                 :            :  */
   15288                 :            : void
   15289                 :          0 : vteprec_physical_port_update_acl_bindings_setkey(const struct vteprec_physical_port *row, int64_t new_key, const struct vteprec_acl *new_value)
   15290                 :            : {
   15291                 :            :     struct ovsdb_datum *datum;
   15292                 :            : 
   15293         [ #  # ]:          0 :     ovs_assert(inited);
   15294                 :            : 
   15295                 :          0 :     datum = xmalloc(sizeof *datum);
   15296                 :          0 :     datum->n = 1;
   15297                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15298                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   15299                 :            : 
   15300                 :          0 :     datum->keys[0].integer = new_key;
   15301                 :          0 :     datum->values[0].uuid = new_value->header_.uuid;
   15302                 :            : 
   15303                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   15304                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS],
   15305                 :            :                                     datum);
   15306                 :          0 : }
   15307                 :            : 
   15308                 :            : /* Deletes an element of the "acl_bindings" map column from the "Physical_Port" table in 'row'
   15309                 :            :  * given the key value 'delete_key'.
   15310                 :            :  *
   15311                 :            :  */
   15312                 :            : void
   15313                 :          0 : vteprec_physical_port_update_acl_bindings_delkey(const struct vteprec_physical_port *row, int64_t delete_key)
   15314                 :            : {
   15315                 :            :     struct ovsdb_datum *datum;
   15316                 :            : 
   15317         [ #  # ]:          0 :     ovs_assert(inited);
   15318                 :            : 
   15319                 :          0 :     datum = xmalloc(sizeof *datum);
   15320                 :          0 :     datum->n = 1;
   15321                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15322                 :          0 :     datum->values = NULL;
   15323                 :            : 
   15324                 :          0 :     datum->keys[0].integer = delete_key;
   15325                 :            : 
   15326                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   15327                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS],
   15328                 :            :                                     datum);
   15329                 :          0 : }
   15330                 :            : 
   15331                 :            : /* Sets an element of the "other_config" map column from the "Physical_Port" table in 'row'
   15332                 :            :  * to 'new_value' given the key value 'new_key'.
   15333                 :            :  *
   15334                 :            :  */
   15335                 :            : void
   15336                 :          0 : vteprec_physical_port_update_other_config_setkey(const struct vteprec_physical_port *row, const char *new_key, const char *new_value)
   15337                 :            : {
   15338                 :            :     struct ovsdb_datum *datum;
   15339                 :            : 
   15340         [ #  # ]:          0 :     ovs_assert(inited);
   15341                 :            : 
   15342                 :          0 :     datum = xmalloc(sizeof *datum);
   15343                 :          0 :     datum->n = 1;
   15344                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15345                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   15346                 :            : 
   15347                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   15348                 :          0 :     datum->values[0].string = xstrdup(new_value);
   15349                 :            : 
   15350                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   15351                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG],
   15352                 :            :                                     datum);
   15353                 :          0 : }
   15354                 :            : 
   15355                 :            : /* Deletes an element of the "other_config" map column from the "Physical_Port" table in 'row'
   15356                 :            :  * given the key value 'delete_key'.
   15357                 :            :  *
   15358                 :            :  */
   15359                 :            : void
   15360                 :          0 : vteprec_physical_port_update_other_config_delkey(const struct vteprec_physical_port *row, const char *delete_key)
   15361                 :            : {
   15362                 :            :     struct ovsdb_datum *datum;
   15363                 :            : 
   15364         [ #  # ]:          0 :     ovs_assert(inited);
   15365                 :            : 
   15366                 :          0 :     datum = xmalloc(sizeof *datum);
   15367                 :          0 :     datum->n = 1;
   15368                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15369                 :          0 :     datum->values = NULL;
   15370                 :            : 
   15371                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   15372                 :            : 
   15373                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   15374                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG],
   15375                 :            :                                     datum);
   15376                 :          0 : }
   15377                 :            : 
   15378                 :            : /* Adds the value 'new_value' to the "port_fault_status" set column from the "Physical_Port" table
   15379                 :            :  * in 'row'.
   15380                 :            :  *
   15381                 :            :  */
   15382                 :            : void
   15383                 :          0 : vteprec_physical_port_update_port_fault_status_addvalue(const struct vteprec_physical_port *row, const char *new_value)
   15384                 :            : {
   15385                 :            :     struct ovsdb_datum *datum;
   15386                 :            : 
   15387         [ #  # ]:          0 :     ovs_assert(inited);
   15388                 :            : 
   15389                 :          0 :     datum = xmalloc(sizeof *datum);
   15390                 :          0 :     datum->n = 1;
   15391                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   15392                 :          0 :     datum->values = NULL;
   15393                 :            : 
   15394                 :          0 :     datum->keys[0].string = xstrdup(new_value);
   15395                 :            : 
   15396                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   15397                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS],
   15398                 :            :                                     datum);
   15399                 :          0 : }
   15400                 :            : 
   15401                 :            : /* Deletes the value 'delete_value' from the "port_fault_status" set column from the
   15402                 :            :  * "Physical_Port" table in 'row'.
   15403                 :            :  *
   15404                 :            :  */
   15405                 :            : void
   15406                 :          0 : vteprec_physical_port_update_port_fault_status_delvalue(const struct vteprec_physical_port *row, const char *delete_value)
   15407                 :            : {
   15408                 :            :     struct ovsdb_datum *datum;
   15409                 :            : 
   15410         [ #  # ]:          0 :     ovs_assert(inited);
   15411                 :            : 
   15412                 :          0 :     datum = xmalloc(sizeof *datum);
   15413                 :          0 :     datum->n = 1;
   15414                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   15415                 :          0 :     datum->values = NULL;
   15416                 :            : 
   15417                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
   15418                 :            : 
   15419                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   15420                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS],
   15421                 :            :                                     datum);
   15422                 :          0 : }
   15423                 :            : 
   15424                 :            : /* Sets an element of the "vlan_bindings" map column from the "Physical_Port" table in 'row'
   15425                 :            :  * to 'new_value' given the key value 'new_key'.
   15426                 :            :  *
   15427                 :            :  */
   15428                 :            : void
   15429                 :          0 : vteprec_physical_port_update_vlan_bindings_setkey(const struct vteprec_physical_port *row, int64_t new_key, const struct vteprec_logical_switch *new_value)
   15430                 :            : {
   15431                 :            :     struct ovsdb_datum *datum;
   15432                 :            : 
   15433         [ #  # ]:          0 :     ovs_assert(inited);
   15434                 :            : 
   15435                 :          0 :     datum = xmalloc(sizeof *datum);
   15436                 :          0 :     datum->n = 1;
   15437                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15438                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   15439                 :            : 
   15440                 :          0 :     datum->keys[0].integer = new_key;
   15441                 :          0 :     datum->values[0].uuid = new_value->header_.uuid;
   15442                 :            : 
   15443                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   15444                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS],
   15445                 :            :                                     datum);
   15446                 :          0 : }
   15447                 :            : 
   15448                 :            : /* Deletes an element of the "vlan_bindings" map column from the "Physical_Port" table in 'row'
   15449                 :            :  * given the key value 'delete_key'.
   15450                 :            :  *
   15451                 :            :  */
   15452                 :            : void
   15453                 :          0 : vteprec_physical_port_update_vlan_bindings_delkey(const struct vteprec_physical_port *row, int64_t delete_key)
   15454                 :            : {
   15455                 :            :     struct ovsdb_datum *datum;
   15456                 :            : 
   15457         [ #  # ]:          0 :     ovs_assert(inited);
   15458                 :            : 
   15459                 :          0 :     datum = xmalloc(sizeof *datum);
   15460                 :          0 :     datum->n = 1;
   15461                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15462                 :          0 :     datum->values = NULL;
   15463                 :            : 
   15464                 :          0 :     datum->keys[0].integer = delete_key;
   15465                 :            : 
   15466                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   15467                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS],
   15468                 :            :                                     datum);
   15469                 :          0 : }
   15470                 :            : 
   15471                 :            : /* Sets an element of the "vlan_stats" map column from the "Physical_Port" table in 'row'
   15472                 :            :  * to 'new_value' given the key value 'new_key'.
   15473                 :            :  *
   15474                 :            :  */
   15475                 :            : void
   15476                 :          0 : vteprec_physical_port_update_vlan_stats_setkey(const struct vteprec_physical_port *row, int64_t new_key, const struct vteprec_logical_binding_stats *new_value)
   15477                 :            : {
   15478                 :            :     struct ovsdb_datum *datum;
   15479                 :            : 
   15480         [ #  # ]:          0 :     ovs_assert(inited);
   15481                 :            : 
   15482                 :          0 :     datum = xmalloc(sizeof *datum);
   15483                 :          0 :     datum->n = 1;
   15484                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15485                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   15486                 :            : 
   15487                 :          0 :     datum->keys[0].integer = new_key;
   15488                 :          0 :     datum->values[0].uuid = new_value->header_.uuid;
   15489                 :            : 
   15490                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   15491                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS],
   15492                 :            :                                     datum);
   15493                 :          0 : }
   15494                 :            : 
   15495                 :            : /* Deletes an element of the "vlan_stats" map column from the "Physical_Port" table in 'row'
   15496                 :            :  * given the key value 'delete_key'.
   15497                 :            :  *
   15498                 :            :  */
   15499                 :            : void
   15500                 :          0 : vteprec_physical_port_update_vlan_stats_delkey(const struct vteprec_physical_port *row, int64_t delete_key)
   15501                 :            : {
   15502                 :            :     struct ovsdb_datum *datum;
   15503                 :            : 
   15504         [ #  # ]:          0 :     ovs_assert(inited);
   15505                 :            : 
   15506                 :          0 :     datum = xmalloc(sizeof *datum);
   15507                 :          0 :     datum->n = 1;
   15508                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   15509                 :          0 :     datum->values = NULL;
   15510                 :            : 
   15511                 :          0 :     datum->keys[0].integer = delete_key;
   15512                 :            : 
   15513                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   15514                 :            :                                     &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS],
   15515                 :            :                                     datum);
   15516                 :          0 : }
   15517                 :            : 
   15518                 :            : /* Sets the "acl_bindings" column from the "Physical_Port" table in 'row' to
   15519                 :            :  * the map with keys 'key_acl_bindings' and values 'value_acl_bindings'
   15520                 :            :  * with 'n_acl_bindings' entries.
   15521                 :            :  *
   15522                 :            :  * Argument constraints: key in range 0 to 4,095
   15523                 :            :  *
   15524                 :            :  * The caller retains ownership of the arguments. */
   15525                 :            : void
   15526                 :          0 : vteprec_physical_port_add_clause_acl_bindings(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_acl_bindings, struct uuid **value_acl_bindings, size_t n_acl_bindings)
   15527                 :            : {
   15528                 :            :     struct ovsdb_datum datum;
   15529                 :            :     size_t i;
   15530                 :            : 
   15531         [ #  # ]:          0 :     ovs_assert(inited);
   15532                 :          0 :     datum.n = n_acl_bindings;
   15533         [ #  # ]:          0 :     datum.keys = n_acl_bindings ? xmalloc(n_acl_bindings * sizeof *datum.keys) : NULL;
   15534                 :          0 :     datum.values = xmalloc(n_acl_bindings * sizeof *datum.values);
   15535         [ #  # ]:          0 :     for (i = 0; i < n_acl_bindings; i++) {
   15536                 :          0 :         datum.keys[i].integer = key_acl_bindings[i];
   15537                 :          0 :         datum.values[i].uuid = *value_acl_bindings[i];
   15538                 :            :     }
   15539                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15540                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15541                 :            :                           function,
   15542                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS],
   15543                 :            :                           &datum);
   15544                 :          0 :     free(datum.keys);
   15545                 :          0 :     free(datum.values);
   15546                 :          0 : }
   15547                 :            : 
   15548                 :            : /* Sets the "description" column from the "Physical_Port" table in 'row' to
   15549                 :            :  * 'description'.
   15550                 :            :  *
   15551                 :            :  * The caller retains ownership of the arguments. */
   15552                 :            : void
   15553                 :          0 : vteprec_physical_port_add_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   15554                 :            : {
   15555                 :            :     struct ovsdb_datum datum;
   15556                 :            :     union ovsdb_atom key;
   15557                 :            : 
   15558         [ #  # ]:          0 :     ovs_assert(inited);
   15559                 :          0 :     datum.n = 1;
   15560                 :          0 :     datum.keys = &key;
   15561                 :          0 :     key.string = CONST_CAST(char *, description);
   15562                 :          0 :     datum.values = NULL;
   15563                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15564                 :            :                           function,
   15565                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION],
   15566                 :            :                           &datum);
   15567                 :          0 : }
   15568                 :            : 
   15569                 :            : /* Sets the "name" column from the "Physical_Port" table in 'row' to
   15570                 :            :  * 'name'.
   15571                 :            :  *
   15572                 :            :  * The caller retains ownership of the arguments. */
   15573                 :            : void
   15574                 :          0 : vteprec_physical_port_add_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   15575                 :            : {
   15576                 :            :     struct ovsdb_datum datum;
   15577                 :            :     union ovsdb_atom key;
   15578                 :            : 
   15579         [ #  # ]:          0 :     ovs_assert(inited);
   15580                 :          0 :     datum.n = 1;
   15581                 :          0 :     datum.keys = &key;
   15582                 :          0 :     key.string = CONST_CAST(char *, name);
   15583                 :          0 :     datum.values = NULL;
   15584                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15585                 :            :                           function,
   15586                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_NAME],
   15587                 :            :                           &datum);
   15588                 :          0 : }
   15589                 :            : 
   15590                 :            : /* Sets the "other_config" column's value from the "Physical_Port" table in 'row'
   15591                 :            :  * to 'other_config'.
   15592                 :            :  *
   15593                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   15594                 :            : void
   15595                 :          0 : vteprec_physical_port_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   15596                 :            : {
   15597                 :            :     struct ovsdb_datum datum;
   15598                 :            : 
   15599         [ #  # ]:          0 :     ovs_assert(inited);
   15600         [ #  # ]:          0 :     if (other_config) {
   15601                 :            :         struct smap_node *node;
   15602                 :            :         size_t i;
   15603                 :            : 
   15604                 :          0 :         datum.n = smap_count(other_config);
   15605                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   15606                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   15607                 :            : 
   15608                 :          0 :         i = 0;
   15609 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   15610                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   15611                 :          0 :             datum.values[i].string = xstrdup(node->value);
   15612                 :          0 :             i++;
   15613                 :            :         }
   15614                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   15615                 :            :     } else {
   15616                 :          0 :         ovsdb_datum_init_empty(&datum);
   15617                 :            :     }
   15618                 :            : 
   15619                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   15620                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15621                 :            :                                    function,
   15622                 :            :                                    &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG],
   15623                 :            :                                    &datum);
   15624                 :            : 
   15625                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_physical_port_col_other_config.type);
   15626                 :          0 : }
   15627                 :            : 
   15628                 :            : 
   15629                 :            : /* Sets the "port_fault_status" column from the "Physical_Port" table in 'row' to
   15630                 :            :  * the 'port_fault_status' set with 'n_port_fault_status' entries.
   15631                 :            :  *
   15632                 :            :  * The caller retains ownership of the arguments. */
   15633                 :            : void
   15634                 :          0 : vteprec_physical_port_add_clause_port_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **port_fault_status, size_t n_port_fault_status)
   15635                 :            : {
   15636                 :            :     struct ovsdb_datum datum;
   15637                 :            :     size_t i;
   15638                 :            : 
   15639         [ #  # ]:          0 :     ovs_assert(inited);
   15640                 :          0 :     datum.n = n_port_fault_status;
   15641         [ #  # ]:          0 :     datum.keys = n_port_fault_status ? xmalloc(n_port_fault_status * sizeof *datum.keys) : NULL;
   15642                 :          0 :     datum.values = NULL;
   15643         [ #  # ]:          0 :     for (i = 0; i < n_port_fault_status; i++) {
   15644                 :          0 :         datum.keys[i].string = CONST_CAST(char *, port_fault_status[i]);
   15645                 :            :     }
   15646                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   15647                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15648                 :            :                           function,
   15649                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS],
   15650                 :            :                           &datum);
   15651                 :          0 :     free(datum.keys);
   15652                 :          0 : }
   15653                 :            : 
   15654                 :            : /* Sets the "vlan_bindings" column from the "Physical_Port" table in 'row' to
   15655                 :            :  * the map with keys 'key_vlan_bindings' and values 'value_vlan_bindings'
   15656                 :            :  * with 'n_vlan_bindings' entries.
   15657                 :            :  *
   15658                 :            :  * Argument constraints: key in range 0 to 4,095
   15659                 :            :  *
   15660                 :            :  * The caller retains ownership of the arguments. */
   15661                 :            : void
   15662                 :          0 : vteprec_physical_port_add_clause_vlan_bindings(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_vlan_bindings, struct uuid **value_vlan_bindings, size_t n_vlan_bindings)
   15663                 :            : {
   15664                 :            :     struct ovsdb_datum datum;
   15665                 :            :     size_t i;
   15666                 :            : 
   15667         [ #  # ]:          0 :     ovs_assert(inited);
   15668                 :          0 :     datum.n = n_vlan_bindings;
   15669         [ #  # ]:          0 :     datum.keys = n_vlan_bindings ? xmalloc(n_vlan_bindings * sizeof *datum.keys) : NULL;
   15670                 :          0 :     datum.values = xmalloc(n_vlan_bindings * sizeof *datum.values);
   15671         [ #  # ]:          0 :     for (i = 0; i < n_vlan_bindings; i++) {
   15672                 :          0 :         datum.keys[i].integer = key_vlan_bindings[i];
   15673                 :          0 :         datum.values[i].uuid = *value_vlan_bindings[i];
   15674                 :            :     }
   15675                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15676                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15677                 :            :                           function,
   15678                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS],
   15679                 :            :                           &datum);
   15680                 :          0 :     free(datum.keys);
   15681                 :          0 :     free(datum.values);
   15682                 :          0 : }
   15683                 :            : 
   15684                 :            : /* Sets the "vlan_stats" column from the "Physical_Port" table in 'row' to
   15685                 :            :  * the map with keys 'key_vlan_stats' and values 'value_vlan_stats'
   15686                 :            :  * with 'n_vlan_stats' entries.
   15687                 :            :  *
   15688                 :            :  * Argument constraints: key in range 0 to 4,095
   15689                 :            :  *
   15690                 :            :  * The caller retains ownership of the arguments. */
   15691                 :            : void
   15692                 :          0 : vteprec_physical_port_add_clause_vlan_stats(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_vlan_stats, struct uuid **value_vlan_stats, size_t n_vlan_stats)
   15693                 :            : {
   15694                 :            :     struct ovsdb_datum datum;
   15695                 :            :     size_t i;
   15696                 :            : 
   15697         [ #  # ]:          0 :     ovs_assert(inited);
   15698                 :          0 :     datum.n = n_vlan_stats;
   15699         [ #  # ]:          0 :     datum.keys = n_vlan_stats ? xmalloc(n_vlan_stats * sizeof *datum.keys) : NULL;
   15700                 :          0 :     datum.values = xmalloc(n_vlan_stats * sizeof *datum.values);
   15701         [ #  # ]:          0 :     for (i = 0; i < n_vlan_stats; i++) {
   15702                 :          0 :         datum.keys[i].integer = key_vlan_stats[i];
   15703                 :          0 :         datum.values[i].uuid = *value_vlan_stats[i];
   15704                 :            :     }
   15705                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15706                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15707                 :            :                           function,
   15708                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS],
   15709                 :            :                           &datum);
   15710                 :          0 :     free(datum.keys);
   15711                 :          0 :     free(datum.values);
   15712                 :          0 : }
   15713                 :            : void
   15714                 :          0 : vteprec_physical_port_add_clause_false(struct ovsdb_idl *idl)
   15715                 :            : {
   15716                 :            :     struct ovsdb_datum datum;
   15717                 :            : 
   15718                 :          0 :     ovsdb_datum_init_empty(&datum);
   15719                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], OVSDB_F_FALSE, NULL, &datum);
   15720                 :          0 : }
   15721                 :            : void
   15722                 :          0 : vteprec_physical_port_add_clause_true(struct ovsdb_idl *idl)
   15723                 :            : {
   15724                 :            :     struct ovsdb_datum datum;
   15725                 :            : 
   15726                 :          0 :     ovsdb_datum_init_empty(&datum);
   15727                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], OVSDB_F_TRUE, NULL, &datum);
   15728                 :          0 : }
   15729                 :            : 
   15730                 :            : /* Sets the "acl_bindings" column from the "Physical_Port" table in 'row' to
   15731                 :            :  * the map with keys 'key_acl_bindings' and values 'value_acl_bindings'
   15732                 :            :  * with 'n_acl_bindings' entries.
   15733                 :            :  *
   15734                 :            :  * Argument constraints: key in range 0 to 4,095
   15735                 :            :  *
   15736                 :            :  * The caller retains ownership of the arguments. */
   15737                 :            : void
   15738                 :          0 : vteprec_physical_port_remove_clause_acl_bindings(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_acl_bindings, struct uuid **value_acl_bindings, size_t n_acl_bindings)
   15739                 :            : {
   15740                 :            :     struct ovsdb_datum datum;
   15741                 :            :     size_t i;
   15742                 :            : 
   15743         [ #  # ]:          0 :     ovs_assert(inited);
   15744                 :          0 :     datum.n = n_acl_bindings;
   15745         [ #  # ]:          0 :     datum.keys = n_acl_bindings ? xmalloc(n_acl_bindings * sizeof *datum.keys) : NULL;
   15746                 :          0 :     datum.values = xmalloc(n_acl_bindings * sizeof *datum.values);
   15747         [ #  # ]:          0 :     for (i = 0; i < n_acl_bindings; i++) {
   15748                 :          0 :         datum.keys[i].integer = key_acl_bindings[i];
   15749                 :          0 :         datum.values[i].uuid = *value_acl_bindings[i];
   15750                 :            :     }
   15751                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15752                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15753                 :            :                           function,
   15754                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_ACL_BINDINGS],
   15755                 :            :                           &datum);
   15756                 :          0 :     free(datum.keys);
   15757                 :          0 :     free(datum.values);
   15758                 :          0 : }
   15759                 :            : 
   15760                 :            : /* Sets the "description" column from the "Physical_Port" table in 'row' to
   15761                 :            :  * 'description'.
   15762                 :            :  *
   15763                 :            :  * The caller retains ownership of the arguments. */
   15764                 :            : void
   15765                 :          0 : vteprec_physical_port_remove_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   15766                 :            : {
   15767                 :            :     struct ovsdb_datum datum;
   15768                 :            :     union ovsdb_atom key;
   15769                 :            : 
   15770         [ #  # ]:          0 :     ovs_assert(inited);
   15771                 :          0 :     datum.n = 1;
   15772                 :          0 :     datum.keys = &key;
   15773                 :          0 :     key.string = CONST_CAST(char *, description);
   15774                 :          0 :     datum.values = NULL;
   15775                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15776                 :            :                           function,
   15777                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_DESCRIPTION],
   15778                 :            :                           &datum);
   15779                 :          0 : }
   15780                 :            : 
   15781                 :            : /* Sets the "name" column from the "Physical_Port" table in 'row' to
   15782                 :            :  * 'name'.
   15783                 :            :  *
   15784                 :            :  * The caller retains ownership of the arguments. */
   15785                 :            : void
   15786                 :          0 : vteprec_physical_port_remove_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   15787                 :            : {
   15788                 :            :     struct ovsdb_datum datum;
   15789                 :            :     union ovsdb_atom key;
   15790                 :            : 
   15791         [ #  # ]:          0 :     ovs_assert(inited);
   15792                 :          0 :     datum.n = 1;
   15793                 :          0 :     datum.keys = &key;
   15794                 :          0 :     key.string = CONST_CAST(char *, name);
   15795                 :          0 :     datum.values = NULL;
   15796                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15797                 :            :                           function,
   15798                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_NAME],
   15799                 :            :                           &datum);
   15800                 :          0 : }
   15801                 :            : 
   15802                 :            : /* Sets the "other_config" column's value from the "Physical_Port" table in 'row'
   15803                 :            :  * to 'other_config'.
   15804                 :            :  *
   15805                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   15806                 :            : void
   15807                 :          0 : vteprec_physical_port_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   15808                 :            : {
   15809                 :            :     struct ovsdb_datum datum;
   15810                 :            : 
   15811         [ #  # ]:          0 :     ovs_assert(inited);
   15812         [ #  # ]:          0 :     if (other_config) {
   15813                 :            :         struct smap_node *node;
   15814                 :            :         size_t i;
   15815                 :            : 
   15816                 :          0 :         datum.n = smap_count(other_config);
   15817                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   15818                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   15819                 :            : 
   15820                 :          0 :         i = 0;
   15821 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   15822                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   15823                 :          0 :             datum.values[i].string = xstrdup(node->value);
   15824                 :          0 :             i++;
   15825                 :            :         }
   15826                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   15827                 :            :     } else {
   15828                 :          0 :         ovsdb_datum_init_empty(&datum);
   15829                 :            :     }
   15830                 :            : 
   15831                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15832                 :            :                                       function,
   15833                 :            :                                       &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_OTHER_CONFIG],
   15834                 :            :                                       &datum);
   15835                 :            : 
   15836                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_physical_port_col_other_config.type);
   15837                 :          0 : }
   15838                 :            : 
   15839                 :            : 
   15840                 :            : /* Sets the "port_fault_status" column from the "Physical_Port" table in 'row' to
   15841                 :            :  * the 'port_fault_status' set with 'n_port_fault_status' entries.
   15842                 :            :  *
   15843                 :            :  * The caller retains ownership of the arguments. */
   15844                 :            : void
   15845                 :          0 : vteprec_physical_port_remove_clause_port_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **port_fault_status, size_t n_port_fault_status)
   15846                 :            : {
   15847                 :            :     struct ovsdb_datum datum;
   15848                 :            :     size_t i;
   15849                 :            : 
   15850         [ #  # ]:          0 :     ovs_assert(inited);
   15851                 :          0 :     datum.n = n_port_fault_status;
   15852         [ #  # ]:          0 :     datum.keys = n_port_fault_status ? xmalloc(n_port_fault_status * sizeof *datum.keys) : NULL;
   15853                 :          0 :     datum.values = NULL;
   15854         [ #  # ]:          0 :     for (i = 0; i < n_port_fault_status; i++) {
   15855                 :          0 :         datum.keys[i].string = CONST_CAST(char *, port_fault_status[i]);
   15856                 :            :     }
   15857                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   15858                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15859                 :            :                           function,
   15860                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_PORT_FAULT_STATUS],
   15861                 :            :                           &datum);
   15862                 :          0 :     free(datum.keys);
   15863                 :          0 : }
   15864                 :            : 
   15865                 :            : /* Sets the "vlan_bindings" column from the "Physical_Port" table in 'row' to
   15866                 :            :  * the map with keys 'key_vlan_bindings' and values 'value_vlan_bindings'
   15867                 :            :  * with 'n_vlan_bindings' entries.
   15868                 :            :  *
   15869                 :            :  * Argument constraints: key in range 0 to 4,095
   15870                 :            :  *
   15871                 :            :  * The caller retains ownership of the arguments. */
   15872                 :            : void
   15873                 :          0 : vteprec_physical_port_remove_clause_vlan_bindings(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_vlan_bindings, struct uuid **value_vlan_bindings, size_t n_vlan_bindings)
   15874                 :            : {
   15875                 :            :     struct ovsdb_datum datum;
   15876                 :            :     size_t i;
   15877                 :            : 
   15878         [ #  # ]:          0 :     ovs_assert(inited);
   15879                 :          0 :     datum.n = n_vlan_bindings;
   15880         [ #  # ]:          0 :     datum.keys = n_vlan_bindings ? xmalloc(n_vlan_bindings * sizeof *datum.keys) : NULL;
   15881                 :          0 :     datum.values = xmalloc(n_vlan_bindings * sizeof *datum.values);
   15882         [ #  # ]:          0 :     for (i = 0; i < n_vlan_bindings; i++) {
   15883                 :          0 :         datum.keys[i].integer = key_vlan_bindings[i];
   15884                 :          0 :         datum.values[i].uuid = *value_vlan_bindings[i];
   15885                 :            :     }
   15886                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15887                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15888                 :            :                           function,
   15889                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_BINDINGS],
   15890                 :            :                           &datum);
   15891                 :          0 :     free(datum.keys);
   15892                 :          0 :     free(datum.values);
   15893                 :          0 : }
   15894                 :            : 
   15895                 :            : /* Sets the "vlan_stats" column from the "Physical_Port" table in 'row' to
   15896                 :            :  * the map with keys 'key_vlan_stats' and values 'value_vlan_stats'
   15897                 :            :  * with 'n_vlan_stats' entries.
   15898                 :            :  *
   15899                 :            :  * Argument constraints: key in range 0 to 4,095
   15900                 :            :  *
   15901                 :            :  * The caller retains ownership of the arguments. */
   15902                 :            : void
   15903                 :          0 : vteprec_physical_port_remove_clause_vlan_stats(struct ovsdb_idl *idl, enum ovsdb_function function, const int64_t *key_vlan_stats, struct uuid **value_vlan_stats, size_t n_vlan_stats)
   15904                 :            : {
   15905                 :            :     struct ovsdb_datum datum;
   15906                 :            :     size_t i;
   15907                 :            : 
   15908         [ #  # ]:          0 :     ovs_assert(inited);
   15909                 :          0 :     datum.n = n_vlan_stats;
   15910         [ #  # ]:          0 :     datum.keys = n_vlan_stats ? xmalloc(n_vlan_stats * sizeof *datum.keys) : NULL;
   15911                 :          0 :     datum.values = xmalloc(n_vlan_stats * sizeof *datum.values);
   15912         [ #  # ]:          0 :     for (i = 0; i < n_vlan_stats; i++) {
   15913                 :          0 :         datum.keys[i].integer = key_vlan_stats[i];
   15914                 :          0 :         datum.values[i].uuid = *value_vlan_stats[i];
   15915                 :            :     }
   15916                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_INTEGER, OVSDB_TYPE_UUID);
   15917                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT],
   15918                 :            :                           function,
   15919                 :            :                           &vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_COL_VLAN_STATS],
   15920                 :            :                           &datum);
   15921                 :          0 :     free(datum.keys);
   15922                 :          0 :     free(datum.values);
   15923                 :          0 : }
   15924                 :            : void
   15925                 :          0 : vteprec_physical_port_remove_clause_false(struct ovsdb_idl *idl)
   15926                 :            : {
   15927                 :            :     struct ovsdb_datum datum;
   15928                 :            : 
   15929                 :          0 :     ovsdb_datum_init_empty(&datum);
   15930                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], OVSDB_F_FALSE, NULL, &datum);
   15931                 :          0 : }
   15932                 :            : void
   15933                 :          0 : vteprec_physical_port_remove_clause_true(struct ovsdb_idl *idl)
   15934                 :            : {
   15935                 :            :     struct ovsdb_datum datum;
   15936                 :            : 
   15937                 :          0 :     ovsdb_datum_init_empty(&datum);
   15938                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], OVSDB_F_TRUE, NULL, &datum);
   15939                 :          0 : }
   15940                 :            : 
   15941                 :            : struct ovsdb_idl_column vteprec_physical_port_columns[VTEPREC_PHYSICAL_PORT_N_COLUMNS];
   15942                 :            : 
   15943                 :            : static void
   15944                 :        741 : vteprec_physical_port_columns_init(void)
   15945                 :            : {
   15946                 :            :     struct ovsdb_idl_column *c;
   15947                 :            : 
   15948                 :            :     /* Initialize vteprec_physical_port_col_acl_bindings. */
   15949                 :        741 :     c = &vteprec_physical_port_col_acl_bindings;
   15950                 :        741 :     c->name = "acl_bindings";
   15951                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   15952                 :        741 :     c->type.key.u.integer.min = INT64_C(0);
   15953                 :        741 :     c->type.key.u.integer.max = INT64_C(4095);
   15954                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_UUID);
   15955                 :        741 :     c->type.value.u.uuid.refTableName = "ACL";
   15956                 :        741 :     c->type.value.u.uuid.refType = OVSDB_REF_STRONG;
   15957                 :        741 :     c->type.n_min = 0;
   15958                 :        741 :     c->type.n_max = UINT_MAX;
   15959                 :        741 :     c->mutable = true;
   15960                 :        741 :     c->parse = vteprec_physical_port_parse_acl_bindings;
   15961                 :        741 :     c->unparse = vteprec_physical_port_unparse_acl_bindings;
   15962                 :            : 
   15963                 :            :     /* Initialize vteprec_physical_port_col_description. */
   15964                 :        741 :     c = &vteprec_physical_port_col_description;
   15965                 :        741 :     c->name = "description";
   15966                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   15967                 :        741 :     c->type.key.u.string.minLen = 0;
   15968                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   15969                 :        741 :     c->type.n_min = 1;
   15970                 :        741 :     c->type.n_max = 1;
   15971                 :        741 :     c->mutable = true;
   15972                 :        741 :     c->parse = vteprec_physical_port_parse_description;
   15973                 :        741 :     c->unparse = vteprec_physical_port_unparse_description;
   15974                 :            : 
   15975                 :            :     /* Initialize vteprec_physical_port_col_name. */
   15976                 :        741 :     c = &vteprec_physical_port_col_name;
   15977                 :        741 :     c->name = "name";
   15978                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   15979                 :        741 :     c->type.key.u.string.minLen = 0;
   15980                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   15981                 :        741 :     c->type.n_min = 1;
   15982                 :        741 :     c->type.n_max = 1;
   15983                 :        741 :     c->mutable = true;
   15984                 :        741 :     c->parse = vteprec_physical_port_parse_name;
   15985                 :        741 :     c->unparse = vteprec_physical_port_unparse_name;
   15986                 :            : 
   15987                 :            :     /* Initialize vteprec_physical_port_col_other_config. */
   15988                 :        741 :     c = &vteprec_physical_port_col_other_config;
   15989                 :        741 :     c->name = "other_config";
   15990                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   15991                 :        741 :     c->type.key.u.string.minLen = 0;
   15992                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   15993                 :        741 :     c->type.value.u.string.minLen = 0;
   15994                 :        741 :     c->type.n_min = 0;
   15995                 :        741 :     c->type.n_max = UINT_MAX;
   15996                 :        741 :     c->mutable = true;
   15997                 :        741 :     c->parse = vteprec_physical_port_parse_other_config;
   15998                 :        741 :     c->unparse = vteprec_physical_port_unparse_other_config;
   15999                 :            : 
   16000                 :            :     /* Initialize vteprec_physical_port_col_port_fault_status. */
   16001                 :        741 :     c = &vteprec_physical_port_col_port_fault_status;
   16002                 :        741 :     c->name = "port_fault_status";
   16003                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   16004                 :        741 :     c->type.key.u.string.minLen = 0;
   16005                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   16006                 :        741 :     c->type.n_min = 0;
   16007                 :        741 :     c->type.n_max = UINT_MAX;
   16008                 :        741 :     c->mutable = true;
   16009                 :        741 :     c->parse = vteprec_physical_port_parse_port_fault_status;
   16010                 :        741 :     c->unparse = vteprec_physical_port_unparse_port_fault_status;
   16011                 :            : 
   16012                 :            :     /* Initialize vteprec_physical_port_col_vlan_bindings. */
   16013                 :        741 :     c = &vteprec_physical_port_col_vlan_bindings;
   16014                 :        741 :     c->name = "vlan_bindings";
   16015                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   16016                 :        741 :     c->type.key.u.integer.min = INT64_C(0);
   16017                 :        741 :     c->type.key.u.integer.max = INT64_C(4095);
   16018                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_UUID);
   16019                 :        741 :     c->type.value.u.uuid.refTableName = "Logical_Switch";
   16020                 :        741 :     c->type.value.u.uuid.refType = OVSDB_REF_STRONG;
   16021                 :        741 :     c->type.n_min = 0;
   16022                 :        741 :     c->type.n_max = UINT_MAX;
   16023                 :        741 :     c->mutable = true;
   16024                 :        741 :     c->parse = vteprec_physical_port_parse_vlan_bindings;
   16025                 :        741 :     c->unparse = vteprec_physical_port_unparse_vlan_bindings;
   16026                 :            : 
   16027                 :            :     /* Initialize vteprec_physical_port_col_vlan_stats. */
   16028                 :        741 :     c = &vteprec_physical_port_col_vlan_stats;
   16029                 :        741 :     c->name = "vlan_stats";
   16030                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_INTEGER);
   16031                 :        741 :     c->type.key.u.integer.min = INT64_C(0);
   16032                 :        741 :     c->type.key.u.integer.max = INT64_C(4095);
   16033                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_UUID);
   16034                 :        741 :     c->type.value.u.uuid.refTableName = "Logical_Binding_Stats";
   16035                 :        741 :     c->type.value.u.uuid.refType = OVSDB_REF_STRONG;
   16036                 :        741 :     c->type.n_min = 0;
   16037                 :        741 :     c->type.n_max = UINT_MAX;
   16038                 :        741 :     c->mutable = true;
   16039                 :        741 :     c->parse = vteprec_physical_port_parse_vlan_stats;
   16040                 :        741 :     c->unparse = vteprec_physical_port_unparse_vlan_stats;
   16041                 :        741 : }
   16042                 :            : 
   16043                 :            : /* Physical_Switch table. */
   16044                 :            : 
   16045                 :            : static void
   16046                 :        515 : vteprec_physical_switch_parse_description(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16047                 :            : {
   16048                 :        515 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16049                 :            : 
   16050         [ -  + ]:        515 :     ovs_assert(inited);
   16051         [ +  - ]:        515 :     if (datum->n >= 1) {
   16052                 :        515 :         row->description = datum->keys[0].string;
   16053                 :            :     } else {
   16054                 :          0 :         row->description = "";
   16055                 :            :     }
   16056                 :        515 : }
   16057                 :            : 
   16058                 :            : static void
   16059                 :        509 : vteprec_physical_switch_parse_management_ips(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16060                 :            : {
   16061                 :        509 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16062                 :            :     size_t i;
   16063                 :            : 
   16064         [ -  + ]:        509 :     ovs_assert(inited);
   16065                 :        509 :     row->management_ips = NULL;
   16066                 :        509 :     row->n_management_ips = 0;
   16067         [ +  + ]:        512 :     for (i = 0; i < datum->n; i++) {
   16068         [ +  - ]:          3 :         if (!row->n_management_ips) {
   16069                 :          3 :             row->management_ips = xmalloc(datum->n * sizeof *row->management_ips);
   16070                 :            :         }
   16071                 :          3 :         row->management_ips[row->n_management_ips] = datum->keys[i].string;
   16072                 :          3 :         row->n_management_ips++;
   16073                 :            :     }
   16074                 :        509 : }
   16075                 :            : 
   16076                 :            : static void
   16077                 :        538 : vteprec_physical_switch_parse_name(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16078                 :            : {
   16079                 :        538 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16080                 :            : 
   16081         [ -  + ]:        538 :     ovs_assert(inited);
   16082         [ +  - ]:        538 :     if (datum->n >= 1) {
   16083                 :        538 :         row->name = datum->keys[0].string;
   16084                 :            :     } else {
   16085                 :          0 :         row->name = "";
   16086                 :            :     }
   16087                 :        538 : }
   16088                 :            : 
   16089                 :            : static void
   16090                 :        508 : vteprec_physical_switch_parse_other_config(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16091                 :            : {
   16092                 :        508 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16093                 :            :     size_t i;
   16094                 :            : 
   16095         [ -  + ]:        508 :     ovs_assert(inited);
   16096                 :        508 :     smap_init(&row->other_config);
   16097         [ -  + ]:        508 :     for (i = 0; i < datum->n; i++) {
   16098                 :          0 :         smap_add(&row->other_config,
   16099                 :          0 :                  datum->keys[i].string,
   16100                 :          0 :                  datum->values[i].string);
   16101                 :            :     }
   16102                 :        508 : }
   16103                 :            : 
   16104                 :            : static void
   16105                 :        544 : vteprec_physical_switch_parse_ports(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16106                 :            : {
   16107                 :        544 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16108                 :            :     size_t i;
   16109                 :            : 
   16110         [ -  + ]:        544 :     ovs_assert(inited);
   16111                 :        544 :     row->ports = NULL;
   16112                 :        544 :     row->n_ports = 0;
   16113         [ +  + ]:        993 :     for (i = 0; i < datum->n; i++) {
   16114                 :        449 :         struct vteprec_physical_port *keyRow = vteprec_physical_port_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_PORT], &datum->keys[i].uuid));
   16115         [ +  + ]:        449 :         if (keyRow) {
   16116         [ +  + ]:        439 :             if (!row->n_ports) {
   16117                 :        327 :                 row->ports = xmalloc(datum->n * sizeof *row->ports);
   16118                 :            :             }
   16119                 :        439 :             row->ports[row->n_ports] = keyRow;
   16120                 :        439 :             row->n_ports++;
   16121                 :            :         }
   16122                 :            :     }
   16123                 :        544 : }
   16124                 :            : 
   16125                 :            : static void
   16126                 :        508 : vteprec_physical_switch_parse_switch_fault_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16127                 :            : {
   16128                 :        508 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16129                 :            :     size_t i;
   16130                 :            : 
   16131         [ -  + ]:        508 :     ovs_assert(inited);
   16132                 :        508 :     row->switch_fault_status = NULL;
   16133                 :        508 :     row->n_switch_fault_status = 0;
   16134         [ -  + ]:        508 :     for (i = 0; i < datum->n; i++) {
   16135         [ #  # ]:          0 :         if (!row->n_switch_fault_status) {
   16136                 :          0 :             row->switch_fault_status = xmalloc(datum->n * sizeof *row->switch_fault_status);
   16137                 :            :         }
   16138                 :          0 :         row->switch_fault_status[row->n_switch_fault_status] = datum->keys[i].string;
   16139                 :          0 :         row->n_switch_fault_status++;
   16140                 :            :     }
   16141                 :        508 : }
   16142                 :            : 
   16143                 :            : static void
   16144                 :        517 : vteprec_physical_switch_parse_tunnel_ips(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16145                 :            : {
   16146                 :        517 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16147                 :            :     size_t i;
   16148                 :            : 
   16149         [ -  + ]:        517 :     ovs_assert(inited);
   16150                 :        517 :     row->tunnel_ips = NULL;
   16151                 :        517 :     row->n_tunnel_ips = 0;
   16152         [ +  + ]:        582 :     for (i = 0; i < datum->n; i++) {
   16153         [ +  - ]:         65 :         if (!row->n_tunnel_ips) {
   16154                 :         65 :             row->tunnel_ips = xmalloc(datum->n * sizeof *row->tunnel_ips);
   16155                 :            :         }
   16156                 :         65 :         row->tunnel_ips[row->n_tunnel_ips] = datum->keys[i].string;
   16157                 :         65 :         row->n_tunnel_ips++;
   16158                 :            :     }
   16159                 :        517 : }
   16160                 :            : 
   16161                 :            : static void
   16162                 :        512 : vteprec_physical_switch_parse_tunnels(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   16163                 :            : {
   16164                 :        512 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16165                 :            :     size_t i;
   16166                 :            : 
   16167         [ -  + ]:        512 :     ovs_assert(inited);
   16168                 :        512 :     row->tunnels = NULL;
   16169                 :        512 :     row->n_tunnels = 0;
   16170         [ +  + ]:        548 :     for (i = 0; i < datum->n; i++) {
   16171                 :         36 :         struct vteprec_tunnel *keyRow = vteprec_tunnel_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], &datum->keys[i].uuid));
   16172         [ +  + ]:         36 :         if (keyRow) {
   16173         [ +  + ]:         23 :             if (!row->n_tunnels) {
   16174                 :         17 :                 row->tunnels = xmalloc(datum->n * sizeof *row->tunnels);
   16175                 :            :             }
   16176                 :         23 :             row->tunnels[row->n_tunnels] = keyRow;
   16177                 :         23 :             row->n_tunnels++;
   16178                 :            :         }
   16179                 :            :     }
   16180                 :        512 : }
   16181                 :            : 
   16182                 :            : static void
   16183                 :        545 : vteprec_physical_switch_unparse_description(struct ovsdb_idl_row *row OVS_UNUSED)
   16184                 :            : {
   16185                 :            :     /* Nothing to do. */
   16186                 :        545 : }
   16187                 :            : 
   16188                 :            : static void
   16189                 :        539 : vteprec_physical_switch_unparse_management_ips(struct ovsdb_idl_row *row_)
   16190                 :            : {
   16191                 :        539 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16192                 :            : 
   16193         [ -  + ]:        539 :     ovs_assert(inited);
   16194                 :        539 :     free(row->management_ips);
   16195                 :        539 : }
   16196                 :            : 
   16197                 :            : static void
   16198                 :        568 : vteprec_physical_switch_unparse_name(struct ovsdb_idl_row *row OVS_UNUSED)
   16199                 :            : {
   16200                 :            :     /* Nothing to do. */
   16201                 :        568 : }
   16202                 :            : 
   16203                 :            : static void
   16204                 :        538 : vteprec_physical_switch_unparse_other_config(struct ovsdb_idl_row *row_)
   16205                 :            : {
   16206                 :        538 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16207                 :            : 
   16208         [ -  + ]:        538 :     ovs_assert(inited);
   16209                 :        538 :     smap_destroy(&row->other_config);
   16210                 :        538 : }
   16211                 :            : 
   16212                 :            : static void
   16213                 :        574 : vteprec_physical_switch_unparse_ports(struct ovsdb_idl_row *row_)
   16214                 :            : {
   16215                 :        574 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16216                 :            : 
   16217         [ -  + ]:        574 :     ovs_assert(inited);
   16218                 :        574 :     free(row->ports);
   16219                 :        574 : }
   16220                 :            : 
   16221                 :            : static void
   16222                 :        538 : vteprec_physical_switch_unparse_switch_fault_status(struct ovsdb_idl_row *row_)
   16223                 :            : {
   16224                 :        538 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16225                 :            : 
   16226         [ -  + ]:        538 :     ovs_assert(inited);
   16227                 :        538 :     free(row->switch_fault_status);
   16228                 :        538 : }
   16229                 :            : 
   16230                 :            : static void
   16231                 :        547 : vteprec_physical_switch_unparse_tunnel_ips(struct ovsdb_idl_row *row_)
   16232                 :            : {
   16233                 :        547 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16234                 :            : 
   16235         [ -  + ]:        547 :     ovs_assert(inited);
   16236                 :        547 :     free(row->tunnel_ips);
   16237                 :        547 : }
   16238                 :            : 
   16239                 :            : static void
   16240                 :        542 : vteprec_physical_switch_unparse_tunnels(struct ovsdb_idl_row *row_)
   16241                 :            : {
   16242                 :        542 :     struct vteprec_physical_switch *row = vteprec_physical_switch_cast(row_);
   16243                 :            : 
   16244         [ -  + ]:        542 :     ovs_assert(inited);
   16245                 :        542 :     free(row->tunnels);
   16246                 :        542 : }
   16247                 :            : 
   16248                 :            : static void
   16249                 :        425 : vteprec_physical_switch_init__(struct ovsdb_idl_row *row)
   16250                 :            : {
   16251                 :        425 :     vteprec_physical_switch_init(vteprec_physical_switch_cast(row));
   16252                 :        425 : }
   16253                 :            : 
   16254                 :            : /* Clears the contents of 'row' in table "Physical_Switch". */
   16255                 :            : void
   16256                 :        425 : vteprec_physical_switch_init(struct vteprec_physical_switch *row)
   16257                 :            : {
   16258                 :        425 :     memset(row, 0, sizeof *row); 
   16259                 :        425 :     smap_init(&row->other_config);
   16260                 :        425 : }
   16261                 :            : 
   16262                 :            : /* Searches table "Physical_Switch" in 'idl' for a row with UUID 'uuid'.  Returns
   16263                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   16264                 :            : const struct vteprec_physical_switch *
   16265                 :          0 : vteprec_physical_switch_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   16266                 :            : {
   16267                 :          0 :     return vteprec_physical_switch_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], uuid));
   16268                 :            : }
   16269                 :            : 
   16270                 :            : /* Returns a row in table "Physical_Switch" in 'idl', or a null pointer if that
   16271                 :            :  * table is empty.
   16272                 :            :  *
   16273                 :            :  * Database tables are internally maintained as hash tables, so adding or
   16274                 :            :  * removing rows while traversing the same table can cause some rows to be
   16275                 :            :  * visited twice or not at apply. */
   16276                 :            : const struct vteprec_physical_switch *
   16277                 :       1005 : vteprec_physical_switch_first(const struct ovsdb_idl *idl)
   16278                 :            : {
   16279                 :       1005 :     return vteprec_physical_switch_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH]));
   16280                 :            : }
   16281                 :            : 
   16282                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   16283                 :            :  * is the last row in its table. */
   16284                 :            : const struct vteprec_physical_switch *
   16285                 :       1085 : vteprec_physical_switch_next(const struct vteprec_physical_switch *row)
   16286                 :            : {
   16287                 :       1085 :     return vteprec_physical_switch_cast(ovsdb_idl_next_row(&row->header_));
   16288                 :            : }
   16289                 :            : 
   16290                 :          0 : unsigned int vteprec_physical_switch_get_seqno(const struct ovsdb_idl *idl)
   16291                 :            : {
   16292                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH]);
   16293                 :            : }
   16294                 :            : 
   16295                 :          0 : unsigned int vteprec_physical_switch_row_get_seqno(const struct vteprec_physical_switch *row, enum ovsdb_idl_change change)
   16296                 :            : {
   16297                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   16298                 :            : }
   16299                 :            : 
   16300                 :            : const struct vteprec_physical_switch *
   16301                 :          0 : vteprec_physical_switch_track_get_first(const struct ovsdb_idl *idl)
   16302                 :            : {
   16303                 :          0 :     return vteprec_physical_switch_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH]));
   16304                 :            : }
   16305                 :            : 
   16306                 :            : const struct vteprec_physical_switch
   16307                 :          0 : *vteprec_physical_switch_track_get_next(const struct vteprec_physical_switch *row)
   16308                 :            : {
   16309                 :          0 :     return vteprec_physical_switch_cast(ovsdb_idl_track_get_next(&row->header_));
   16310                 :            : }
   16311                 :            : 
   16312                 :            : 
   16313                 :            : /* Deletes 'row' from table "Physical_Switch".  'row' may be freed, so it must not be
   16314                 :            :  * accessed afterward.
   16315                 :            :  *
   16316                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16317                 :            : void
   16318                 :          5 : vteprec_physical_switch_delete(const struct vteprec_physical_switch *row)
   16319                 :            : {
   16320                 :          5 :     ovsdb_idl_txn_delete(&row->header_);
   16321                 :          5 : }
   16322                 :            : 
   16323                 :            : /* Inserts and returns a new row in the table "Physical_Switch" in the database
   16324                 :            :  * with open transaction 'txn'.
   16325                 :            :  *
   16326                 :            :  * The new row is assigned a randomly generated provisional UUID.
   16327                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   16328                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   16329                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   16330                 :            : struct vteprec_physical_switch *
   16331                 :         30 : vteprec_physical_switch_insert(struct ovsdb_idl_txn *txn)
   16332                 :            : {
   16333                 :         30 :     return vteprec_physical_switch_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], NULL));
   16334                 :            : }
   16335                 :            : 
   16336                 :            : bool
   16337                 :          0 : vteprec_physical_switch_is_updated(const struct vteprec_physical_switch *row, enum vteprec_physical_switch_column_id column)
   16338                 :            : {
   16339                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_physical_switch_columns[column]);
   16340                 :            : }
   16341                 :            : 
   16342                 :            : /* Causes the original contents of column "description" in 'row' to be
   16343                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16344                 :            :  * "description" in 'row' changed (or if 'row' was deleted) between the
   16345                 :            :  * time that the IDL originally read its contents and the time that the
   16346                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16347                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16348                 :            :  * change has already been received).
   16349                 :            :  *
   16350                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16351                 :            :  * reads, an application should call this function any time "description" is
   16352                 :            :  * read as part of a read-modify-write operation.
   16353                 :            :  *
   16354                 :            :  * In some cases this function reduces to a no-op, because the current value
   16355                 :            :  * of "description" is already known:
   16356                 :            :  *
   16357                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16358                 :            :  *     vteprec_physical_switch_insert()).
   16359                 :            :  *
   16360                 :            :  *   - If "description" has already been modified (with
   16361                 :            :  *     vteprec_physical_switch_set_description()) within the current transaction.
   16362                 :            :  *
   16363                 :            :  * Because of the latter property, always call this function *before*
   16364                 :            :  * vteprec_physical_switch_set_description() for a given read-modify-write.
   16365                 :            :  *
   16366                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16367                 :            : void
   16368                 :          0 : vteprec_physical_switch_verify_description(const struct vteprec_physical_switch *row)
   16369                 :            : {
   16370         [ #  # ]:          0 :     ovs_assert(inited);
   16371                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_DESCRIPTION]);
   16372                 :          0 : }
   16373                 :            : 
   16374                 :            : /* Causes the original contents of column "management_ips" in 'row' to be
   16375                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16376                 :            :  * "management_ips" in 'row' changed (or if 'row' was deleted) between the
   16377                 :            :  * time that the IDL originally read its contents and the time that the
   16378                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16379                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16380                 :            :  * change has already been received).
   16381                 :            :  *
   16382                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16383                 :            :  * reads, an application should call this function any time "management_ips" is
   16384                 :            :  * read as part of a read-modify-write operation.
   16385                 :            :  *
   16386                 :            :  * In some cases this function reduces to a no-op, because the current value
   16387                 :            :  * of "management_ips" is already known:
   16388                 :            :  *
   16389                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16390                 :            :  *     vteprec_physical_switch_insert()).
   16391                 :            :  *
   16392                 :            :  *   - If "management_ips" has already been modified (with
   16393                 :            :  *     vteprec_physical_switch_set_management_ips()) within the current transaction.
   16394                 :            :  *
   16395                 :            :  * Because of the latter property, always call this function *before*
   16396                 :            :  * vteprec_physical_switch_set_management_ips() for a given read-modify-write.
   16397                 :            :  *
   16398                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16399                 :            : void
   16400                 :          0 : vteprec_physical_switch_verify_management_ips(const struct vteprec_physical_switch *row)
   16401                 :            : {
   16402         [ #  # ]:          0 :     ovs_assert(inited);
   16403                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS]);
   16404                 :          0 : }
   16405                 :            : 
   16406                 :            : /* Causes the original contents of column "name" in 'row' to be
   16407                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16408                 :            :  * "name" in 'row' changed (or if 'row' was deleted) between the
   16409                 :            :  * time that the IDL originally read its contents and the time that the
   16410                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16411                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16412                 :            :  * change has already been received).
   16413                 :            :  *
   16414                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16415                 :            :  * reads, an application should call this function any time "name" is
   16416                 :            :  * read as part of a read-modify-write operation.
   16417                 :            :  *
   16418                 :            :  * In some cases this function reduces to a no-op, because the current value
   16419                 :            :  * of "name" is already known:
   16420                 :            :  *
   16421                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16422                 :            :  *     vteprec_physical_switch_insert()).
   16423                 :            :  *
   16424                 :            :  *   - If "name" has already been modified (with
   16425                 :            :  *     vteprec_physical_switch_set_name()) within the current transaction.
   16426                 :            :  *
   16427                 :            :  * Because of the latter property, always call this function *before*
   16428                 :            :  * vteprec_physical_switch_set_name() for a given read-modify-write.
   16429                 :            :  *
   16430                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16431                 :            : void
   16432                 :          0 : vteprec_physical_switch_verify_name(const struct vteprec_physical_switch *row)
   16433                 :            : {
   16434         [ #  # ]:          0 :     ovs_assert(inited);
   16435                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_NAME]);
   16436                 :          0 : }
   16437                 :            : 
   16438                 :            : /* Causes the original contents of column "other_config" in 'row' to be
   16439                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16440                 :            :  * "other_config" in 'row' changed (or if 'row' was deleted) between the
   16441                 :            :  * time that the IDL originally read its contents and the time that the
   16442                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16443                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16444                 :            :  * change has already been received).
   16445                 :            :  *
   16446                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16447                 :            :  * reads, an application should call this function any time "other_config" is
   16448                 :            :  * read as part of a read-modify-write operation.
   16449                 :            :  *
   16450                 :            :  * In some cases this function reduces to a no-op, because the current value
   16451                 :            :  * of "other_config" is already known:
   16452                 :            :  *
   16453                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16454                 :            :  *     vteprec_physical_switch_insert()).
   16455                 :            :  *
   16456                 :            :  *   - If "other_config" has already been modified (with
   16457                 :            :  *     vteprec_physical_switch_set_other_config()) within the current transaction.
   16458                 :            :  *
   16459                 :            :  * Because of the latter property, always call this function *before*
   16460                 :            :  * vteprec_physical_switch_set_other_config() for a given read-modify-write.
   16461                 :            :  *
   16462                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16463                 :            : void
   16464                 :          0 : vteprec_physical_switch_verify_other_config(const struct vteprec_physical_switch *row)
   16465                 :            : {
   16466         [ #  # ]:          0 :     ovs_assert(inited);
   16467                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG]);
   16468                 :          0 : }
   16469                 :            : 
   16470                 :            : /* Causes the original contents of column "ports" in 'row' to be
   16471                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16472                 :            :  * "ports" in 'row' changed (or if 'row' was deleted) between the
   16473                 :            :  * time that the IDL originally read its contents and the time that the
   16474                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16475                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16476                 :            :  * change has already been received).
   16477                 :            :  *
   16478                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16479                 :            :  * reads, an application should call this function any time "ports" is
   16480                 :            :  * read as part of a read-modify-write operation.
   16481                 :            :  *
   16482                 :            :  * In some cases this function reduces to a no-op, because the current value
   16483                 :            :  * of "ports" is already known:
   16484                 :            :  *
   16485                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16486                 :            :  *     vteprec_physical_switch_insert()).
   16487                 :            :  *
   16488                 :            :  *   - If "ports" has already been modified (with
   16489                 :            :  *     vteprec_physical_switch_set_ports()) within the current transaction.
   16490                 :            :  *
   16491                 :            :  * Because of the latter property, always call this function *before*
   16492                 :            :  * vteprec_physical_switch_set_ports() for a given read-modify-write.
   16493                 :            :  *
   16494                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16495                 :            : void
   16496                 :        155 : vteprec_physical_switch_verify_ports(const struct vteprec_physical_switch *row)
   16497                 :            : {
   16498         [ -  + ]:        155 :     ovs_assert(inited);
   16499                 :        155 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS]);
   16500                 :        155 : }
   16501                 :            : 
   16502                 :            : /* Causes the original contents of column "switch_fault_status" in 'row' to be
   16503                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16504                 :            :  * "switch_fault_status" in 'row' changed (or if 'row' was deleted) between the
   16505                 :            :  * time that the IDL originally read its contents and the time that the
   16506                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16507                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16508                 :            :  * change has already been received).
   16509                 :            :  *
   16510                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16511                 :            :  * reads, an application should call this function any time "switch_fault_status" is
   16512                 :            :  * read as part of a read-modify-write operation.
   16513                 :            :  *
   16514                 :            :  * In some cases this function reduces to a no-op, because the current value
   16515                 :            :  * of "switch_fault_status" is already known:
   16516                 :            :  *
   16517                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16518                 :            :  *     vteprec_physical_switch_insert()).
   16519                 :            :  *
   16520                 :            :  *   - If "switch_fault_status" has already been modified (with
   16521                 :            :  *     vteprec_physical_switch_set_switch_fault_status()) within the current transaction.
   16522                 :            :  *
   16523                 :            :  * Because of the latter property, always call this function *before*
   16524                 :            :  * vteprec_physical_switch_set_switch_fault_status() for a given read-modify-write.
   16525                 :            :  *
   16526                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16527                 :            : void
   16528                 :          0 : vteprec_physical_switch_verify_switch_fault_status(const struct vteprec_physical_switch *row)
   16529                 :            : {
   16530         [ #  # ]:          0 :     ovs_assert(inited);
   16531                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS]);
   16532                 :          0 : }
   16533                 :            : 
   16534                 :            : /* Causes the original contents of column "tunnel_ips" in 'row' to be
   16535                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16536                 :            :  * "tunnel_ips" in 'row' changed (or if 'row' was deleted) between the
   16537                 :            :  * time that the IDL originally read its contents and the time that the
   16538                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16539                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16540                 :            :  * change has already been received).
   16541                 :            :  *
   16542                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16543                 :            :  * reads, an application should call this function any time "tunnel_ips" is
   16544                 :            :  * read as part of a read-modify-write operation.
   16545                 :            :  *
   16546                 :            :  * In some cases this function reduces to a no-op, because the current value
   16547                 :            :  * of "tunnel_ips" is already known:
   16548                 :            :  *
   16549                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16550                 :            :  *     vteprec_physical_switch_insert()).
   16551                 :            :  *
   16552                 :            :  *   - If "tunnel_ips" has already been modified (with
   16553                 :            :  *     vteprec_physical_switch_set_tunnel_ips()) within the current transaction.
   16554                 :            :  *
   16555                 :            :  * Because of the latter property, always call this function *before*
   16556                 :            :  * vteprec_physical_switch_set_tunnel_ips() for a given read-modify-write.
   16557                 :            :  *
   16558                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16559                 :            : void
   16560                 :          0 : vteprec_physical_switch_verify_tunnel_ips(const struct vteprec_physical_switch *row)
   16561                 :            : {
   16562         [ #  # ]:          0 :     ovs_assert(inited);
   16563                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS]);
   16564                 :          0 : }
   16565                 :            : 
   16566                 :            : /* Causes the original contents of column "tunnels" in 'row' to be
   16567                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   16568                 :            :  * "tunnels" in 'row' changed (or if 'row' was deleted) between the
   16569                 :            :  * time that the IDL originally read its contents and the time that the
   16570                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   16571                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   16572                 :            :  * change has already been received).
   16573                 :            :  *
   16574                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   16575                 :            :  * reads, an application should call this function any time "tunnels" is
   16576                 :            :  * read as part of a read-modify-write operation.
   16577                 :            :  *
   16578                 :            :  * In some cases this function reduces to a no-op, because the current value
   16579                 :            :  * of "tunnels" is already known:
   16580                 :            :  *
   16581                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   16582                 :            :  *     vteprec_physical_switch_insert()).
   16583                 :            :  *
   16584                 :            :  *   - If "tunnels" has already been modified (with
   16585                 :            :  *     vteprec_physical_switch_set_tunnels()) within the current transaction.
   16586                 :            :  *
   16587                 :            :  * Because of the latter property, always call this function *before*
   16588                 :            :  * vteprec_physical_switch_set_tunnels() for a given read-modify-write.
   16589                 :            :  *
   16590                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   16591                 :            : void
   16592                 :          0 : vteprec_physical_switch_verify_tunnels(const struct vteprec_physical_switch *row)
   16593                 :            : {
   16594         [ #  # ]:          0 :     ovs_assert(inited);
   16595                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS]);
   16596                 :          0 : }
   16597                 :            : 
   16598                 :            : /* Returns the "description" column's value from the "Physical_Switch" table in 'row'
   16599                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16600                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16601                 :            :  * for a given key than implementing the same operation on the "cooked"
   16602                 :            :  * form in 'row'.
   16603                 :            :  *
   16604                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16605                 :            :  * (This helps to avoid silent bugs if someone changes description's
   16606                 :            :  * type without updating the caller.)
   16607                 :            :  *
   16608                 :            :  * The caller must not modify or free the returned value.
   16609                 :            :  *
   16610                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16611                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16612                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16613                 :            :  * of it with ovsdb_datum_clone().
   16614                 :            :  *
   16615                 :            :  * This function is rarely useful, since it is easier to access the value
   16616                 :            :  * directly through the "description" member in vteprec_physical_switch. */
   16617                 :            : const struct ovsdb_datum *
   16618                 :          0 : vteprec_physical_switch_get_description(const struct vteprec_physical_switch *row,
   16619                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16620                 :            : {
   16621         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16622                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_description);
   16623                 :            : }
   16624                 :            : 
   16625                 :            : /* Returns the "management_ips" column's value from the "Physical_Switch" table in 'row'
   16626                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16627                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16628                 :            :  * for a given key than implementing the same operation on the "cooked"
   16629                 :            :  * form in 'row'.
   16630                 :            :  *
   16631                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16632                 :            :  * (This helps to avoid silent bugs if someone changes management_ips's
   16633                 :            :  * type without updating the caller.)
   16634                 :            :  *
   16635                 :            :  * The caller must not modify or free the returned value.
   16636                 :            :  *
   16637                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16638                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16639                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16640                 :            :  * of it with ovsdb_datum_clone().
   16641                 :            :  *
   16642                 :            :  * This function is rarely useful, since it is easier to access the value
   16643                 :            :  * directly through the "management_ips" member in vteprec_physical_switch. */
   16644                 :            : const struct ovsdb_datum *
   16645                 :          0 : vteprec_physical_switch_get_management_ips(const struct vteprec_physical_switch *row,
   16646                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16647                 :            : {
   16648         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16649                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_management_ips);
   16650                 :            : }
   16651                 :            : 
   16652                 :            : /* Returns the "name" column's value from the "Physical_Switch" table in 'row'
   16653                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16654                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16655                 :            :  * for a given key than implementing the same operation on the "cooked"
   16656                 :            :  * form in 'row'.
   16657                 :            :  *
   16658                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16659                 :            :  * (This helps to avoid silent bugs if someone changes name's
   16660                 :            :  * type without updating the caller.)
   16661                 :            :  *
   16662                 :            :  * The caller must not modify or free the returned value.
   16663                 :            :  *
   16664                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16665                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16666                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16667                 :            :  * of it with ovsdb_datum_clone().
   16668                 :            :  *
   16669                 :            :  * This function is rarely useful, since it is easier to access the value
   16670                 :            :  * directly through the "name" member in vteprec_physical_switch. */
   16671                 :            : const struct ovsdb_datum *
   16672                 :          0 : vteprec_physical_switch_get_name(const struct vteprec_physical_switch *row,
   16673                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16674                 :            : {
   16675         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16676                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_name);
   16677                 :            : }
   16678                 :            : 
   16679                 :            : /* Returns the "other_config" column's value from the "Physical_Switch" table in 'row'
   16680                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16681                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16682                 :            :  * for a given key than implementing the same operation on the "cooked"
   16683                 :            :  * form in 'row'.
   16684                 :            :  *
   16685                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16686                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   16687                 :            :  * (This helps to avoid silent bugs if someone changes other_config's
   16688                 :            :  * type without updating the caller.)
   16689                 :            :  *
   16690                 :            :  * The caller must not modify or free the returned value.
   16691                 :            :  *
   16692                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16693                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16694                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16695                 :            :  * of it with ovsdb_datum_clone().
   16696                 :            :  *
   16697                 :            :  * This function is rarely useful, since it is easier to access the value
   16698                 :            :  * directly through the "other_config" member in vteprec_physical_switch. */
   16699                 :            : const struct ovsdb_datum *
   16700                 :          0 : vteprec_physical_switch_get_other_config(const struct vteprec_physical_switch *row,
   16701                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   16702                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   16703                 :            : {
   16704         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16705         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   16706                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_other_config);
   16707                 :            : }
   16708                 :            : 
   16709                 :            : /* Returns the "ports" column's value from the "Physical_Switch" table in 'row'
   16710                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16711                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16712                 :            :  * for a given key than implementing the same operation on the "cooked"
   16713                 :            :  * form in 'row'.
   16714                 :            :  *
   16715                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   16716                 :            :  * (This helps to avoid silent bugs if someone changes ports's
   16717                 :            :  * type without updating the caller.)
   16718                 :            :  *
   16719                 :            :  * The caller must not modify or free the returned value.
   16720                 :            :  *
   16721                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16722                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16723                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16724                 :            :  * of it with ovsdb_datum_clone().
   16725                 :            :  *
   16726                 :            :  * This function is rarely useful, since it is easier to access the value
   16727                 :            :  * directly through the "ports" member in vteprec_physical_switch. */
   16728                 :            : const struct ovsdb_datum *
   16729                 :          0 : vteprec_physical_switch_get_ports(const struct vteprec_physical_switch *row,
   16730                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16731                 :            : {
   16732         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   16733                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_ports);
   16734                 :            : }
   16735                 :            : 
   16736                 :            : /* Returns the "switch_fault_status" column's value from the "Physical_Switch" table in 'row'
   16737                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16738                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16739                 :            :  * for a given key than implementing the same operation on the "cooked"
   16740                 :            :  * form in 'row'.
   16741                 :            :  *
   16742                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16743                 :            :  * (This helps to avoid silent bugs if someone changes switch_fault_status's
   16744                 :            :  * type without updating the caller.)
   16745                 :            :  *
   16746                 :            :  * The caller must not modify or free the returned value.
   16747                 :            :  *
   16748                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16749                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16750                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16751                 :            :  * of it with ovsdb_datum_clone().
   16752                 :            :  *
   16753                 :            :  * This function is rarely useful, since it is easier to access the value
   16754                 :            :  * directly through the "switch_fault_status" member in vteprec_physical_switch. */
   16755                 :            : const struct ovsdb_datum *
   16756                 :          0 : vteprec_physical_switch_get_switch_fault_status(const struct vteprec_physical_switch *row,
   16757                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16758                 :            : {
   16759         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16760                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_switch_fault_status);
   16761                 :            : }
   16762                 :            : 
   16763                 :            : /* Returns the "tunnel_ips" column's value from the "Physical_Switch" table in 'row'
   16764                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16765                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16766                 :            :  * for a given key than implementing the same operation on the "cooked"
   16767                 :            :  * form in 'row'.
   16768                 :            :  *
   16769                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   16770                 :            :  * (This helps to avoid silent bugs if someone changes tunnel_ips's
   16771                 :            :  * type without updating the caller.)
   16772                 :            :  *
   16773                 :            :  * The caller must not modify or free the returned value.
   16774                 :            :  *
   16775                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16776                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16777                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16778                 :            :  * of it with ovsdb_datum_clone().
   16779                 :            :  *
   16780                 :            :  * This function is rarely useful, since it is easier to access the value
   16781                 :            :  * directly through the "tunnel_ips" member in vteprec_physical_switch. */
   16782                 :            : const struct ovsdb_datum *
   16783                 :          0 : vteprec_physical_switch_get_tunnel_ips(const struct vteprec_physical_switch *row,
   16784                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16785                 :            : {
   16786         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   16787                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_tunnel_ips);
   16788                 :            : }
   16789                 :            : 
   16790                 :            : /* Returns the "tunnels" column's value from the "Physical_Switch" table in 'row'
   16791                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   16792                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   16793                 :            :  * for a given key than implementing the same operation on the "cooked"
   16794                 :            :  * form in 'row'.
   16795                 :            :  *
   16796                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   16797                 :            :  * (This helps to avoid silent bugs if someone changes tunnels's
   16798                 :            :  * type without updating the caller.)
   16799                 :            :  *
   16800                 :            :  * The caller must not modify or free the returned value.
   16801                 :            :  *
   16802                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   16803                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   16804                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   16805                 :            :  * of it with ovsdb_datum_clone().
   16806                 :            :  *
   16807                 :            :  * This function is rarely useful, since it is easier to access the value
   16808                 :            :  * directly through the "tunnels" member in vteprec_physical_switch. */
   16809                 :            : const struct ovsdb_datum *
   16810                 :          0 : vteprec_physical_switch_get_tunnels(const struct vteprec_physical_switch *row,
   16811                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   16812                 :            : {
   16813         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   16814                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_physical_switch_col_tunnels);
   16815                 :            : }
   16816                 :            : 
   16817                 :            : /* Sets the "description" column from the "Physical_Switch" table in 'row' to
   16818                 :            :  * 'description'.
   16819                 :            :  *
   16820                 :            :  * The caller retains ownership of the arguments. */
   16821                 :            : void
   16822                 :          0 : vteprec_physical_switch_set_description(const struct vteprec_physical_switch *row, const char *description)
   16823                 :            : {
   16824                 :            :     struct ovsdb_datum datum;
   16825                 :            :     union ovsdb_atom key;
   16826                 :            : 
   16827         [ #  # ]:          0 :     ovs_assert(inited);
   16828                 :          0 :     datum.n = 1;
   16829                 :          0 :     datum.keys = &key;
   16830                 :          0 :     key.string = CONST_CAST(char *, description);
   16831                 :          0 :     datum.values = NULL;
   16832                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_DESCRIPTION], &datum);
   16833                 :          0 : }
   16834                 :            : 
   16835                 :            : /* Sets the "management_ips" column from the "Physical_Switch" table in 'row' to
   16836                 :            :  * the 'management_ips' set with 'n_management_ips' entries.
   16837                 :            :  *
   16838                 :            :  * The caller retains ownership of the arguments. */
   16839                 :            : void
   16840                 :          0 : vteprec_physical_switch_set_management_ips(const struct vteprec_physical_switch *row, const char **management_ips, size_t n_management_ips)
   16841                 :            : {
   16842                 :            :     struct ovsdb_datum datum;
   16843                 :            :     size_t i;
   16844                 :            : 
   16845         [ #  # ]:          0 :     ovs_assert(inited);
   16846                 :          0 :     datum.n = n_management_ips;
   16847         [ #  # ]:          0 :     datum.keys = n_management_ips ? xmalloc(n_management_ips * sizeof *datum.keys) : NULL;
   16848                 :          0 :     datum.values = NULL;
   16849         [ #  # ]:          0 :     for (i = 0; i < n_management_ips; i++) {
   16850                 :          0 :         datum.keys[i].string = xstrdup(management_ips[i]);
   16851                 :            :     }
   16852                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   16853                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS], &datum);
   16854                 :          0 : }
   16855                 :            : 
   16856                 :            : /* Sets the "name" column from the "Physical_Switch" table in 'row' to
   16857                 :            :  * 'name'.
   16858                 :            :  *
   16859                 :            :  * The caller retains ownership of the arguments. */
   16860                 :            : void
   16861                 :         30 : vteprec_physical_switch_set_name(const struct vteprec_physical_switch *row, const char *name)
   16862                 :            : {
   16863                 :            :     struct ovsdb_datum datum;
   16864                 :            :     union ovsdb_atom key;
   16865                 :            : 
   16866         [ -  + ]:         30 :     ovs_assert(inited);
   16867                 :         30 :     datum.n = 1;
   16868                 :         30 :     datum.keys = &key;
   16869                 :         30 :     key.string = CONST_CAST(char *, name);
   16870                 :         30 :     datum.values = NULL;
   16871                 :         30 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_NAME], &datum);
   16872                 :         30 : }
   16873                 :            : 
   16874                 :            : /* Sets the "other_config" column's value from the "Physical_Switch" table in 'row'
   16875                 :            :  * to 'other_config'.
   16876                 :            :  *
   16877                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   16878                 :            : void
   16879                 :          0 : vteprec_physical_switch_set_other_config(const struct vteprec_physical_switch *row, const struct smap *other_config)
   16880                 :            : {
   16881                 :            :     struct ovsdb_datum datum;
   16882                 :            : 
   16883         [ #  # ]:          0 :     ovs_assert(inited);
   16884         [ #  # ]:          0 :     if (other_config) {
   16885                 :            :         struct smap_node *node;
   16886                 :            :         size_t i;
   16887                 :            : 
   16888                 :          0 :         datum.n = smap_count(other_config);
   16889                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   16890                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   16891                 :            : 
   16892                 :          0 :         i = 0;
   16893 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   16894                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   16895                 :          0 :             datum.values[i].string = xstrdup(node->value);
   16896                 :          0 :             i++;
   16897                 :            :         }
   16898                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   16899                 :            :     } else {
   16900                 :          0 :         ovsdb_datum_init_empty(&datum);
   16901                 :            :     }
   16902                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   16903                 :            :                         &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG],
   16904                 :            :                         &datum);
   16905                 :          0 : }
   16906                 :            : 
   16907                 :            : 
   16908                 :            : /* Sets the "ports" column from the "Physical_Switch" table in 'row' to
   16909                 :            :  * the 'ports' set with 'n_ports' entries.
   16910                 :            :  *
   16911                 :            :  * The caller retains ownership of the arguments. */
   16912                 :            : void
   16913                 :         36 : vteprec_physical_switch_set_ports(const struct vteprec_physical_switch *row, struct vteprec_physical_port **ports, size_t n_ports)
   16914                 :            : {
   16915                 :            :     struct ovsdb_datum datum;
   16916                 :            :     size_t i;
   16917                 :            : 
   16918         [ -  + ]:         36 :     ovs_assert(inited);
   16919                 :         36 :     datum.n = n_ports;
   16920         [ +  + ]:         36 :     datum.keys = n_ports ? xmalloc(n_ports * sizeof *datum.keys) : NULL;
   16921                 :         36 :     datum.values = NULL;
   16922         [ +  + ]:         73 :     for (i = 0; i < n_ports; i++) {
   16923                 :         37 :         datum.keys[i].uuid = ports[i]->header_.uuid;
   16924                 :            :     }
   16925                 :         36 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   16926                 :         36 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS], &datum);
   16927                 :         36 : }
   16928                 :            : 
   16929                 :            : /* Sets the "switch_fault_status" column from the "Physical_Switch" table in 'row' to
   16930                 :            :  * the 'switch_fault_status' set with 'n_switch_fault_status' entries.
   16931                 :            :  *
   16932                 :            :  * The caller retains ownership of the arguments. */
   16933                 :            : void
   16934                 :          0 : vteprec_physical_switch_set_switch_fault_status(const struct vteprec_physical_switch *row, const char **switch_fault_status, size_t n_switch_fault_status)
   16935                 :            : {
   16936                 :            :     struct ovsdb_datum datum;
   16937                 :            :     size_t i;
   16938                 :            : 
   16939         [ #  # ]:          0 :     ovs_assert(inited);
   16940                 :          0 :     datum.n = n_switch_fault_status;
   16941         [ #  # ]:          0 :     datum.keys = n_switch_fault_status ? xmalloc(n_switch_fault_status * sizeof *datum.keys) : NULL;
   16942                 :          0 :     datum.values = NULL;
   16943         [ #  # ]:          0 :     for (i = 0; i < n_switch_fault_status; i++) {
   16944                 :          0 :         datum.keys[i].string = xstrdup(switch_fault_status[i]);
   16945                 :            :     }
   16946                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   16947                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS], &datum);
   16948                 :          0 : }
   16949                 :            : 
   16950                 :            : /* Sets the "tunnel_ips" column from the "Physical_Switch" table in 'row' to
   16951                 :            :  * the 'tunnel_ips' set with 'n_tunnel_ips' entries.
   16952                 :            :  *
   16953                 :            :  * The caller retains ownership of the arguments. */
   16954                 :            : void
   16955                 :          0 : vteprec_physical_switch_set_tunnel_ips(const struct vteprec_physical_switch *row, const char **tunnel_ips, size_t n_tunnel_ips)
   16956                 :            : {
   16957                 :            :     struct ovsdb_datum datum;
   16958                 :            :     size_t i;
   16959                 :            : 
   16960         [ #  # ]:          0 :     ovs_assert(inited);
   16961                 :          0 :     datum.n = n_tunnel_ips;
   16962         [ #  # ]:          0 :     datum.keys = n_tunnel_ips ? xmalloc(n_tunnel_ips * sizeof *datum.keys) : NULL;
   16963                 :          0 :     datum.values = NULL;
   16964         [ #  # ]:          0 :     for (i = 0; i < n_tunnel_ips; i++) {
   16965                 :          0 :         datum.keys[i].string = xstrdup(tunnel_ips[i]);
   16966                 :            :     }
   16967                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   16968                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS], &datum);
   16969                 :          0 : }
   16970                 :            : 
   16971                 :            : /* Sets the "tunnels" column from the "Physical_Switch" table in 'row' to
   16972                 :            :  * the 'tunnels' set with 'n_tunnels' entries.
   16973                 :            :  *
   16974                 :            :  * The caller retains ownership of the arguments. */
   16975                 :            : void
   16976                 :          0 : vteprec_physical_switch_set_tunnels(const struct vteprec_physical_switch *row, struct vteprec_tunnel **tunnels, size_t n_tunnels)
   16977                 :            : {
   16978                 :            :     struct ovsdb_datum datum;
   16979                 :            :     size_t i;
   16980                 :            : 
   16981         [ #  # ]:          0 :     ovs_assert(inited);
   16982                 :          0 :     datum.n = n_tunnels;
   16983         [ #  # ]:          0 :     datum.keys = n_tunnels ? xmalloc(n_tunnels * sizeof *datum.keys) : NULL;
   16984                 :          0 :     datum.values = NULL;
   16985         [ #  # ]:          0 :     for (i = 0; i < n_tunnels; i++) {
   16986                 :          0 :         datum.keys[i].uuid = tunnels[i]->header_.uuid;
   16987                 :            :     }
   16988                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   16989                 :          0 :     ovsdb_idl_txn_write(&row->header_, &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS], &datum);
   16990                 :          0 : }
   16991                 :            : 
   16992                 :            : /* Adds the value 'new_value' to the "management_ips" set column from the "Physical_Switch" table
   16993                 :            :  * in 'row'.
   16994                 :            :  *
   16995                 :            :  */
   16996                 :            : void
   16997                 :          0 : vteprec_physical_switch_update_management_ips_addvalue(const struct vteprec_physical_switch *row, const char *new_value)
   16998                 :            : {
   16999                 :            :     struct ovsdb_datum *datum;
   17000                 :            : 
   17001         [ #  # ]:          0 :     ovs_assert(inited);
   17002                 :            : 
   17003                 :          0 :     datum = xmalloc(sizeof *datum);
   17004                 :          0 :     datum->n = 1;
   17005                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17006                 :          0 :     datum->values = NULL;
   17007                 :            : 
   17008                 :          0 :     datum->keys[0].string = xstrdup(new_value);
   17009                 :            : 
   17010                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   17011                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS],
   17012                 :            :                                     datum);
   17013                 :          0 : }
   17014                 :            : 
   17015                 :            : /* Deletes the value 'delete_value' from the "management_ips" set column from the
   17016                 :            :  * "Physical_Switch" table in 'row'.
   17017                 :            :  *
   17018                 :            :  */
   17019                 :            : void
   17020                 :          0 : vteprec_physical_switch_update_management_ips_delvalue(const struct vteprec_physical_switch *row, const char *delete_value)
   17021                 :            : {
   17022                 :            :     struct ovsdb_datum *datum;
   17023                 :            : 
   17024         [ #  # ]:          0 :     ovs_assert(inited);
   17025                 :            : 
   17026                 :          0 :     datum = xmalloc(sizeof *datum);
   17027                 :          0 :     datum->n = 1;
   17028                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17029                 :          0 :     datum->values = NULL;
   17030                 :            : 
   17031                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
   17032                 :            : 
   17033                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   17034                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS],
   17035                 :            :                                     datum);
   17036                 :          0 : }
   17037                 :            : 
   17038                 :            : /* Sets an element of the "other_config" map column from the "Physical_Switch" table in 'row'
   17039                 :            :  * to 'new_value' given the key value 'new_key'.
   17040                 :            :  *
   17041                 :            :  */
   17042                 :            : void
   17043                 :          0 : vteprec_physical_switch_update_other_config_setkey(const struct vteprec_physical_switch *row, const char *new_key, const char *new_value)
   17044                 :            : {
   17045                 :            :     struct ovsdb_datum *datum;
   17046                 :            : 
   17047         [ #  # ]:          0 :     ovs_assert(inited);
   17048                 :            : 
   17049                 :          0 :     datum = xmalloc(sizeof *datum);
   17050                 :          0 :     datum->n = 1;
   17051                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   17052                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   17053                 :            : 
   17054                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   17055                 :          0 :     datum->values[0].string = xstrdup(new_value);
   17056                 :            : 
   17057                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   17058                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG],
   17059                 :            :                                     datum);
   17060                 :          0 : }
   17061                 :            : 
   17062                 :            : /* Deletes an element of the "other_config" map column from the "Physical_Switch" table in 'row'
   17063                 :            :  * given the key value 'delete_key'.
   17064                 :            :  *
   17065                 :            :  */
   17066                 :            : void
   17067                 :          0 : vteprec_physical_switch_update_other_config_delkey(const struct vteprec_physical_switch *row, const char *delete_key)
   17068                 :            : {
   17069                 :            :     struct ovsdb_datum *datum;
   17070                 :            : 
   17071         [ #  # ]:          0 :     ovs_assert(inited);
   17072                 :            : 
   17073                 :          0 :     datum = xmalloc(sizeof *datum);
   17074                 :          0 :     datum->n = 1;
   17075                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   17076                 :          0 :     datum->values = NULL;
   17077                 :            : 
   17078                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   17079                 :            : 
   17080                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   17081                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG],
   17082                 :            :                                     datum);
   17083                 :          0 : }
   17084                 :            : 
   17085                 :            : /* Adds the value 'new_value' to the "ports" set column from the "Physical_Switch" table
   17086                 :            :  * in 'row'.
   17087                 :            :  *
   17088                 :            :  */
   17089                 :            : void
   17090                 :          0 : vteprec_physical_switch_update_ports_addvalue(const struct vteprec_physical_switch *row, const struct vteprec_physical_port *new_value)
   17091                 :            : {
   17092                 :            :     struct ovsdb_datum *datum;
   17093                 :            : 
   17094         [ #  # ]:          0 :     ovs_assert(inited);
   17095                 :            : 
   17096                 :          0 :     datum = xmalloc(sizeof *datum);
   17097                 :          0 :     datum->n = 1;
   17098                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17099                 :          0 :     datum->values = NULL;
   17100                 :            : 
   17101                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
   17102                 :            : 
   17103                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   17104                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS],
   17105                 :            :                                     datum);
   17106                 :          0 : }
   17107                 :            : 
   17108                 :            : /* Deletes the value 'delete_value' from the "ports" set column from the
   17109                 :            :  * "Physical_Switch" table in 'row'.
   17110                 :            :  *
   17111                 :            :  */
   17112                 :            : void
   17113                 :          0 : vteprec_physical_switch_update_ports_delvalue(const struct vteprec_physical_switch *row, const struct vteprec_physical_port *delete_value)
   17114                 :            : {
   17115                 :            :     struct ovsdb_datum *datum;
   17116                 :            : 
   17117         [ #  # ]:          0 :     ovs_assert(inited);
   17118                 :            : 
   17119                 :          0 :     datum = xmalloc(sizeof *datum);
   17120                 :          0 :     datum->n = 1;
   17121                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17122                 :          0 :     datum->values = NULL;
   17123                 :            : 
   17124                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
   17125                 :            : 
   17126                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   17127                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS],
   17128                 :            :                                     datum);
   17129                 :          0 : }
   17130                 :            : 
   17131                 :            : /* Adds the value 'new_value' to the "switch_fault_status" set column from the "Physical_Switch" table
   17132                 :            :  * in 'row'.
   17133                 :            :  *
   17134                 :            :  */
   17135                 :            : void
   17136                 :          0 : vteprec_physical_switch_update_switch_fault_status_addvalue(const struct vteprec_physical_switch *row, const char *new_value)
   17137                 :            : {
   17138                 :            :     struct ovsdb_datum *datum;
   17139                 :            : 
   17140         [ #  # ]:          0 :     ovs_assert(inited);
   17141                 :            : 
   17142                 :          0 :     datum = xmalloc(sizeof *datum);
   17143                 :          0 :     datum->n = 1;
   17144                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17145                 :          0 :     datum->values = NULL;
   17146                 :            : 
   17147                 :          0 :     datum->keys[0].string = xstrdup(new_value);
   17148                 :            : 
   17149                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   17150                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS],
   17151                 :            :                                     datum);
   17152                 :          0 : }
   17153                 :            : 
   17154                 :            : /* Deletes the value 'delete_value' from the "switch_fault_status" set column from the
   17155                 :            :  * "Physical_Switch" table in 'row'.
   17156                 :            :  *
   17157                 :            :  */
   17158                 :            : void
   17159                 :          0 : vteprec_physical_switch_update_switch_fault_status_delvalue(const struct vteprec_physical_switch *row, const char *delete_value)
   17160                 :            : {
   17161                 :            :     struct ovsdb_datum *datum;
   17162                 :            : 
   17163         [ #  # ]:          0 :     ovs_assert(inited);
   17164                 :            : 
   17165                 :          0 :     datum = xmalloc(sizeof *datum);
   17166                 :          0 :     datum->n = 1;
   17167                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17168                 :          0 :     datum->values = NULL;
   17169                 :            : 
   17170                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
   17171                 :            : 
   17172                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   17173                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS],
   17174                 :            :                                     datum);
   17175                 :          0 : }
   17176                 :            : 
   17177                 :            : /* Adds the value 'new_value' to the "tunnel_ips" set column from the "Physical_Switch" table
   17178                 :            :  * in 'row'.
   17179                 :            :  *
   17180                 :            :  */
   17181                 :            : void
   17182                 :          0 : vteprec_physical_switch_update_tunnel_ips_addvalue(const struct vteprec_physical_switch *row, const char *new_value)
   17183                 :            : {
   17184                 :            :     struct ovsdb_datum *datum;
   17185                 :            : 
   17186         [ #  # ]:          0 :     ovs_assert(inited);
   17187                 :            : 
   17188                 :          0 :     datum = xmalloc(sizeof *datum);
   17189                 :          0 :     datum->n = 1;
   17190                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17191                 :          0 :     datum->values = NULL;
   17192                 :            : 
   17193                 :          0 :     datum->keys[0].string = xstrdup(new_value);
   17194                 :            : 
   17195                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   17196                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS],
   17197                 :            :                                     datum);
   17198                 :          0 : }
   17199                 :            : 
   17200                 :            : /* Deletes the value 'delete_value' from the "tunnel_ips" set column from the
   17201                 :            :  * "Physical_Switch" table in 'row'.
   17202                 :            :  *
   17203                 :            :  */
   17204                 :            : void
   17205                 :          0 : vteprec_physical_switch_update_tunnel_ips_delvalue(const struct vteprec_physical_switch *row, const char *delete_value)
   17206                 :            : {
   17207                 :            :     struct ovsdb_datum *datum;
   17208                 :            : 
   17209         [ #  # ]:          0 :     ovs_assert(inited);
   17210                 :            : 
   17211                 :          0 :     datum = xmalloc(sizeof *datum);
   17212                 :          0 :     datum->n = 1;
   17213                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17214                 :          0 :     datum->values = NULL;
   17215                 :            : 
   17216                 :          0 :     datum->keys[0].string = xstrdup(delete_value);
   17217                 :            : 
   17218                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   17219                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS],
   17220                 :            :                                     datum);
   17221                 :          0 : }
   17222                 :            : 
   17223                 :            : /* Adds the value 'new_value' to the "tunnels" set column from the "Physical_Switch" table
   17224                 :            :  * in 'row'.
   17225                 :            :  *
   17226                 :            :  */
   17227                 :            : void
   17228                 :          0 : vteprec_physical_switch_update_tunnels_addvalue(const struct vteprec_physical_switch *row, const struct vteprec_tunnel *new_value)
   17229                 :            : {
   17230                 :            :     struct ovsdb_datum *datum;
   17231                 :            : 
   17232         [ #  # ]:          0 :     ovs_assert(inited);
   17233                 :            : 
   17234                 :          0 :     datum = xmalloc(sizeof *datum);
   17235                 :          0 :     datum->n = 1;
   17236                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17237                 :          0 :     datum->values = NULL;
   17238                 :            : 
   17239                 :          0 :     datum->keys[0].uuid = new_value->header_.uuid;
   17240                 :            : 
   17241                 :          0 :     ovsdb_idl_txn_write_partial_set(&row->header_,
   17242                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS],
   17243                 :            :                                     datum);
   17244                 :          0 : }
   17245                 :            : 
   17246                 :            : /* Deletes the value 'delete_value' from the "tunnels" set column from the
   17247                 :            :  * "Physical_Switch" table in 'row'.
   17248                 :            :  *
   17249                 :            :  */
   17250                 :            : void
   17251                 :          0 : vteprec_physical_switch_update_tunnels_delvalue(const struct vteprec_physical_switch *row, const struct vteprec_tunnel *delete_value)
   17252                 :            : {
   17253                 :            :     struct ovsdb_datum *datum;
   17254                 :            : 
   17255         [ #  # ]:          0 :     ovs_assert(inited);
   17256                 :            : 
   17257                 :          0 :     datum = xmalloc(sizeof *datum);
   17258                 :          0 :     datum->n = 1;
   17259                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->values);
   17260                 :          0 :     datum->values = NULL;
   17261                 :            : 
   17262                 :          0 :     datum->keys[0].uuid = delete_value->header_.uuid;
   17263                 :            : 
   17264                 :          0 :     ovsdb_idl_txn_delete_partial_set(&row->header_,
   17265                 :            :                                     &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS],
   17266                 :            :                                     datum);
   17267                 :          0 : }
   17268                 :            : 
   17269                 :            : /* Sets the "description" column from the "Physical_Switch" table in 'row' to
   17270                 :            :  * 'description'.
   17271                 :            :  *
   17272                 :            :  * The caller retains ownership of the arguments. */
   17273                 :            : void
   17274                 :          0 : vteprec_physical_switch_add_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   17275                 :            : {
   17276                 :            :     struct ovsdb_datum datum;
   17277                 :            :     union ovsdb_atom key;
   17278                 :            : 
   17279         [ #  # ]:          0 :     ovs_assert(inited);
   17280                 :          0 :     datum.n = 1;
   17281                 :          0 :     datum.keys = &key;
   17282                 :          0 :     key.string = CONST_CAST(char *, description);
   17283                 :          0 :     datum.values = NULL;
   17284                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17285                 :            :                           function,
   17286                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_DESCRIPTION],
   17287                 :            :                           &datum);
   17288                 :          0 : }
   17289                 :            : 
   17290                 :            : /* Sets the "management_ips" column from the "Physical_Switch" table in 'row' to
   17291                 :            :  * the 'management_ips' set with 'n_management_ips' entries.
   17292                 :            :  *
   17293                 :            :  * The caller retains ownership of the arguments. */
   17294                 :            : void
   17295                 :          0 : vteprec_physical_switch_add_clause_management_ips(struct ovsdb_idl *idl, enum ovsdb_function function, const char **management_ips, size_t n_management_ips)
   17296                 :            : {
   17297                 :            :     struct ovsdb_datum datum;
   17298                 :            :     size_t i;
   17299                 :            : 
   17300         [ #  # ]:          0 :     ovs_assert(inited);
   17301                 :          0 :     datum.n = n_management_ips;
   17302         [ #  # ]:          0 :     datum.keys = n_management_ips ? xmalloc(n_management_ips * sizeof *datum.keys) : NULL;
   17303                 :          0 :     datum.values = NULL;
   17304         [ #  # ]:          0 :     for (i = 0; i < n_management_ips; i++) {
   17305                 :          0 :         datum.keys[i].string = CONST_CAST(char *, management_ips[i]);
   17306                 :            :     }
   17307                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17308                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17309                 :            :                           function,
   17310                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS],
   17311                 :            :                           &datum);
   17312                 :          0 :     free(datum.keys);
   17313                 :          0 : }
   17314                 :            : 
   17315                 :            : /* Sets the "name" column from the "Physical_Switch" table in 'row' to
   17316                 :            :  * 'name'.
   17317                 :            :  *
   17318                 :            :  * The caller retains ownership of the arguments. */
   17319                 :            : void
   17320                 :          0 : vteprec_physical_switch_add_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   17321                 :            : {
   17322                 :            :     struct ovsdb_datum datum;
   17323                 :            :     union ovsdb_atom key;
   17324                 :            : 
   17325         [ #  # ]:          0 :     ovs_assert(inited);
   17326                 :          0 :     datum.n = 1;
   17327                 :          0 :     datum.keys = &key;
   17328                 :          0 :     key.string = CONST_CAST(char *, name);
   17329                 :          0 :     datum.values = NULL;
   17330                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17331                 :            :                           function,
   17332                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_NAME],
   17333                 :            :                           &datum);
   17334                 :          0 : }
   17335                 :            : 
   17336                 :            : /* Sets the "other_config" column's value from the "Physical_Switch" table in 'row'
   17337                 :            :  * to 'other_config'.
   17338                 :            :  *
   17339                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   17340                 :            : void
   17341                 :          0 : vteprec_physical_switch_add_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   17342                 :            : {
   17343                 :            :     struct ovsdb_datum datum;
   17344                 :            : 
   17345         [ #  # ]:          0 :     ovs_assert(inited);
   17346         [ #  # ]:          0 :     if (other_config) {
   17347                 :            :         struct smap_node *node;
   17348                 :            :         size_t i;
   17349                 :            : 
   17350                 :          0 :         datum.n = smap_count(other_config);
   17351                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   17352                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   17353                 :            : 
   17354                 :          0 :         i = 0;
   17355 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   17356                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   17357                 :          0 :             datum.values[i].string = xstrdup(node->value);
   17358                 :          0 :             i++;
   17359                 :            :         }
   17360                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   17361                 :            :     } else {
   17362                 :          0 :         ovsdb_datum_init_empty(&datum);
   17363                 :            :     }
   17364                 :            : 
   17365                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   17366                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17367                 :            :                                    function,
   17368                 :            :                                    &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG],
   17369                 :            :                                    &datum);
   17370                 :            : 
   17371                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_physical_switch_col_other_config.type);
   17372                 :          0 : }
   17373                 :            : 
   17374                 :            : 
   17375                 :            : /* Sets the "ports" column from the "Physical_Switch" table in 'row' to
   17376                 :            :  * the 'ports' set with 'n_ports' entries.
   17377                 :            :  *
   17378                 :            :  * The caller retains ownership of the arguments. */
   17379                 :            : void
   17380                 :          0 : vteprec_physical_switch_add_clause_ports(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **ports, size_t n_ports)
   17381                 :            : {
   17382                 :            :     struct ovsdb_datum datum;
   17383                 :            :     size_t i;
   17384                 :            : 
   17385         [ #  # ]:          0 :     ovs_assert(inited);
   17386                 :          0 :     datum.n = n_ports;
   17387         [ #  # ]:          0 :     datum.keys = n_ports ? xmalloc(n_ports * sizeof *datum.keys) : NULL;
   17388                 :          0 :     datum.values = NULL;
   17389         [ #  # ]:          0 :     for (i = 0; i < n_ports; i++) {
   17390                 :          0 :         datum.keys[i].uuid = *ports[i];
   17391                 :            :     }
   17392                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   17393                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17394                 :            :                           function,
   17395                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS],
   17396                 :            :                           &datum);
   17397                 :          0 :     free(datum.keys);
   17398                 :          0 : }
   17399                 :            : 
   17400                 :            : /* Sets the "switch_fault_status" column from the "Physical_Switch" table in 'row' to
   17401                 :            :  * the 'switch_fault_status' set with 'n_switch_fault_status' entries.
   17402                 :            :  *
   17403                 :            :  * The caller retains ownership of the arguments. */
   17404                 :            : void
   17405                 :          0 : vteprec_physical_switch_add_clause_switch_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **switch_fault_status, size_t n_switch_fault_status)
   17406                 :            : {
   17407                 :            :     struct ovsdb_datum datum;
   17408                 :            :     size_t i;
   17409                 :            : 
   17410         [ #  # ]:          0 :     ovs_assert(inited);
   17411                 :          0 :     datum.n = n_switch_fault_status;
   17412         [ #  # ]:          0 :     datum.keys = n_switch_fault_status ? xmalloc(n_switch_fault_status * sizeof *datum.keys) : NULL;
   17413                 :          0 :     datum.values = NULL;
   17414         [ #  # ]:          0 :     for (i = 0; i < n_switch_fault_status; i++) {
   17415                 :          0 :         datum.keys[i].string = CONST_CAST(char *, switch_fault_status[i]);
   17416                 :            :     }
   17417                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17418                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17419                 :            :                           function,
   17420                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS],
   17421                 :            :                           &datum);
   17422                 :          0 :     free(datum.keys);
   17423                 :          0 : }
   17424                 :            : 
   17425                 :            : /* Sets the "tunnel_ips" column from the "Physical_Switch" table in 'row' to
   17426                 :            :  * the 'tunnel_ips' set with 'n_tunnel_ips' entries.
   17427                 :            :  *
   17428                 :            :  * The caller retains ownership of the arguments. */
   17429                 :            : void
   17430                 :          0 : vteprec_physical_switch_add_clause_tunnel_ips(struct ovsdb_idl *idl, enum ovsdb_function function, const char **tunnel_ips, size_t n_tunnel_ips)
   17431                 :            : {
   17432                 :            :     struct ovsdb_datum datum;
   17433                 :            :     size_t i;
   17434                 :            : 
   17435         [ #  # ]:          0 :     ovs_assert(inited);
   17436                 :          0 :     datum.n = n_tunnel_ips;
   17437         [ #  # ]:          0 :     datum.keys = n_tunnel_ips ? xmalloc(n_tunnel_ips * sizeof *datum.keys) : NULL;
   17438                 :          0 :     datum.values = NULL;
   17439         [ #  # ]:          0 :     for (i = 0; i < n_tunnel_ips; i++) {
   17440                 :          0 :         datum.keys[i].string = CONST_CAST(char *, tunnel_ips[i]);
   17441                 :            :     }
   17442                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17443                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17444                 :            :                           function,
   17445                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS],
   17446                 :            :                           &datum);
   17447                 :          0 :     free(datum.keys);
   17448                 :          0 : }
   17449                 :            : 
   17450                 :            : /* Sets the "tunnels" column from the "Physical_Switch" table in 'row' to
   17451                 :            :  * the 'tunnels' set with 'n_tunnels' entries.
   17452                 :            :  *
   17453                 :            :  * The caller retains ownership of the arguments. */
   17454                 :            : void
   17455                 :          0 : vteprec_physical_switch_add_clause_tunnels(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **tunnels, size_t n_tunnels)
   17456                 :            : {
   17457                 :            :     struct ovsdb_datum datum;
   17458                 :            :     size_t i;
   17459                 :            : 
   17460         [ #  # ]:          0 :     ovs_assert(inited);
   17461                 :          0 :     datum.n = n_tunnels;
   17462         [ #  # ]:          0 :     datum.keys = n_tunnels ? xmalloc(n_tunnels * sizeof *datum.keys) : NULL;
   17463                 :          0 :     datum.values = NULL;
   17464         [ #  # ]:          0 :     for (i = 0; i < n_tunnels; i++) {
   17465                 :          0 :         datum.keys[i].uuid = *tunnels[i];
   17466                 :            :     }
   17467                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   17468                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17469                 :            :                           function,
   17470                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS],
   17471                 :            :                           &datum);
   17472                 :          0 :     free(datum.keys);
   17473                 :          0 : }
   17474                 :            : void
   17475                 :          0 : vteprec_physical_switch_add_clause_false(struct ovsdb_idl *idl)
   17476                 :            : {
   17477                 :            :     struct ovsdb_datum datum;
   17478                 :            : 
   17479                 :          0 :     ovsdb_datum_init_empty(&datum);
   17480                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], OVSDB_F_FALSE, NULL, &datum);
   17481                 :          0 : }
   17482                 :            : void
   17483                 :          0 : vteprec_physical_switch_add_clause_true(struct ovsdb_idl *idl)
   17484                 :            : {
   17485                 :            :     struct ovsdb_datum datum;
   17486                 :            : 
   17487                 :          0 :     ovsdb_datum_init_empty(&datum);
   17488                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], OVSDB_F_TRUE, NULL, &datum);
   17489                 :          0 : }
   17490                 :            : 
   17491                 :            : /* Sets the "description" column from the "Physical_Switch" table in 'row' to
   17492                 :            :  * 'description'.
   17493                 :            :  *
   17494                 :            :  * The caller retains ownership of the arguments. */
   17495                 :            : void
   17496                 :          0 : vteprec_physical_switch_remove_clause_description(struct ovsdb_idl *idl, enum ovsdb_function function, const char *description)
   17497                 :            : {
   17498                 :            :     struct ovsdb_datum datum;
   17499                 :            :     union ovsdb_atom key;
   17500                 :            : 
   17501         [ #  # ]:          0 :     ovs_assert(inited);
   17502                 :          0 :     datum.n = 1;
   17503                 :          0 :     datum.keys = &key;
   17504                 :          0 :     key.string = CONST_CAST(char *, description);
   17505                 :          0 :     datum.values = NULL;
   17506                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17507                 :            :                           function,
   17508                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_DESCRIPTION],
   17509                 :            :                           &datum);
   17510                 :          0 : }
   17511                 :            : 
   17512                 :            : /* Sets the "management_ips" column from the "Physical_Switch" table in 'row' to
   17513                 :            :  * the 'management_ips' set with 'n_management_ips' entries.
   17514                 :            :  *
   17515                 :            :  * The caller retains ownership of the arguments. */
   17516                 :            : void
   17517                 :          0 : vteprec_physical_switch_remove_clause_management_ips(struct ovsdb_idl *idl, enum ovsdb_function function, const char **management_ips, size_t n_management_ips)
   17518                 :            : {
   17519                 :            :     struct ovsdb_datum datum;
   17520                 :            :     size_t i;
   17521                 :            : 
   17522         [ #  # ]:          0 :     ovs_assert(inited);
   17523                 :          0 :     datum.n = n_management_ips;
   17524         [ #  # ]:          0 :     datum.keys = n_management_ips ? xmalloc(n_management_ips * sizeof *datum.keys) : NULL;
   17525                 :          0 :     datum.values = NULL;
   17526         [ #  # ]:          0 :     for (i = 0; i < n_management_ips; i++) {
   17527                 :          0 :         datum.keys[i].string = CONST_CAST(char *, management_ips[i]);
   17528                 :            :     }
   17529                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17530                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17531                 :            :                           function,
   17532                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_MANAGEMENT_IPS],
   17533                 :            :                           &datum);
   17534                 :          0 :     free(datum.keys);
   17535                 :          0 : }
   17536                 :            : 
   17537                 :            : /* Sets the "name" column from the "Physical_Switch" table in 'row' to
   17538                 :            :  * 'name'.
   17539                 :            :  *
   17540                 :            :  * The caller retains ownership of the arguments. */
   17541                 :            : void
   17542                 :          0 : vteprec_physical_switch_remove_clause_name(struct ovsdb_idl *idl, enum ovsdb_function function, const char *name)
   17543                 :            : {
   17544                 :            :     struct ovsdb_datum datum;
   17545                 :            :     union ovsdb_atom key;
   17546                 :            : 
   17547         [ #  # ]:          0 :     ovs_assert(inited);
   17548                 :          0 :     datum.n = 1;
   17549                 :          0 :     datum.keys = &key;
   17550                 :          0 :     key.string = CONST_CAST(char *, name);
   17551                 :          0 :     datum.values = NULL;
   17552                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17553                 :            :                           function,
   17554                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_NAME],
   17555                 :            :                           &datum);
   17556                 :          0 : }
   17557                 :            : 
   17558                 :            : /* Sets the "other_config" column's value from the "Physical_Switch" table in 'row'
   17559                 :            :  * to 'other_config'.
   17560                 :            :  *
   17561                 :            :  * The caller retains ownership of 'other_config' and everything in it. */
   17562                 :            : void
   17563                 :          0 : vteprec_physical_switch_remove_clause_other_config(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *other_config)
   17564                 :            : {
   17565                 :            :     struct ovsdb_datum datum;
   17566                 :            : 
   17567         [ #  # ]:          0 :     ovs_assert(inited);
   17568         [ #  # ]:          0 :     if (other_config) {
   17569                 :            :         struct smap_node *node;
   17570                 :            :         size_t i;
   17571                 :            : 
   17572                 :          0 :         datum.n = smap_count(other_config);
   17573                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   17574                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   17575                 :            : 
   17576                 :          0 :         i = 0;
   17577 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, other_config) {
   17578                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   17579                 :          0 :             datum.values[i].string = xstrdup(node->value);
   17580                 :          0 :             i++;
   17581                 :            :         }
   17582                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   17583                 :            :     } else {
   17584                 :          0 :         ovsdb_datum_init_empty(&datum);
   17585                 :            :     }
   17586                 :            : 
   17587                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17588                 :            :                                       function,
   17589                 :            :                                       &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_OTHER_CONFIG],
   17590                 :            :                                       &datum);
   17591                 :            : 
   17592                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_physical_switch_col_other_config.type);
   17593                 :          0 : }
   17594                 :            : 
   17595                 :            : 
   17596                 :            : /* Sets the "ports" column from the "Physical_Switch" table in 'row' to
   17597                 :            :  * the 'ports' set with 'n_ports' entries.
   17598                 :            :  *
   17599                 :            :  * The caller retains ownership of the arguments. */
   17600                 :            : void
   17601                 :          0 : vteprec_physical_switch_remove_clause_ports(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **ports, size_t n_ports)
   17602                 :            : {
   17603                 :            :     struct ovsdb_datum datum;
   17604                 :            :     size_t i;
   17605                 :            : 
   17606         [ #  # ]:          0 :     ovs_assert(inited);
   17607                 :          0 :     datum.n = n_ports;
   17608         [ #  # ]:          0 :     datum.keys = n_ports ? xmalloc(n_ports * sizeof *datum.keys) : NULL;
   17609                 :          0 :     datum.values = NULL;
   17610         [ #  # ]:          0 :     for (i = 0; i < n_ports; i++) {
   17611                 :          0 :         datum.keys[i].uuid = *ports[i];
   17612                 :            :     }
   17613                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   17614                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17615                 :            :                           function,
   17616                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_PORTS],
   17617                 :            :                           &datum);
   17618                 :          0 :     free(datum.keys);
   17619                 :          0 : }
   17620                 :            : 
   17621                 :            : /* Sets the "switch_fault_status" column from the "Physical_Switch" table in 'row' to
   17622                 :            :  * the 'switch_fault_status' set with 'n_switch_fault_status' entries.
   17623                 :            :  *
   17624                 :            :  * The caller retains ownership of the arguments. */
   17625                 :            : void
   17626                 :          0 : vteprec_physical_switch_remove_clause_switch_fault_status(struct ovsdb_idl *idl, enum ovsdb_function function, const char **switch_fault_status, size_t n_switch_fault_status)
   17627                 :            : {
   17628                 :            :     struct ovsdb_datum datum;
   17629                 :            :     size_t i;
   17630                 :            : 
   17631         [ #  # ]:          0 :     ovs_assert(inited);
   17632                 :          0 :     datum.n = n_switch_fault_status;
   17633         [ #  # ]:          0 :     datum.keys = n_switch_fault_status ? xmalloc(n_switch_fault_status * sizeof *datum.keys) : NULL;
   17634                 :          0 :     datum.values = NULL;
   17635         [ #  # ]:          0 :     for (i = 0; i < n_switch_fault_status; i++) {
   17636                 :          0 :         datum.keys[i].string = CONST_CAST(char *, switch_fault_status[i]);
   17637                 :            :     }
   17638                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17639                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17640                 :            :                           function,
   17641                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_SWITCH_FAULT_STATUS],
   17642                 :            :                           &datum);
   17643                 :          0 :     free(datum.keys);
   17644                 :          0 : }
   17645                 :            : 
   17646                 :            : /* Sets the "tunnel_ips" column from the "Physical_Switch" table in 'row' to
   17647                 :            :  * the 'tunnel_ips' set with 'n_tunnel_ips' entries.
   17648                 :            :  *
   17649                 :            :  * The caller retains ownership of the arguments. */
   17650                 :            : void
   17651                 :          0 : vteprec_physical_switch_remove_clause_tunnel_ips(struct ovsdb_idl *idl, enum ovsdb_function function, const char **tunnel_ips, size_t n_tunnel_ips)
   17652                 :            : {
   17653                 :            :     struct ovsdb_datum datum;
   17654                 :            :     size_t i;
   17655                 :            : 
   17656         [ #  # ]:          0 :     ovs_assert(inited);
   17657                 :          0 :     datum.n = n_tunnel_ips;
   17658         [ #  # ]:          0 :     datum.keys = n_tunnel_ips ? xmalloc(n_tunnel_ips * sizeof *datum.keys) : NULL;
   17659                 :          0 :     datum.values = NULL;
   17660         [ #  # ]:          0 :     for (i = 0; i < n_tunnel_ips; i++) {
   17661                 :          0 :         datum.keys[i].string = CONST_CAST(char *, tunnel_ips[i]);
   17662                 :            :     }
   17663                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_VOID);
   17664                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17665                 :            :                           function,
   17666                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNEL_IPS],
   17667                 :            :                           &datum);
   17668                 :          0 :     free(datum.keys);
   17669                 :          0 : }
   17670                 :            : 
   17671                 :            : /* Sets the "tunnels" column from the "Physical_Switch" table in 'row' to
   17672                 :            :  * the 'tunnels' set with 'n_tunnels' entries.
   17673                 :            :  *
   17674                 :            :  * The caller retains ownership of the arguments. */
   17675                 :            : void
   17676                 :          0 : vteprec_physical_switch_remove_clause_tunnels(struct ovsdb_idl *idl, enum ovsdb_function function, struct uuid **tunnels, size_t n_tunnels)
   17677                 :            : {
   17678                 :            :     struct ovsdb_datum datum;
   17679                 :            :     size_t i;
   17680                 :            : 
   17681         [ #  # ]:          0 :     ovs_assert(inited);
   17682                 :          0 :     datum.n = n_tunnels;
   17683         [ #  # ]:          0 :     datum.keys = n_tunnels ? xmalloc(n_tunnels * sizeof *datum.keys) : NULL;
   17684                 :          0 :     datum.values = NULL;
   17685         [ #  # ]:          0 :     for (i = 0; i < n_tunnels; i++) {
   17686                 :          0 :         datum.keys[i].uuid = *tunnels[i];
   17687                 :            :     }
   17688                 :          0 :     ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_UUID, OVSDB_TYPE_VOID);
   17689                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH],
   17690                 :            :                           function,
   17691                 :            :                           &vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_COL_TUNNELS],
   17692                 :            :                           &datum);
   17693                 :          0 :     free(datum.keys);
   17694                 :          0 : }
   17695                 :            : void
   17696                 :          0 : vteprec_physical_switch_remove_clause_false(struct ovsdb_idl *idl)
   17697                 :            : {
   17698                 :            :     struct ovsdb_datum datum;
   17699                 :            : 
   17700                 :          0 :     ovsdb_datum_init_empty(&datum);
   17701                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], OVSDB_F_FALSE, NULL, &datum);
   17702                 :          0 : }
   17703                 :            : void
   17704                 :          0 : vteprec_physical_switch_remove_clause_true(struct ovsdb_idl *idl)
   17705                 :            : {
   17706                 :            :     struct ovsdb_datum datum;
   17707                 :            : 
   17708                 :          0 :     ovsdb_datum_init_empty(&datum);
   17709                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_SWITCH], OVSDB_F_TRUE, NULL, &datum);
   17710                 :          0 : }
   17711                 :            : 
   17712                 :            : struct ovsdb_idl_column vteprec_physical_switch_columns[VTEPREC_PHYSICAL_SWITCH_N_COLUMNS];
   17713                 :            : 
   17714                 :            : static void
   17715                 :        741 : vteprec_physical_switch_columns_init(void)
   17716                 :            : {
   17717                 :            :     struct ovsdb_idl_column *c;
   17718                 :            : 
   17719                 :            :     /* Initialize vteprec_physical_switch_col_description. */
   17720                 :        741 :     c = &vteprec_physical_switch_col_description;
   17721                 :        741 :     c->name = "description";
   17722                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17723                 :        741 :     c->type.key.u.string.minLen = 0;
   17724                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17725                 :        741 :     c->type.n_min = 1;
   17726                 :        741 :     c->type.n_max = 1;
   17727                 :        741 :     c->mutable = true;
   17728                 :        741 :     c->parse = vteprec_physical_switch_parse_description;
   17729                 :        741 :     c->unparse = vteprec_physical_switch_unparse_description;
   17730                 :            : 
   17731                 :            :     /* Initialize vteprec_physical_switch_col_management_ips. */
   17732                 :        741 :     c = &vteprec_physical_switch_col_management_ips;
   17733                 :        741 :     c->name = "management_ips";
   17734                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17735                 :        741 :     c->type.key.u.string.minLen = 0;
   17736                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17737                 :        741 :     c->type.n_min = 0;
   17738                 :        741 :     c->type.n_max = UINT_MAX;
   17739                 :        741 :     c->mutable = true;
   17740                 :        741 :     c->parse = vteprec_physical_switch_parse_management_ips;
   17741                 :        741 :     c->unparse = vteprec_physical_switch_unparse_management_ips;
   17742                 :            : 
   17743                 :            :     /* Initialize vteprec_physical_switch_col_name. */
   17744                 :        741 :     c = &vteprec_physical_switch_col_name;
   17745                 :        741 :     c->name = "name";
   17746                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17747                 :        741 :     c->type.key.u.string.minLen = 0;
   17748                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17749                 :        741 :     c->type.n_min = 1;
   17750                 :        741 :     c->type.n_max = 1;
   17751                 :        741 :     c->mutable = true;
   17752                 :        741 :     c->parse = vteprec_physical_switch_parse_name;
   17753                 :        741 :     c->unparse = vteprec_physical_switch_unparse_name;
   17754                 :            : 
   17755                 :            :     /* Initialize vteprec_physical_switch_col_other_config. */
   17756                 :        741 :     c = &vteprec_physical_switch_col_other_config;
   17757                 :        741 :     c->name = "other_config";
   17758                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17759                 :        741 :     c->type.key.u.string.minLen = 0;
   17760                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   17761                 :        741 :     c->type.value.u.string.minLen = 0;
   17762                 :        741 :     c->type.n_min = 0;
   17763                 :        741 :     c->type.n_max = UINT_MAX;
   17764                 :        741 :     c->mutable = true;
   17765                 :        741 :     c->parse = vteprec_physical_switch_parse_other_config;
   17766                 :        741 :     c->unparse = vteprec_physical_switch_unparse_other_config;
   17767                 :            : 
   17768                 :            :     /* Initialize vteprec_physical_switch_col_ports. */
   17769                 :        741 :     c = &vteprec_physical_switch_col_ports;
   17770                 :        741 :     c->name = "ports";
   17771                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   17772                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Port";
   17773                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   17774                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17775                 :        741 :     c->type.n_min = 0;
   17776                 :        741 :     c->type.n_max = UINT_MAX;
   17777                 :        741 :     c->mutable = true;
   17778                 :        741 :     c->parse = vteprec_physical_switch_parse_ports;
   17779                 :        741 :     c->unparse = vteprec_physical_switch_unparse_ports;
   17780                 :            : 
   17781                 :            :     /* Initialize vteprec_physical_switch_col_switch_fault_status. */
   17782                 :        741 :     c = &vteprec_physical_switch_col_switch_fault_status;
   17783                 :        741 :     c->name = "switch_fault_status";
   17784                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17785                 :        741 :     c->type.key.u.string.minLen = 0;
   17786                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17787                 :        741 :     c->type.n_min = 0;
   17788                 :        741 :     c->type.n_max = UINT_MAX;
   17789                 :        741 :     c->mutable = true;
   17790                 :        741 :     c->parse = vteprec_physical_switch_parse_switch_fault_status;
   17791                 :        741 :     c->unparse = vteprec_physical_switch_unparse_switch_fault_status;
   17792                 :            : 
   17793                 :            :     /* Initialize vteprec_physical_switch_col_tunnel_ips. */
   17794                 :        741 :     c = &vteprec_physical_switch_col_tunnel_ips;
   17795                 :        741 :     c->name = "tunnel_ips";
   17796                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   17797                 :        741 :     c->type.key.u.string.minLen = 0;
   17798                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17799                 :        741 :     c->type.n_min = 0;
   17800                 :        741 :     c->type.n_max = UINT_MAX;
   17801                 :        741 :     c->mutable = true;
   17802                 :        741 :     c->parse = vteprec_physical_switch_parse_tunnel_ips;
   17803                 :        741 :     c->unparse = vteprec_physical_switch_unparse_tunnel_ips;
   17804                 :            : 
   17805                 :            :     /* Initialize vteprec_physical_switch_col_tunnels. */
   17806                 :        741 :     c = &vteprec_physical_switch_col_tunnels;
   17807                 :        741 :     c->name = "tunnels";
   17808                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   17809                 :        741 :     c->type.key.u.uuid.refTableName = "Tunnel";
   17810                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   17811                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   17812                 :        741 :     c->type.n_min = 0;
   17813                 :        741 :     c->type.n_max = UINT_MAX;
   17814                 :        741 :     c->mutable = true;
   17815                 :        741 :     c->parse = vteprec_physical_switch_parse_tunnels;
   17816                 :        741 :     c->unparse = vteprec_physical_switch_unparse_tunnels;
   17817                 :        741 : }
   17818                 :            : 
   17819                 :            : /* Tunnel table. */
   17820                 :            : 
   17821                 :            : static void
   17822                 :        250 : vteprec_tunnel_parse_bfd_config_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17823                 :            : {
   17824                 :        250 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17825                 :            :     size_t i;
   17826                 :            : 
   17827         [ -  + ]:        250 :     ovs_assert(inited);
   17828                 :        250 :     smap_init(&row->bfd_config_local);
   17829         [ +  + ]:        330 :     for (i = 0; i < datum->n; i++) {
   17830                 :         80 :         smap_add(&row->bfd_config_local,
   17831                 :         80 :                  datum->keys[i].string,
   17832                 :         80 :                  datum->values[i].string);
   17833                 :            :     }
   17834                 :        250 : }
   17835                 :            : 
   17836                 :            : static void
   17837                 :        238 : vteprec_tunnel_parse_bfd_config_remote(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17838                 :            : {
   17839                 :        238 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17840                 :            :     size_t i;
   17841                 :            : 
   17842         [ -  + ]:        238 :     ovs_assert(inited);
   17843                 :        238 :     smap_init(&row->bfd_config_remote);
   17844         [ -  + ]:        238 :     for (i = 0; i < datum->n; i++) {
   17845                 :          0 :         smap_add(&row->bfd_config_remote,
   17846                 :          0 :                  datum->keys[i].string,
   17847                 :          0 :                  datum->values[i].string);
   17848                 :            :     }
   17849                 :        238 : }
   17850                 :            : 
   17851                 :            : static void
   17852                 :        238 : vteprec_tunnel_parse_bfd_params(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17853                 :            : {
   17854                 :        238 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17855                 :            :     size_t i;
   17856                 :            : 
   17857         [ -  + ]:        238 :     ovs_assert(inited);
   17858                 :        238 :     smap_init(&row->bfd_params);
   17859         [ -  + ]:        238 :     for (i = 0; i < datum->n; i++) {
   17860                 :          0 :         smap_add(&row->bfd_params,
   17861                 :          0 :                  datum->keys[i].string,
   17862                 :          0 :                  datum->values[i].string);
   17863                 :            :     }
   17864                 :        238 : }
   17865                 :            : 
   17866                 :            : static void
   17867                 :        274 : vteprec_tunnel_parse_bfd_status(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17868                 :            : {
   17869                 :        274 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17870                 :            :     size_t i;
   17871                 :            : 
   17872         [ -  + ]:        274 :     ovs_assert(inited);
   17873                 :        274 :     smap_init(&row->bfd_status);
   17874         [ +  + ]:        348 :     for (i = 0; i < datum->n; i++) {
   17875                 :         74 :         smap_add(&row->bfd_status,
   17876                 :         74 :                  datum->keys[i].string,
   17877                 :         74 :                  datum->values[i].string);
   17878                 :            :     }
   17879                 :        274 : }
   17880                 :            : 
   17881                 :            : static void
   17882                 :        242 : vteprec_tunnel_parse_local(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17883                 :            : {
   17884                 :        242 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17885                 :            : 
   17886         [ -  + ]:        242 :     ovs_assert(inited);
   17887         [ +  - ]:        242 :     if (datum->n >= 1) {
   17888                 :        242 :         row->local = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
   17889                 :            :     } else {
   17890                 :          0 :         row->local = NULL;
   17891                 :            :     }
   17892                 :        242 : }
   17893                 :            : 
   17894                 :            : static void
   17895                 :        242 : vteprec_tunnel_parse_remote(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   17896                 :            : {
   17897                 :        242 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17898                 :            : 
   17899         [ -  + ]:        242 :     ovs_assert(inited);
   17900         [ +  - ]:        242 :     if (datum->n >= 1) {
   17901                 :        242 :         row->remote = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
   17902                 :            :     } else {
   17903                 :          0 :         row->remote = NULL;
   17904                 :            :     }
   17905                 :        242 : }
   17906                 :            : 
   17907                 :            : static void
   17908                 :        254 : vteprec_tunnel_unparse_bfd_config_local(struct ovsdb_idl_row *row_)
   17909                 :            : {
   17910                 :        254 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17911                 :            : 
   17912         [ -  + ]:        254 :     ovs_assert(inited);
   17913                 :        254 :     smap_destroy(&row->bfd_config_local);
   17914                 :        254 : }
   17915                 :            : 
   17916                 :            : static void
   17917                 :        242 : vteprec_tunnel_unparse_bfd_config_remote(struct ovsdb_idl_row *row_)
   17918                 :            : {
   17919                 :        242 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17920                 :            : 
   17921         [ -  + ]:        242 :     ovs_assert(inited);
   17922                 :        242 :     smap_destroy(&row->bfd_config_remote);
   17923                 :        242 : }
   17924                 :            : 
   17925                 :            : static void
   17926                 :        242 : vteprec_tunnel_unparse_bfd_params(struct ovsdb_idl_row *row_)
   17927                 :            : {
   17928                 :        242 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17929                 :            : 
   17930         [ -  + ]:        242 :     ovs_assert(inited);
   17931                 :        242 :     smap_destroy(&row->bfd_params);
   17932                 :        242 : }
   17933                 :            : 
   17934                 :            : static void
   17935                 :        278 : vteprec_tunnel_unparse_bfd_status(struct ovsdb_idl_row *row_)
   17936                 :            : {
   17937                 :        278 :     struct vteprec_tunnel *row = vteprec_tunnel_cast(row_);
   17938                 :            : 
   17939         [ -  + ]:        278 :     ovs_assert(inited);
   17940                 :        278 :     smap_destroy(&row->bfd_status);
   17941                 :        278 : }
   17942                 :            : 
   17943                 :            : static void
   17944                 :        246 : vteprec_tunnel_unparse_local(struct ovsdb_idl_row *row OVS_UNUSED)
   17945                 :            : {
   17946                 :            :     /* Nothing to do. */
   17947                 :        246 : }
   17948                 :            : 
   17949                 :            : static void
   17950                 :        246 : vteprec_tunnel_unparse_remote(struct ovsdb_idl_row *row OVS_UNUSED)
   17951                 :            : {
   17952                 :            :     /* Nothing to do. */
   17953                 :        246 : }
   17954                 :            : 
   17955                 :            : static void
   17956                 :        170 : vteprec_tunnel_init__(struct ovsdb_idl_row *row)
   17957                 :            : {
   17958                 :        170 :     vteprec_tunnel_init(vteprec_tunnel_cast(row));
   17959                 :        170 : }
   17960                 :            : 
   17961                 :            : /* Clears the contents of 'row' in table "Tunnel". */
   17962                 :            : void
   17963                 :        170 : vteprec_tunnel_init(struct vteprec_tunnel *row)
   17964                 :            : {
   17965                 :        170 :     memset(row, 0, sizeof *row); 
   17966                 :        170 :     smap_init(&row->bfd_config_local);
   17967                 :        170 :     smap_init(&row->bfd_config_remote);
   17968                 :        170 :     smap_init(&row->bfd_params);
   17969                 :        170 :     smap_init(&row->bfd_status);
   17970                 :        170 : }
   17971                 :            : 
   17972                 :            : /* Searches table "Tunnel" in 'idl' for a row with UUID 'uuid'.  Returns
   17973                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   17974                 :            : const struct vteprec_tunnel *
   17975                 :          0 : vteprec_tunnel_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   17976                 :            : {
   17977                 :          0 :     return vteprec_tunnel_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], uuid));
   17978                 :            : }
   17979                 :            : 
   17980                 :            : /* Returns a row in table "Tunnel" in 'idl', or a null pointer if that
   17981                 :            :  * table is empty.
   17982                 :            :  *
   17983                 :            :  * Database tables are internally maintained as hash tables, so adding or
   17984                 :            :  * removing rows while traversing the same table can cause some rows to be
   17985                 :            :  * visited twice or not at apply. */
   17986                 :            : const struct vteprec_tunnel *
   17987                 :        484 : vteprec_tunnel_first(const struct ovsdb_idl *idl)
   17988                 :            : {
   17989                 :        484 :     return vteprec_tunnel_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL]));
   17990                 :            : }
   17991                 :            : 
   17992                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   17993                 :            :  * is the last row in its table. */
   17994                 :            : const struct vteprec_tunnel *
   17995                 :          8 : vteprec_tunnel_next(const struct vteprec_tunnel *row)
   17996                 :            : {
   17997                 :          8 :     return vteprec_tunnel_cast(ovsdb_idl_next_row(&row->header_));
   17998                 :            : }
   17999                 :            : 
   18000                 :          0 : unsigned int vteprec_tunnel_get_seqno(const struct ovsdb_idl *idl)
   18001                 :            : {
   18002                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL]);
   18003                 :            : }
   18004                 :            : 
   18005                 :          0 : unsigned int vteprec_tunnel_row_get_seqno(const struct vteprec_tunnel *row, enum ovsdb_idl_change change)
   18006                 :            : {
   18007                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   18008                 :            : }
   18009                 :            : 
   18010                 :            : const struct vteprec_tunnel *
   18011                 :          0 : vteprec_tunnel_track_get_first(const struct ovsdb_idl *idl)
   18012                 :            : {
   18013                 :          0 :     return vteprec_tunnel_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL]));
   18014                 :            : }
   18015                 :            : 
   18016                 :            : const struct vteprec_tunnel
   18017                 :          0 : *vteprec_tunnel_track_get_next(const struct vteprec_tunnel *row)
   18018                 :            : {
   18019                 :          0 :     return vteprec_tunnel_cast(ovsdb_idl_track_get_next(&row->header_));
   18020                 :            : }
   18021                 :            : 
   18022                 :            : 
   18023                 :            : /* Deletes 'row' from table "Tunnel".  'row' may be freed, so it must not be
   18024                 :            :  * accessed afterward.
   18025                 :            :  *
   18026                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18027                 :            : void
   18028                 :          0 : vteprec_tunnel_delete(const struct vteprec_tunnel *row)
   18029                 :            : {
   18030                 :          0 :     ovsdb_idl_txn_delete(&row->header_);
   18031                 :          0 : }
   18032                 :            : 
   18033                 :            : /* Inserts and returns a new row in the table "Tunnel" in the database
   18034                 :            :  * with open transaction 'txn'.
   18035                 :            :  *
   18036                 :            :  * The new row is assigned a randomly generated provisional UUID.
   18037                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   18038                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   18039                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   18040                 :            : struct vteprec_tunnel *
   18041                 :          0 : vteprec_tunnel_insert(struct ovsdb_idl_txn *txn)
   18042                 :            : {
   18043                 :          0 :     return vteprec_tunnel_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], NULL));
   18044                 :            : }
   18045                 :            : 
   18046                 :            : bool
   18047                 :          0 : vteprec_tunnel_is_updated(const struct vteprec_tunnel *row, enum vteprec_tunnel_column_id column)
   18048                 :            : {
   18049                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_tunnel_columns[column]);
   18050                 :            : }
   18051                 :            : 
   18052                 :            : /* Causes the original contents of column "bfd_config_local" in 'row' to be
   18053                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18054                 :            :  * "bfd_config_local" in 'row' changed (or if 'row' was deleted) between the
   18055                 :            :  * time that the IDL originally read its contents and the time that the
   18056                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18057                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18058                 :            :  * change has already been received).
   18059                 :            :  *
   18060                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18061                 :            :  * reads, an application should call this function any time "bfd_config_local" is
   18062                 :            :  * read as part of a read-modify-write operation.
   18063                 :            :  *
   18064                 :            :  * In some cases this function reduces to a no-op, because the current value
   18065                 :            :  * of "bfd_config_local" is already known:
   18066                 :            :  *
   18067                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18068                 :            :  *     vteprec_tunnel_insert()).
   18069                 :            :  *
   18070                 :            :  *   - If "bfd_config_local" has already been modified (with
   18071                 :            :  *     vteprec_tunnel_set_bfd_config_local()) within the current transaction.
   18072                 :            :  *
   18073                 :            :  * Because of the latter property, always call this function *before*
   18074                 :            :  * vteprec_tunnel_set_bfd_config_local() for a given read-modify-write.
   18075                 :            :  *
   18076                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18077                 :            : void
   18078                 :          0 : vteprec_tunnel_verify_bfd_config_local(const struct vteprec_tunnel *row)
   18079                 :            : {
   18080         [ #  # ]:          0 :     ovs_assert(inited);
   18081                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL]);
   18082                 :          0 : }
   18083                 :            : 
   18084                 :            : /* Causes the original contents of column "bfd_config_remote" in 'row' to be
   18085                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18086                 :            :  * "bfd_config_remote" in 'row' changed (or if 'row' was deleted) between the
   18087                 :            :  * time that the IDL originally read its contents and the time that the
   18088                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18089                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18090                 :            :  * change has already been received).
   18091                 :            :  *
   18092                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18093                 :            :  * reads, an application should call this function any time "bfd_config_remote" is
   18094                 :            :  * read as part of a read-modify-write operation.
   18095                 :            :  *
   18096                 :            :  * In some cases this function reduces to a no-op, because the current value
   18097                 :            :  * of "bfd_config_remote" is already known:
   18098                 :            :  *
   18099                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18100                 :            :  *     vteprec_tunnel_insert()).
   18101                 :            :  *
   18102                 :            :  *   - If "bfd_config_remote" has already been modified (with
   18103                 :            :  *     vteprec_tunnel_set_bfd_config_remote()) within the current transaction.
   18104                 :            :  *
   18105                 :            :  * Because of the latter property, always call this function *before*
   18106                 :            :  * vteprec_tunnel_set_bfd_config_remote() for a given read-modify-write.
   18107                 :            :  *
   18108                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18109                 :            : void
   18110                 :          0 : vteprec_tunnel_verify_bfd_config_remote(const struct vteprec_tunnel *row)
   18111                 :            : {
   18112         [ #  # ]:          0 :     ovs_assert(inited);
   18113                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE]);
   18114                 :          0 : }
   18115                 :            : 
   18116                 :            : /* Causes the original contents of column "bfd_params" in 'row' to be
   18117                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18118                 :            :  * "bfd_params" in 'row' changed (or if 'row' was deleted) between the
   18119                 :            :  * time that the IDL originally read its contents and the time that the
   18120                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18121                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18122                 :            :  * change has already been received).
   18123                 :            :  *
   18124                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18125                 :            :  * reads, an application should call this function any time "bfd_params" is
   18126                 :            :  * read as part of a read-modify-write operation.
   18127                 :            :  *
   18128                 :            :  * In some cases this function reduces to a no-op, because the current value
   18129                 :            :  * of "bfd_params" is already known:
   18130                 :            :  *
   18131                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18132                 :            :  *     vteprec_tunnel_insert()).
   18133                 :            :  *
   18134                 :            :  *   - If "bfd_params" has already been modified (with
   18135                 :            :  *     vteprec_tunnel_set_bfd_params()) within the current transaction.
   18136                 :            :  *
   18137                 :            :  * Because of the latter property, always call this function *before*
   18138                 :            :  * vteprec_tunnel_set_bfd_params() for a given read-modify-write.
   18139                 :            :  *
   18140                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18141                 :            : void
   18142                 :          0 : vteprec_tunnel_verify_bfd_params(const struct vteprec_tunnel *row)
   18143                 :            : {
   18144         [ #  # ]:          0 :     ovs_assert(inited);
   18145                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS]);
   18146                 :          0 : }
   18147                 :            : 
   18148                 :            : /* Causes the original contents of column "bfd_status" in 'row' to be
   18149                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18150                 :            :  * "bfd_status" in 'row' changed (or if 'row' was deleted) between the
   18151                 :            :  * time that the IDL originally read its contents and the time that the
   18152                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18153                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18154                 :            :  * change has already been received).
   18155                 :            :  *
   18156                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18157                 :            :  * reads, an application should call this function any time "bfd_status" is
   18158                 :            :  * read as part of a read-modify-write operation.
   18159                 :            :  *
   18160                 :            :  * In some cases this function reduces to a no-op, because the current value
   18161                 :            :  * of "bfd_status" is already known:
   18162                 :            :  *
   18163                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18164                 :            :  *     vteprec_tunnel_insert()).
   18165                 :            :  *
   18166                 :            :  *   - If "bfd_status" has already been modified (with
   18167                 :            :  *     vteprec_tunnel_set_bfd_status()) within the current transaction.
   18168                 :            :  *
   18169                 :            :  * Because of the latter property, always call this function *before*
   18170                 :            :  * vteprec_tunnel_set_bfd_status() for a given read-modify-write.
   18171                 :            :  *
   18172                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18173                 :            : void
   18174                 :          0 : vteprec_tunnel_verify_bfd_status(const struct vteprec_tunnel *row)
   18175                 :            : {
   18176         [ #  # ]:          0 :     ovs_assert(inited);
   18177                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS]);
   18178                 :          0 : }
   18179                 :            : 
   18180                 :            : /* Causes the original contents of column "local" in 'row' to be
   18181                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18182                 :            :  * "local" in 'row' changed (or if 'row' was deleted) between the
   18183                 :            :  * time that the IDL originally read its contents and the time that the
   18184                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18185                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18186                 :            :  * change has already been received).
   18187                 :            :  *
   18188                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18189                 :            :  * reads, an application should call this function any time "local" is
   18190                 :            :  * read as part of a read-modify-write operation.
   18191                 :            :  *
   18192                 :            :  * In some cases this function reduces to a no-op, because the current value
   18193                 :            :  * of "local" is already known:
   18194                 :            :  *
   18195                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18196                 :            :  *     vteprec_tunnel_insert()).
   18197                 :            :  *
   18198                 :            :  *   - If "local" has already been modified (with
   18199                 :            :  *     vteprec_tunnel_set_local()) within the current transaction.
   18200                 :            :  *
   18201                 :            :  * Because of the latter property, always call this function *before*
   18202                 :            :  * vteprec_tunnel_set_local() for a given read-modify-write.
   18203                 :            :  *
   18204                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18205                 :            : void
   18206                 :          0 : vteprec_tunnel_verify_local(const struct vteprec_tunnel *row)
   18207                 :            : {
   18208         [ #  # ]:          0 :     ovs_assert(inited);
   18209                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_LOCAL]);
   18210                 :          0 : }
   18211                 :            : 
   18212                 :            : /* Causes the original contents of column "remote" in 'row' to be
   18213                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   18214                 :            :  * "remote" in 'row' changed (or if 'row' was deleted) between the
   18215                 :            :  * time that the IDL originally read its contents and the time that the
   18216                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   18217                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   18218                 :            :  * change has already been received).
   18219                 :            :  *
   18220                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   18221                 :            :  * reads, an application should call this function any time "remote" is
   18222                 :            :  * read as part of a read-modify-write operation.
   18223                 :            :  *
   18224                 :            :  * In some cases this function reduces to a no-op, because the current value
   18225                 :            :  * of "remote" is already known:
   18226                 :            :  *
   18227                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   18228                 :            :  *     vteprec_tunnel_insert()).
   18229                 :            :  *
   18230                 :            :  *   - If "remote" has already been modified (with
   18231                 :            :  *     vteprec_tunnel_set_remote()) within the current transaction.
   18232                 :            :  *
   18233                 :            :  * Because of the latter property, always call this function *before*
   18234                 :            :  * vteprec_tunnel_set_remote() for a given read-modify-write.
   18235                 :            :  *
   18236                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   18237                 :            : void
   18238                 :          0 : vteprec_tunnel_verify_remote(const struct vteprec_tunnel *row)
   18239                 :            : {
   18240         [ #  # ]:          0 :     ovs_assert(inited);
   18241                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_REMOTE]);
   18242                 :          0 : }
   18243                 :            : 
   18244                 :            : /* Returns the "bfd_config_local" column's value from the "Tunnel" table in 'row'
   18245                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18246                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18247                 :            :  * for a given key than implementing the same operation on the "cooked"
   18248                 :            :  * form in 'row'.
   18249                 :            :  *
   18250                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   18251                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   18252                 :            :  * (This helps to avoid silent bugs if someone changes bfd_config_local's
   18253                 :            :  * type without updating the caller.)
   18254                 :            :  *
   18255                 :            :  * The caller must not modify or free the returned value.
   18256                 :            :  *
   18257                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18258                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18259                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18260                 :            :  * of it with ovsdb_datum_clone().
   18261                 :            :  *
   18262                 :            :  * This function is rarely useful, since it is easier to access the value
   18263                 :            :  * directly through the "bfd_config_local" member in vteprec_tunnel. */
   18264                 :            : const struct ovsdb_datum *
   18265                 :          0 : vteprec_tunnel_get_bfd_config_local(const struct vteprec_tunnel *row,
   18266                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   18267                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   18268                 :            : {
   18269         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   18270         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   18271                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_bfd_config_local);
   18272                 :            : }
   18273                 :            : 
   18274                 :            : /* Returns the "bfd_config_remote" column's value from the "Tunnel" table in 'row'
   18275                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18276                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18277                 :            :  * for a given key than implementing the same operation on the "cooked"
   18278                 :            :  * form in 'row'.
   18279                 :            :  *
   18280                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   18281                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   18282                 :            :  * (This helps to avoid silent bugs if someone changes bfd_config_remote's
   18283                 :            :  * type without updating the caller.)
   18284                 :            :  *
   18285                 :            :  * The caller must not modify or free the returned value.
   18286                 :            :  *
   18287                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18288                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18289                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18290                 :            :  * of it with ovsdb_datum_clone().
   18291                 :            :  *
   18292                 :            :  * This function is rarely useful, since it is easier to access the value
   18293                 :            :  * directly through the "bfd_config_remote" member in vteprec_tunnel. */
   18294                 :            : const struct ovsdb_datum *
   18295                 :          0 : vteprec_tunnel_get_bfd_config_remote(const struct vteprec_tunnel *row,
   18296                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   18297                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   18298                 :            : {
   18299         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   18300         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   18301                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_bfd_config_remote);
   18302                 :            : }
   18303                 :            : 
   18304                 :            : /* Returns the "bfd_params" column's value from the "Tunnel" table in 'row'
   18305                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18306                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18307                 :            :  * for a given key than implementing the same operation on the "cooked"
   18308                 :            :  * form in 'row'.
   18309                 :            :  *
   18310                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   18311                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   18312                 :            :  * (This helps to avoid silent bugs if someone changes bfd_params's
   18313                 :            :  * type without updating the caller.)
   18314                 :            :  *
   18315                 :            :  * The caller must not modify or free the returned value.
   18316                 :            :  *
   18317                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18318                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18319                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18320                 :            :  * of it with ovsdb_datum_clone().
   18321                 :            :  *
   18322                 :            :  * This function is rarely useful, since it is easier to access the value
   18323                 :            :  * directly through the "bfd_params" member in vteprec_tunnel. */
   18324                 :            : const struct ovsdb_datum *
   18325                 :          0 : vteprec_tunnel_get_bfd_params(const struct vteprec_tunnel *row,
   18326                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   18327                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   18328                 :            : {
   18329         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   18330         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   18331                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_bfd_params);
   18332                 :            : }
   18333                 :            : 
   18334                 :            : /* Returns the "bfd_status" column's value from the "Tunnel" table in 'row'
   18335                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18336                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18337                 :            :  * for a given key than implementing the same operation on the "cooked"
   18338                 :            :  * form in 'row'.
   18339                 :            :  *
   18340                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   18341                 :            :  * 'value_type' must be OVSDB_TYPE_STRING.
   18342                 :            :  * (This helps to avoid silent bugs if someone changes bfd_status's
   18343                 :            :  * type without updating the caller.)
   18344                 :            :  *
   18345                 :            :  * The caller must not modify or free the returned value.
   18346                 :            :  *
   18347                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18348                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18349                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18350                 :            :  * of it with ovsdb_datum_clone().
   18351                 :            :  *
   18352                 :            :  * This function is rarely useful, since it is easier to access the value
   18353                 :            :  * directly through the "bfd_status" member in vteprec_tunnel. */
   18354                 :            : const struct ovsdb_datum *
   18355                 :          0 : vteprec_tunnel_get_bfd_status(const struct vteprec_tunnel *row,
   18356                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED,
   18357                 :            :     enum ovsdb_atomic_type value_type OVS_UNUSED)
   18358                 :            : {
   18359         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   18360         [ #  # ]:          0 :     ovs_assert(value_type == OVSDB_TYPE_STRING);
   18361                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_bfd_status);
   18362                 :            : }
   18363                 :            : 
   18364                 :            : /* Returns the "local" column's value from the "Tunnel" table in 'row'
   18365                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18366                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18367                 :            :  * for a given key than implementing the same operation on the "cooked"
   18368                 :            :  * form in 'row'.
   18369                 :            :  *
   18370                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   18371                 :            :  * (This helps to avoid silent bugs if someone changes local's
   18372                 :            :  * type without updating the caller.)
   18373                 :            :  *
   18374                 :            :  * The caller must not modify or free the returned value.
   18375                 :            :  *
   18376                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18377                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18378                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18379                 :            :  * of it with ovsdb_datum_clone().
   18380                 :            :  *
   18381                 :            :  * This function is rarely useful, since it is easier to access the value
   18382                 :            :  * directly through the "local" member in vteprec_tunnel. */
   18383                 :            : const struct ovsdb_datum *
   18384                 :          0 : vteprec_tunnel_get_local(const struct vteprec_tunnel *row,
   18385                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   18386                 :            : {
   18387         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   18388                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_local);
   18389                 :            : }
   18390                 :            : 
   18391                 :            : /* Returns the "remote" column's value from the "Tunnel" table in 'row'
   18392                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   18393                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   18394                 :            :  * for a given key than implementing the same operation on the "cooked"
   18395                 :            :  * form in 'row'.
   18396                 :            :  *
   18397                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   18398                 :            :  * (This helps to avoid silent bugs if someone changes remote's
   18399                 :            :  * type without updating the caller.)
   18400                 :            :  *
   18401                 :            :  * The caller must not modify or free the returned value.
   18402                 :            :  *
   18403                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   18404                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   18405                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   18406                 :            :  * of it with ovsdb_datum_clone().
   18407                 :            :  *
   18408                 :            :  * This function is rarely useful, since it is easier to access the value
   18409                 :            :  * directly through the "remote" member in vteprec_tunnel. */
   18410                 :            : const struct ovsdb_datum *
   18411                 :          0 : vteprec_tunnel_get_remote(const struct vteprec_tunnel *row,
   18412                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   18413                 :            : {
   18414         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   18415                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_tunnel_col_remote);
   18416                 :            : }
   18417                 :            : 
   18418                 :            : /* Sets the "bfd_config_local" column's value from the "Tunnel" table in 'row'
   18419                 :            :  * to 'bfd_config_local'.
   18420                 :            :  *
   18421                 :            :  * The caller retains ownership of 'bfd_config_local' and everything in it. */
   18422                 :            : void
   18423                 :          0 : vteprec_tunnel_set_bfd_config_local(const struct vteprec_tunnel *row, const struct smap *bfd_config_local)
   18424                 :            : {
   18425                 :            :     struct ovsdb_datum datum;
   18426                 :            : 
   18427         [ #  # ]:          0 :     ovs_assert(inited);
   18428         [ #  # ]:          0 :     if (bfd_config_local) {
   18429                 :            :         struct smap_node *node;
   18430                 :            :         size_t i;
   18431                 :            : 
   18432                 :          0 :         datum.n = smap_count(bfd_config_local);
   18433                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18434                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18435                 :            : 
   18436                 :          0 :         i = 0;
   18437 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_local) {
   18438                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18439                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18440                 :          0 :             i++;
   18441                 :            :         }
   18442                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18443                 :            :     } else {
   18444                 :          0 :         ovsdb_datum_init_empty(&datum);
   18445                 :            :     }
   18446                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   18447                 :            :                         &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL],
   18448                 :            :                         &datum);
   18449                 :          0 : }
   18450                 :            : 
   18451                 :            : 
   18452                 :            : /* Sets the "bfd_config_remote" column's value from the "Tunnel" table in 'row'
   18453                 :            :  * to 'bfd_config_remote'.
   18454                 :            :  *
   18455                 :            :  * The caller retains ownership of 'bfd_config_remote' and everything in it. */
   18456                 :            : void
   18457                 :          0 : vteprec_tunnel_set_bfd_config_remote(const struct vteprec_tunnel *row, const struct smap *bfd_config_remote)
   18458                 :            : {
   18459                 :            :     struct ovsdb_datum datum;
   18460                 :            : 
   18461         [ #  # ]:          0 :     ovs_assert(inited);
   18462         [ #  # ]:          0 :     if (bfd_config_remote) {
   18463                 :            :         struct smap_node *node;
   18464                 :            :         size_t i;
   18465                 :            : 
   18466                 :          0 :         datum.n = smap_count(bfd_config_remote);
   18467                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18468                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18469                 :            : 
   18470                 :          0 :         i = 0;
   18471 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_remote) {
   18472                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18473                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18474                 :          0 :             i++;
   18475                 :            :         }
   18476                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18477                 :            :     } else {
   18478                 :          0 :         ovsdb_datum_init_empty(&datum);
   18479                 :            :     }
   18480                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   18481                 :            :                         &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE],
   18482                 :            :                         &datum);
   18483                 :          0 : }
   18484                 :            : 
   18485                 :            : 
   18486                 :            : /* Sets the "bfd_params" column's value from the "Tunnel" table in 'row'
   18487                 :            :  * to 'bfd_params'.
   18488                 :            :  *
   18489                 :            :  * The caller retains ownership of 'bfd_params' and everything in it. */
   18490                 :            : void
   18491                 :          0 : vteprec_tunnel_set_bfd_params(const struct vteprec_tunnel *row, const struct smap *bfd_params)
   18492                 :            : {
   18493                 :            :     struct ovsdb_datum datum;
   18494                 :            : 
   18495         [ #  # ]:          0 :     ovs_assert(inited);
   18496         [ #  # ]:          0 :     if (bfd_params) {
   18497                 :            :         struct smap_node *node;
   18498                 :            :         size_t i;
   18499                 :            : 
   18500                 :          0 :         datum.n = smap_count(bfd_params);
   18501                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18502                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18503                 :            : 
   18504                 :          0 :         i = 0;
   18505 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_params) {
   18506                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18507                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18508                 :          0 :             i++;
   18509                 :            :         }
   18510                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18511                 :            :     } else {
   18512                 :          0 :         ovsdb_datum_init_empty(&datum);
   18513                 :            :     }
   18514                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   18515                 :            :                         &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS],
   18516                 :            :                         &datum);
   18517                 :          0 : }
   18518                 :            : 
   18519                 :            : 
   18520                 :            : /* Sets the "bfd_status" column's value from the "Tunnel" table in 'row'
   18521                 :            :  * to 'bfd_status'.
   18522                 :            :  *
   18523                 :            :  * The caller retains ownership of 'bfd_status' and everything in it. */
   18524                 :            : void
   18525                 :          0 : vteprec_tunnel_set_bfd_status(const struct vteprec_tunnel *row, const struct smap *bfd_status)
   18526                 :            : {
   18527                 :            :     struct ovsdb_datum datum;
   18528                 :            : 
   18529         [ #  # ]:          0 :     ovs_assert(inited);
   18530         [ #  # ]:          0 :     if (bfd_status) {
   18531                 :            :         struct smap_node *node;
   18532                 :            :         size_t i;
   18533                 :            : 
   18534                 :          0 :         datum.n = smap_count(bfd_status);
   18535                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18536                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18537                 :            : 
   18538                 :          0 :         i = 0;
   18539 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_status) {
   18540                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18541                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18542                 :          0 :             i++;
   18543                 :            :         }
   18544                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18545                 :            :     } else {
   18546                 :          0 :         ovsdb_datum_init_empty(&datum);
   18547                 :            :     }
   18548                 :          0 :     ovsdb_idl_txn_write(&row->header_,
   18549                 :            :                         &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS],
   18550                 :            :                         &datum);
   18551                 :          0 : }
   18552                 :            : 
   18553                 :            : 
   18554                 :            : /* Sets the "local" column from the "Tunnel" table in 'row' to
   18555                 :            :  * 'local'.
   18556                 :            :  *
   18557                 :            :  * The caller retains ownership of the arguments. */
   18558                 :            : void
   18559                 :          0 : vteprec_tunnel_set_local(const struct vteprec_tunnel *row, const struct vteprec_physical_locator *local)
   18560                 :            : {
   18561                 :            :     struct ovsdb_datum datum;
   18562                 :            :     union ovsdb_atom key;
   18563                 :            : 
   18564         [ #  # ]:          0 :     ovs_assert(inited);
   18565                 :          0 :     datum.n = 1;
   18566                 :          0 :     datum.keys = &key;
   18567                 :          0 :     key.uuid = local->header_.uuid;
   18568                 :          0 :     datum.values = NULL;
   18569                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_LOCAL], &datum);
   18570                 :          0 : }
   18571                 :            : 
   18572                 :            : /* Sets the "remote" column from the "Tunnel" table in 'row' to
   18573                 :            :  * 'remote'.
   18574                 :            :  *
   18575                 :            :  * The caller retains ownership of the arguments. */
   18576                 :            : void
   18577                 :          0 : vteprec_tunnel_set_remote(const struct vteprec_tunnel *row, const struct vteprec_physical_locator *remote)
   18578                 :            : {
   18579                 :            :     struct ovsdb_datum datum;
   18580                 :            :     union ovsdb_atom key;
   18581                 :            : 
   18582         [ #  # ]:          0 :     ovs_assert(inited);
   18583                 :          0 :     datum.n = 1;
   18584                 :          0 :     datum.keys = &key;
   18585                 :          0 :     key.uuid = remote->header_.uuid;
   18586                 :          0 :     datum.values = NULL;
   18587                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_REMOTE], &datum);
   18588                 :          0 : }
   18589                 :            : 
   18590                 :            : /* Sets an element of the "bfd_config_local" map column from the "Tunnel" table in 'row'
   18591                 :            :  * to 'new_value' given the key value 'new_key'.
   18592                 :            :  *
   18593                 :            :  */
   18594                 :            : void
   18595                 :          0 : vteprec_tunnel_update_bfd_config_local_setkey(const struct vteprec_tunnel *row, const char *new_key, const char *new_value)
   18596                 :            : {
   18597                 :            :     struct ovsdb_datum *datum;
   18598                 :            : 
   18599         [ #  # ]:          0 :     ovs_assert(inited);
   18600                 :            : 
   18601                 :          0 :     datum = xmalloc(sizeof *datum);
   18602                 :          0 :     datum->n = 1;
   18603                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18604                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   18605                 :            : 
   18606                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   18607                 :          0 :     datum->values[0].string = xstrdup(new_value);
   18608                 :            : 
   18609                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   18610                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL],
   18611                 :            :                                     datum);
   18612                 :          0 : }
   18613                 :            : 
   18614                 :            : /* Deletes an element of the "bfd_config_local" map column from the "Tunnel" table in 'row'
   18615                 :            :  * given the key value 'delete_key'.
   18616                 :            :  *
   18617                 :            :  */
   18618                 :            : void
   18619                 :          0 : vteprec_tunnel_update_bfd_config_local_delkey(const struct vteprec_tunnel *row, const char *delete_key)
   18620                 :            : {
   18621                 :            :     struct ovsdb_datum *datum;
   18622                 :            : 
   18623         [ #  # ]:          0 :     ovs_assert(inited);
   18624                 :            : 
   18625                 :          0 :     datum = xmalloc(sizeof *datum);
   18626                 :          0 :     datum->n = 1;
   18627                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18628                 :          0 :     datum->values = NULL;
   18629                 :            : 
   18630                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   18631                 :            : 
   18632                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   18633                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL],
   18634                 :            :                                     datum);
   18635                 :          0 : }
   18636                 :            : 
   18637                 :            : /* Sets an element of the "bfd_config_remote" map column from the "Tunnel" table in 'row'
   18638                 :            :  * to 'new_value' given the key value 'new_key'.
   18639                 :            :  *
   18640                 :            :  */
   18641                 :            : void
   18642                 :          0 : vteprec_tunnel_update_bfd_config_remote_setkey(const struct vteprec_tunnel *row, const char *new_key, const char *new_value)
   18643                 :            : {
   18644                 :            :     struct ovsdb_datum *datum;
   18645                 :            : 
   18646         [ #  # ]:          0 :     ovs_assert(inited);
   18647                 :            : 
   18648                 :          0 :     datum = xmalloc(sizeof *datum);
   18649                 :          0 :     datum->n = 1;
   18650                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18651                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   18652                 :            : 
   18653                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   18654                 :          0 :     datum->values[0].string = xstrdup(new_value);
   18655                 :            : 
   18656                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   18657                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE],
   18658                 :            :                                     datum);
   18659                 :          0 : }
   18660                 :            : 
   18661                 :            : /* Deletes an element of the "bfd_config_remote" map column from the "Tunnel" table in 'row'
   18662                 :            :  * given the key value 'delete_key'.
   18663                 :            :  *
   18664                 :            :  */
   18665                 :            : void
   18666                 :          0 : vteprec_tunnel_update_bfd_config_remote_delkey(const struct vteprec_tunnel *row, const char *delete_key)
   18667                 :            : {
   18668                 :            :     struct ovsdb_datum *datum;
   18669                 :            : 
   18670         [ #  # ]:          0 :     ovs_assert(inited);
   18671                 :            : 
   18672                 :          0 :     datum = xmalloc(sizeof *datum);
   18673                 :          0 :     datum->n = 1;
   18674                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18675                 :          0 :     datum->values = NULL;
   18676                 :            : 
   18677                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   18678                 :            : 
   18679                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   18680                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE],
   18681                 :            :                                     datum);
   18682                 :          0 : }
   18683                 :            : 
   18684                 :            : /* Sets an element of the "bfd_params" map column from the "Tunnel" table in 'row'
   18685                 :            :  * to 'new_value' given the key value 'new_key'.
   18686                 :            :  *
   18687                 :            :  */
   18688                 :            : void
   18689                 :          0 : vteprec_tunnel_update_bfd_params_setkey(const struct vteprec_tunnel *row, const char *new_key, const char *new_value)
   18690                 :            : {
   18691                 :            :     struct ovsdb_datum *datum;
   18692                 :            : 
   18693         [ #  # ]:          0 :     ovs_assert(inited);
   18694                 :            : 
   18695                 :          0 :     datum = xmalloc(sizeof *datum);
   18696                 :          0 :     datum->n = 1;
   18697                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18698                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   18699                 :            : 
   18700                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   18701                 :          0 :     datum->values[0].string = xstrdup(new_value);
   18702                 :            : 
   18703                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   18704                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS],
   18705                 :            :                                     datum);
   18706                 :          0 : }
   18707                 :            : 
   18708                 :            : /* Deletes an element of the "bfd_params" map column from the "Tunnel" table in 'row'
   18709                 :            :  * given the key value 'delete_key'.
   18710                 :            :  *
   18711                 :            :  */
   18712                 :            : void
   18713                 :          0 : vteprec_tunnel_update_bfd_params_delkey(const struct vteprec_tunnel *row, const char *delete_key)
   18714                 :            : {
   18715                 :            :     struct ovsdb_datum *datum;
   18716                 :            : 
   18717         [ #  # ]:          0 :     ovs_assert(inited);
   18718                 :            : 
   18719                 :          0 :     datum = xmalloc(sizeof *datum);
   18720                 :          0 :     datum->n = 1;
   18721                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18722                 :          0 :     datum->values = NULL;
   18723                 :            : 
   18724                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   18725                 :            : 
   18726                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   18727                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS],
   18728                 :            :                                     datum);
   18729                 :          0 : }
   18730                 :            : 
   18731                 :            : /* Sets an element of the "bfd_status" map column from the "Tunnel" table in 'row'
   18732                 :            :  * to 'new_value' given the key value 'new_key'.
   18733                 :            :  *
   18734                 :            :  */
   18735                 :            : void
   18736                 :          0 : vteprec_tunnel_update_bfd_status_setkey(const struct vteprec_tunnel *row, const char *new_key, const char *new_value)
   18737                 :            : {
   18738                 :            :     struct ovsdb_datum *datum;
   18739                 :            : 
   18740         [ #  # ]:          0 :     ovs_assert(inited);
   18741                 :            : 
   18742                 :          0 :     datum = xmalloc(sizeof *datum);
   18743                 :          0 :     datum->n = 1;
   18744                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18745                 :          0 :     datum->values = xmalloc(datum->n * sizeof *datum->values);
   18746                 :            : 
   18747                 :          0 :     datum->keys[0].string = xstrdup(new_key);
   18748                 :          0 :     datum->values[0].string = xstrdup(new_value);
   18749                 :            : 
   18750                 :          0 :     ovsdb_idl_txn_write_partial_map(&row->header_,
   18751                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS],
   18752                 :            :                                     datum);
   18753                 :          0 : }
   18754                 :            : 
   18755                 :            : /* Deletes an element of the "bfd_status" map column from the "Tunnel" table in 'row'
   18756                 :            :  * given the key value 'delete_key'.
   18757                 :            :  *
   18758                 :            :  */
   18759                 :            : void
   18760                 :          0 : vteprec_tunnel_update_bfd_status_delkey(const struct vteprec_tunnel *row, const char *delete_key)
   18761                 :            : {
   18762                 :            :     struct ovsdb_datum *datum;
   18763                 :            : 
   18764         [ #  # ]:          0 :     ovs_assert(inited);
   18765                 :            : 
   18766                 :          0 :     datum = xmalloc(sizeof *datum);
   18767                 :          0 :     datum->n = 1;
   18768                 :          0 :     datum->keys = xmalloc(datum->n * sizeof *datum->keys);
   18769                 :          0 :     datum->values = NULL;
   18770                 :            : 
   18771                 :          0 :     datum->keys[0].string = xstrdup(delete_key);
   18772                 :            : 
   18773                 :          0 :     ovsdb_idl_txn_delete_partial_map(&row->header_,
   18774                 :            :                                     &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS],
   18775                 :            :                                     datum);
   18776                 :          0 : }
   18777                 :            : 
   18778                 :            : /* Sets the "bfd_config_local" column's value from the "Tunnel" table in 'row'
   18779                 :            :  * to 'bfd_config_local'.
   18780                 :            :  *
   18781                 :            :  * The caller retains ownership of 'bfd_config_local' and everything in it. */
   18782                 :            : void
   18783                 :          0 : vteprec_tunnel_add_clause_bfd_config_local(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_config_local)
   18784                 :            : {
   18785                 :            :     struct ovsdb_datum datum;
   18786                 :            : 
   18787         [ #  # ]:          0 :     ovs_assert(inited);
   18788         [ #  # ]:          0 :     if (bfd_config_local) {
   18789                 :            :         struct smap_node *node;
   18790                 :            :         size_t i;
   18791                 :            : 
   18792                 :          0 :         datum.n = smap_count(bfd_config_local);
   18793                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18794                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18795                 :            : 
   18796                 :          0 :         i = 0;
   18797 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_local) {
   18798                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18799                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18800                 :          0 :             i++;
   18801                 :            :         }
   18802                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18803                 :            :     } else {
   18804                 :          0 :         ovsdb_datum_init_empty(&datum);
   18805                 :            :     }
   18806                 :            : 
   18807                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   18808                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18809                 :            :                                    function,
   18810                 :            :                                    &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL],
   18811                 :            :                                    &datum);
   18812                 :            : 
   18813                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_config_local.type);
   18814                 :          0 : }
   18815                 :            : 
   18816                 :            : 
   18817                 :            : /* Sets the "bfd_config_remote" column's value from the "Tunnel" table in 'row'
   18818                 :            :  * to 'bfd_config_remote'.
   18819                 :            :  *
   18820                 :            :  * The caller retains ownership of 'bfd_config_remote' and everything in it. */
   18821                 :            : void
   18822                 :          0 : vteprec_tunnel_add_clause_bfd_config_remote(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_config_remote)
   18823                 :            : {
   18824                 :            :     struct ovsdb_datum datum;
   18825                 :            : 
   18826         [ #  # ]:          0 :     ovs_assert(inited);
   18827         [ #  # ]:          0 :     if (bfd_config_remote) {
   18828                 :            :         struct smap_node *node;
   18829                 :            :         size_t i;
   18830                 :            : 
   18831                 :          0 :         datum.n = smap_count(bfd_config_remote);
   18832                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18833                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18834                 :            : 
   18835                 :          0 :         i = 0;
   18836 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_remote) {
   18837                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18838                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18839                 :          0 :             i++;
   18840                 :            :         }
   18841                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18842                 :            :     } else {
   18843                 :          0 :         ovsdb_datum_init_empty(&datum);
   18844                 :            :     }
   18845                 :            : 
   18846                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   18847                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18848                 :            :                                    function,
   18849                 :            :                                    &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE],
   18850                 :            :                                    &datum);
   18851                 :            : 
   18852                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_config_remote.type);
   18853                 :          0 : }
   18854                 :            : 
   18855                 :            : 
   18856                 :            : /* Sets the "bfd_params" column's value from the "Tunnel" table in 'row'
   18857                 :            :  * to 'bfd_params'.
   18858                 :            :  *
   18859                 :            :  * The caller retains ownership of 'bfd_params' and everything in it. */
   18860                 :            : void
   18861                 :          0 : vteprec_tunnel_add_clause_bfd_params(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_params)
   18862                 :            : {
   18863                 :            :     struct ovsdb_datum datum;
   18864                 :            : 
   18865         [ #  # ]:          0 :     ovs_assert(inited);
   18866         [ #  # ]:          0 :     if (bfd_params) {
   18867                 :            :         struct smap_node *node;
   18868                 :            :         size_t i;
   18869                 :            : 
   18870                 :          0 :         datum.n = smap_count(bfd_params);
   18871                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18872                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18873                 :            : 
   18874                 :          0 :         i = 0;
   18875 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_params) {
   18876                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18877                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18878                 :          0 :             i++;
   18879                 :            :         }
   18880                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18881                 :            :     } else {
   18882                 :          0 :         ovsdb_datum_init_empty(&datum);
   18883                 :            :     }
   18884                 :            : 
   18885                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   18886                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18887                 :            :                                    function,
   18888                 :            :                                    &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS],
   18889                 :            :                                    &datum);
   18890                 :            : 
   18891                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_params.type);
   18892                 :          0 : }
   18893                 :            : 
   18894                 :            : 
   18895                 :            : /* Sets the "bfd_status" column's value from the "Tunnel" table in 'row'
   18896                 :            :  * to 'bfd_status'.
   18897                 :            :  *
   18898                 :            :  * The caller retains ownership of 'bfd_status' and everything in it. */
   18899                 :            : void
   18900                 :          0 : vteprec_tunnel_add_clause_bfd_status(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_status)
   18901                 :            : {
   18902                 :            :     struct ovsdb_datum datum;
   18903                 :            : 
   18904         [ #  # ]:          0 :     ovs_assert(inited);
   18905         [ #  # ]:          0 :     if (bfd_status) {
   18906                 :            :         struct smap_node *node;
   18907                 :            :         size_t i;
   18908                 :            : 
   18909                 :          0 :         datum.n = smap_count(bfd_status);
   18910                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   18911                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   18912                 :            : 
   18913                 :          0 :         i = 0;
   18914 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_status) {
   18915                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   18916                 :          0 :             datum.values[i].string = xstrdup(node->value);
   18917                 :          0 :             i++;
   18918                 :            :         }
   18919                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   18920                 :            :     } else {
   18921                 :          0 :         ovsdb_datum_init_empty(&datum);
   18922                 :            :     }
   18923                 :            : 
   18924                 :          0 :     ovsdb_idl_condition_add_clause(idl,
   18925                 :            :                                    &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18926                 :            :                                    function,
   18927                 :            :                                    &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS],
   18928                 :            :                                    &datum);
   18929                 :            : 
   18930                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_status.type);
   18931                 :          0 : }
   18932                 :            : 
   18933                 :            : 
   18934                 :            : /* Sets the "local" column from the "Tunnel" table in 'row' to
   18935                 :            :  * 'local'.
   18936                 :            :  *
   18937                 :            :  * The caller retains ownership of the arguments. */
   18938                 :            : void
   18939                 :          0 : vteprec_tunnel_add_clause_local(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *local)
   18940                 :            : {
   18941                 :            :     struct ovsdb_datum datum;
   18942                 :            :     union ovsdb_atom key;
   18943                 :            : 
   18944         [ #  # ]:          0 :     ovs_assert(inited);
   18945                 :          0 :     datum.n = 1;
   18946                 :          0 :     datum.keys = &key;
   18947                 :          0 :     key.uuid = *local;
   18948                 :          0 :     datum.values = NULL;
   18949                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18950                 :            :                           function,
   18951                 :            :                           &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_LOCAL],
   18952                 :            :                           &datum);
   18953                 :          0 : }
   18954                 :            : 
   18955                 :            : /* Sets the "remote" column from the "Tunnel" table in 'row' to
   18956                 :            :  * 'remote'.
   18957                 :            :  *
   18958                 :            :  * The caller retains ownership of the arguments. */
   18959                 :            : void
   18960                 :          0 : vteprec_tunnel_add_clause_remote(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *remote)
   18961                 :            : {
   18962                 :            :     struct ovsdb_datum datum;
   18963                 :            :     union ovsdb_atom key;
   18964                 :            : 
   18965         [ #  # ]:          0 :     ovs_assert(inited);
   18966                 :          0 :     datum.n = 1;
   18967                 :          0 :     datum.keys = &key;
   18968                 :          0 :     key.uuid = *remote;
   18969                 :          0 :     datum.values = NULL;
   18970                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   18971                 :            :                           function,
   18972                 :            :                           &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_REMOTE],
   18973                 :            :                           &datum);
   18974                 :          0 : }
   18975                 :            : void
   18976                 :          0 : vteprec_tunnel_add_clause_false(struct ovsdb_idl *idl)
   18977                 :            : {
   18978                 :            :     struct ovsdb_datum datum;
   18979                 :            : 
   18980                 :          0 :     ovsdb_datum_init_empty(&datum);
   18981                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], OVSDB_F_FALSE, NULL, &datum);
   18982                 :          0 : }
   18983                 :            : void
   18984                 :          0 : vteprec_tunnel_add_clause_true(struct ovsdb_idl *idl)
   18985                 :            : {
   18986                 :            :     struct ovsdb_datum datum;
   18987                 :            : 
   18988                 :          0 :     ovsdb_datum_init_empty(&datum);
   18989                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], OVSDB_F_TRUE, NULL, &datum);
   18990                 :          0 : }
   18991                 :            : 
   18992                 :            : /* Sets the "bfd_config_local" column's value from the "Tunnel" table in 'row'
   18993                 :            :  * to 'bfd_config_local'.
   18994                 :            :  *
   18995                 :            :  * The caller retains ownership of 'bfd_config_local' and everything in it. */
   18996                 :            : void
   18997                 :          0 : vteprec_tunnel_remove_clause_bfd_config_local(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_config_local)
   18998                 :            : {
   18999                 :            :     struct ovsdb_datum datum;
   19000                 :            : 
   19001         [ #  # ]:          0 :     ovs_assert(inited);
   19002         [ #  # ]:          0 :     if (bfd_config_local) {
   19003                 :            :         struct smap_node *node;
   19004                 :            :         size_t i;
   19005                 :            : 
   19006                 :          0 :         datum.n = smap_count(bfd_config_local);
   19007                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   19008                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   19009                 :            : 
   19010                 :          0 :         i = 0;
   19011 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_local) {
   19012                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   19013                 :          0 :             datum.values[i].string = xstrdup(node->value);
   19014                 :          0 :             i++;
   19015                 :            :         }
   19016                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   19017                 :            :     } else {
   19018                 :          0 :         ovsdb_datum_init_empty(&datum);
   19019                 :            :     }
   19020                 :            : 
   19021                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19022                 :            :                                       function,
   19023                 :            :                                       &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_LOCAL],
   19024                 :            :                                       &datum);
   19025                 :            : 
   19026                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_config_local.type);
   19027                 :          0 : }
   19028                 :            : 
   19029                 :            : 
   19030                 :            : /* Sets the "bfd_config_remote" column's value from the "Tunnel" table in 'row'
   19031                 :            :  * to 'bfd_config_remote'.
   19032                 :            :  *
   19033                 :            :  * The caller retains ownership of 'bfd_config_remote' and everything in it. */
   19034                 :            : void
   19035                 :          0 : vteprec_tunnel_remove_clause_bfd_config_remote(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_config_remote)
   19036                 :            : {
   19037                 :            :     struct ovsdb_datum datum;
   19038                 :            : 
   19039         [ #  # ]:          0 :     ovs_assert(inited);
   19040         [ #  # ]:          0 :     if (bfd_config_remote) {
   19041                 :            :         struct smap_node *node;
   19042                 :            :         size_t i;
   19043                 :            : 
   19044                 :          0 :         datum.n = smap_count(bfd_config_remote);
   19045                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   19046                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   19047                 :            : 
   19048                 :          0 :         i = 0;
   19049 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_config_remote) {
   19050                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   19051                 :          0 :             datum.values[i].string = xstrdup(node->value);
   19052                 :          0 :             i++;
   19053                 :            :         }
   19054                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   19055                 :            :     } else {
   19056                 :          0 :         ovsdb_datum_init_empty(&datum);
   19057                 :            :     }
   19058                 :            : 
   19059                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19060                 :            :                                       function,
   19061                 :            :                                       &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_CONFIG_REMOTE],
   19062                 :            :                                       &datum);
   19063                 :            : 
   19064                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_config_remote.type);
   19065                 :          0 : }
   19066                 :            : 
   19067                 :            : 
   19068                 :            : /* Sets the "bfd_params" column's value from the "Tunnel" table in 'row'
   19069                 :            :  * to 'bfd_params'.
   19070                 :            :  *
   19071                 :            :  * The caller retains ownership of 'bfd_params' and everything in it. */
   19072                 :            : void
   19073                 :          0 : vteprec_tunnel_remove_clause_bfd_params(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_params)
   19074                 :            : {
   19075                 :            :     struct ovsdb_datum datum;
   19076                 :            : 
   19077         [ #  # ]:          0 :     ovs_assert(inited);
   19078         [ #  # ]:          0 :     if (bfd_params) {
   19079                 :            :         struct smap_node *node;
   19080                 :            :         size_t i;
   19081                 :            : 
   19082                 :          0 :         datum.n = smap_count(bfd_params);
   19083                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   19084                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   19085                 :            : 
   19086                 :          0 :         i = 0;
   19087 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_params) {
   19088                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   19089                 :          0 :             datum.values[i].string = xstrdup(node->value);
   19090                 :          0 :             i++;
   19091                 :            :         }
   19092                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   19093                 :            :     } else {
   19094                 :          0 :         ovsdb_datum_init_empty(&datum);
   19095                 :            :     }
   19096                 :            : 
   19097                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19098                 :            :                                       function,
   19099                 :            :                                       &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_PARAMS],
   19100                 :            :                                       &datum);
   19101                 :            : 
   19102                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_params.type);
   19103                 :          0 : }
   19104                 :            : 
   19105                 :            : 
   19106                 :            : /* Sets the "bfd_status" column's value from the "Tunnel" table in 'row'
   19107                 :            :  * to 'bfd_status'.
   19108                 :            :  *
   19109                 :            :  * The caller retains ownership of 'bfd_status' and everything in it. */
   19110                 :            : void
   19111                 :          0 : vteprec_tunnel_remove_clause_bfd_status(struct ovsdb_idl *idl, enum ovsdb_function function, const struct smap *bfd_status)
   19112                 :            : {
   19113                 :            :     struct ovsdb_datum datum;
   19114                 :            : 
   19115         [ #  # ]:          0 :     ovs_assert(inited);
   19116         [ #  # ]:          0 :     if (bfd_status) {
   19117                 :            :         struct smap_node *node;
   19118                 :            :         size_t i;
   19119                 :            : 
   19120                 :          0 :         datum.n = smap_count(bfd_status);
   19121                 :          0 :         datum.keys = xmalloc(datum.n * sizeof *datum.keys);
   19122                 :          0 :         datum.values = xmalloc(datum.n * sizeof *datum.values);
   19123                 :            : 
   19124                 :          0 :         i = 0;
   19125 [ #  # ][ #  # ]:          0 :         SMAP_FOR_EACH (node, bfd_status) {
   19126                 :          0 :             datum.keys[i].string = xstrdup(node->key);
   19127                 :          0 :             datum.values[i].string = xstrdup(node->value);
   19128                 :          0 :             i++;
   19129                 :            :         }
   19130                 :          0 :         ovsdb_datum_sort_unique(&datum, OVSDB_TYPE_STRING, OVSDB_TYPE_STRING);
   19131                 :            :     } else {
   19132                 :          0 :         ovsdb_datum_init_empty(&datum);
   19133                 :            :     }
   19134                 :            : 
   19135                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19136                 :            :                                       function,
   19137                 :            :                                       &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_BFD_STATUS],
   19138                 :            :                                       &datum);
   19139                 :            : 
   19140                 :          0 :     ovsdb_datum_destroy(&datum, &vteprec_tunnel_col_bfd_status.type);
   19141                 :          0 : }
   19142                 :            : 
   19143                 :            : 
   19144                 :            : /* Sets the "local" column from the "Tunnel" table in 'row' to
   19145                 :            :  * 'local'.
   19146                 :            :  *
   19147                 :            :  * The caller retains ownership of the arguments. */
   19148                 :            : void
   19149                 :          0 : vteprec_tunnel_remove_clause_local(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *local)
   19150                 :            : {
   19151                 :            :     struct ovsdb_datum datum;
   19152                 :            :     union ovsdb_atom key;
   19153                 :            : 
   19154         [ #  # ]:          0 :     ovs_assert(inited);
   19155                 :          0 :     datum.n = 1;
   19156                 :          0 :     datum.keys = &key;
   19157                 :          0 :     key.uuid = *local;
   19158                 :          0 :     datum.values = NULL;
   19159                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19160                 :            :                           function,
   19161                 :            :                           &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_LOCAL],
   19162                 :            :                           &datum);
   19163                 :          0 : }
   19164                 :            : 
   19165                 :            : /* Sets the "remote" column from the "Tunnel" table in 'row' to
   19166                 :            :  * 'remote'.
   19167                 :            :  *
   19168                 :            :  * The caller retains ownership of the arguments. */
   19169                 :            : void
   19170                 :          0 : vteprec_tunnel_remove_clause_remote(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *remote)
   19171                 :            : {
   19172                 :            :     struct ovsdb_datum datum;
   19173                 :            :     union ovsdb_atom key;
   19174                 :            : 
   19175         [ #  # ]:          0 :     ovs_assert(inited);
   19176                 :          0 :     datum.n = 1;
   19177                 :          0 :     datum.keys = &key;
   19178                 :          0 :     key.uuid = *remote;
   19179                 :          0 :     datum.values = NULL;
   19180                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL],
   19181                 :            :                           function,
   19182                 :            :                           &vteprec_tunnel_columns[VTEPREC_TUNNEL_COL_REMOTE],
   19183                 :            :                           &datum);
   19184                 :          0 : }
   19185                 :            : void
   19186                 :          0 : vteprec_tunnel_remove_clause_false(struct ovsdb_idl *idl)
   19187                 :            : {
   19188                 :            :     struct ovsdb_datum datum;
   19189                 :            : 
   19190                 :          0 :     ovsdb_datum_init_empty(&datum);
   19191                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], OVSDB_F_FALSE, NULL, &datum);
   19192                 :          0 : }
   19193                 :            : void
   19194                 :          0 : vteprec_tunnel_remove_clause_true(struct ovsdb_idl *idl)
   19195                 :            : {
   19196                 :            :     struct ovsdb_datum datum;
   19197                 :            : 
   19198                 :          0 :     ovsdb_datum_init_empty(&datum);
   19199                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_TUNNEL], OVSDB_F_TRUE, NULL, &datum);
   19200                 :          0 : }
   19201                 :            : 
   19202                 :            : struct ovsdb_idl_column vteprec_tunnel_columns[VTEPREC_TUNNEL_N_COLUMNS];
   19203                 :            : 
   19204                 :            : static void
   19205                 :        741 : vteprec_tunnel_columns_init(void)
   19206                 :            : {
   19207                 :            :     struct ovsdb_idl_column *c;
   19208                 :            : 
   19209                 :            :     /* Initialize vteprec_tunnel_col_bfd_config_local. */
   19210                 :        741 :     c = &vteprec_tunnel_col_bfd_config_local;
   19211                 :        741 :     c->name = "bfd_config_local";
   19212                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19213                 :        741 :     c->type.key.u.string.minLen = 0;
   19214                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   19215                 :        741 :     c->type.value.u.string.minLen = 0;
   19216                 :        741 :     c->type.n_min = 0;
   19217                 :        741 :     c->type.n_max = UINT_MAX;
   19218                 :        741 :     c->mutable = true;
   19219                 :        741 :     c->parse = vteprec_tunnel_parse_bfd_config_local;
   19220                 :        741 :     c->unparse = vteprec_tunnel_unparse_bfd_config_local;
   19221                 :            : 
   19222                 :            :     /* Initialize vteprec_tunnel_col_bfd_config_remote. */
   19223                 :        741 :     c = &vteprec_tunnel_col_bfd_config_remote;
   19224                 :        741 :     c->name = "bfd_config_remote";
   19225                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19226                 :        741 :     c->type.key.u.string.minLen = 0;
   19227                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   19228                 :        741 :     c->type.value.u.string.minLen = 0;
   19229                 :        741 :     c->type.n_min = 0;
   19230                 :        741 :     c->type.n_max = UINT_MAX;
   19231                 :        741 :     c->mutable = true;
   19232                 :        741 :     c->parse = vteprec_tunnel_parse_bfd_config_remote;
   19233                 :        741 :     c->unparse = vteprec_tunnel_unparse_bfd_config_remote;
   19234                 :            : 
   19235                 :            :     /* Initialize vteprec_tunnel_col_bfd_params. */
   19236                 :        741 :     c = &vteprec_tunnel_col_bfd_params;
   19237                 :        741 :     c->name = "bfd_params";
   19238                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19239                 :        741 :     c->type.key.u.string.minLen = 0;
   19240                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   19241                 :        741 :     c->type.value.u.string.minLen = 0;
   19242                 :        741 :     c->type.n_min = 0;
   19243                 :        741 :     c->type.n_max = UINT_MAX;
   19244                 :        741 :     c->mutable = true;
   19245                 :        741 :     c->parse = vteprec_tunnel_parse_bfd_params;
   19246                 :        741 :     c->unparse = vteprec_tunnel_unparse_bfd_params;
   19247                 :            : 
   19248                 :            :     /* Initialize vteprec_tunnel_col_bfd_status. */
   19249                 :        741 :     c = &vteprec_tunnel_col_bfd_status;
   19250                 :        741 :     c->name = "bfd_status";
   19251                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19252                 :        741 :     c->type.key.u.string.minLen = 0;
   19253                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_STRING);
   19254                 :        741 :     c->type.value.u.string.minLen = 0;
   19255                 :        741 :     c->type.n_min = 0;
   19256                 :        741 :     c->type.n_max = UINT_MAX;
   19257                 :        741 :     c->mutable = true;
   19258                 :        741 :     c->parse = vteprec_tunnel_parse_bfd_status;
   19259                 :        741 :     c->unparse = vteprec_tunnel_unparse_bfd_status;
   19260                 :            : 
   19261                 :            :     /* Initialize vteprec_tunnel_col_local. */
   19262                 :        741 :     c = &vteprec_tunnel_col_local;
   19263                 :        741 :     c->name = "local";
   19264                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   19265                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
   19266                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   19267                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   19268                 :        741 :     c->type.n_min = 1;
   19269                 :        741 :     c->type.n_max = 1;
   19270                 :        741 :     c->mutable = true;
   19271                 :        741 :     c->parse = vteprec_tunnel_parse_local;
   19272                 :        741 :     c->unparse = vteprec_tunnel_unparse_local;
   19273                 :            : 
   19274                 :            :     /* Initialize vteprec_tunnel_col_remote. */
   19275                 :        741 :     c = &vteprec_tunnel_col_remote;
   19276                 :        741 :     c->name = "remote";
   19277                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   19278                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
   19279                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   19280                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   19281                 :        741 :     c->type.n_min = 1;
   19282                 :        741 :     c->type.n_max = 1;
   19283                 :        741 :     c->mutable = true;
   19284                 :        741 :     c->parse = vteprec_tunnel_parse_remote;
   19285                 :        741 :     c->unparse = vteprec_tunnel_unparse_remote;
   19286                 :        741 : }
   19287                 :            : 
   19288                 :            : /* Ucast_Macs_Local table. */
   19289                 :            : 
   19290                 :            : static void
   19291                 :        126 : vteprec_ucast_macs_local_parse_MAC(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   19292                 :            : {
   19293                 :        126 :     struct vteprec_ucast_macs_local *row = vteprec_ucast_macs_local_cast(row_);
   19294                 :            : 
   19295         [ -  + ]:        126 :     ovs_assert(inited);
   19296         [ +  - ]:        126 :     if (datum->n >= 1) {
   19297                 :        126 :         row->MAC = datum->keys[0].string;
   19298                 :            :     } else {
   19299                 :          0 :         row->MAC = "";
   19300                 :            :     }
   19301                 :        126 : }
   19302                 :            : 
   19303                 :            : static void
   19304                 :        116 : vteprec_ucast_macs_local_parse_ipaddr(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   19305                 :            : {
   19306                 :        116 :     struct vteprec_ucast_macs_local *row = vteprec_ucast_macs_local_cast(row_);
   19307                 :            : 
   19308         [ -  + ]:        116 :     ovs_assert(inited);
   19309         [ +  - ]:        116 :     if (datum->n >= 1) {
   19310                 :        116 :         row->ipaddr = datum->keys[0].string;
   19311                 :            :     } else {
   19312                 :          0 :         row->ipaddr = "";
   19313                 :            :     }
   19314                 :        116 : }
   19315                 :            : 
   19316                 :            : static void
   19317                 :        127 : vteprec_ucast_macs_local_parse_locator(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   19318                 :            : {
   19319                 :        127 :     struct vteprec_ucast_macs_local *row = vteprec_ucast_macs_local_cast(row_);
   19320                 :            : 
   19321         [ -  + ]:        127 :     ovs_assert(inited);
   19322         [ +  - ]:        127 :     if (datum->n >= 1) {
   19323                 :        127 :         row->locator = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
   19324                 :            :     } else {
   19325                 :          0 :         row->locator = NULL;
   19326                 :            :     }
   19327                 :        127 : }
   19328                 :            : 
   19329                 :            : static void
   19330                 :        126 : vteprec_ucast_macs_local_parse_logical_switch(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   19331                 :            : {
   19332                 :        126 :     struct vteprec_ucast_macs_local *row = vteprec_ucast_macs_local_cast(row_);
   19333                 :            : 
   19334         [ -  + ]:        126 :     ovs_assert(inited);
   19335         [ +  - ]:        126 :     if (datum->n >= 1) {
   19336                 :        126 :         row->logical_switch = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->keys[0].uuid));
   19337                 :            :     } else {
   19338                 :          0 :         row->logical_switch = NULL;
   19339                 :            :     }
   19340                 :        126 : }
   19341                 :            : 
   19342                 :            : static void
   19343                 :        136 : vteprec_ucast_macs_local_unparse_MAC(struct ovsdb_idl_row *row OVS_UNUSED)
   19344                 :            : {
   19345                 :            :     /* Nothing to do. */
   19346                 :        136 : }
   19347                 :            : 
   19348                 :            : static void
   19349                 :        126 : vteprec_ucast_macs_local_unparse_ipaddr(struct ovsdb_idl_row *row OVS_UNUSED)
   19350                 :            : {
   19351                 :            :     /* Nothing to do. */
   19352                 :        126 : }
   19353                 :            : 
   19354                 :            : static void
   19355                 :        137 : vteprec_ucast_macs_local_unparse_locator(struct ovsdb_idl_row *row OVS_UNUSED)
   19356                 :            : {
   19357                 :            :     /* Nothing to do. */
   19358                 :        137 : }
   19359                 :            : 
   19360                 :            : static void
   19361                 :        136 : vteprec_ucast_macs_local_unparse_logical_switch(struct ovsdb_idl_row *row OVS_UNUSED)
   19362                 :            : {
   19363                 :            :     /* Nothing to do. */
   19364                 :        136 : }
   19365                 :            : 
   19366                 :            : static void
   19367                 :         66 : vteprec_ucast_macs_local_init__(struct ovsdb_idl_row *row)
   19368                 :            : {
   19369                 :         66 :     vteprec_ucast_macs_local_init(vteprec_ucast_macs_local_cast(row));
   19370                 :         66 : }
   19371                 :            : 
   19372                 :            : /* Clears the contents of 'row' in table "Ucast_Macs_Local". */
   19373                 :            : void
   19374                 :         66 : vteprec_ucast_macs_local_init(struct vteprec_ucast_macs_local *row)
   19375                 :            : {
   19376                 :         66 :     memset(row, 0, sizeof *row); 
   19377                 :         66 : }
   19378                 :            : 
   19379                 :            : /* Searches table "Ucast_Macs_Local" in 'idl' for a row with UUID 'uuid'.  Returns
   19380                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   19381                 :            : const struct vteprec_ucast_macs_local *
   19382                 :          0 : vteprec_ucast_macs_local_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   19383                 :            : {
   19384                 :          0 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], uuid));
   19385                 :            : }
   19386                 :            : 
   19387                 :            : /* Returns a row in table "Ucast_Macs_Local" in 'idl', or a null pointer if that
   19388                 :            :  * table is empty.
   19389                 :            :  *
   19390                 :            :  * Database tables are internally maintained as hash tables, so adding or
   19391                 :            :  * removing rows while traversing the same table can cause some rows to be
   19392                 :            :  * visited twice or not at apply. */
   19393                 :            : const struct vteprec_ucast_macs_local *
   19394                 :        484 : vteprec_ucast_macs_local_first(const struct ovsdb_idl *idl)
   19395                 :            : {
   19396                 :        484 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL]));
   19397                 :            : }
   19398                 :            : 
   19399                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   19400                 :            :  * is the last row in its table. */
   19401                 :            : const struct vteprec_ucast_macs_local *
   19402                 :         45 : vteprec_ucast_macs_local_next(const struct vteprec_ucast_macs_local *row)
   19403                 :            : {
   19404                 :         45 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_next_row(&row->header_));
   19405                 :            : }
   19406                 :            : 
   19407                 :          0 : unsigned int vteprec_ucast_macs_local_get_seqno(const struct ovsdb_idl *idl)
   19408                 :            : {
   19409                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL]);
   19410                 :            : }
   19411                 :            : 
   19412                 :          0 : unsigned int vteprec_ucast_macs_local_row_get_seqno(const struct vteprec_ucast_macs_local *row, enum ovsdb_idl_change change)
   19413                 :            : {
   19414                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   19415                 :            : }
   19416                 :            : 
   19417                 :            : const struct vteprec_ucast_macs_local *
   19418                 :          0 : vteprec_ucast_macs_local_track_get_first(const struct ovsdb_idl *idl)
   19419                 :            : {
   19420                 :          0 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL]));
   19421                 :            : }
   19422                 :            : 
   19423                 :            : const struct vteprec_ucast_macs_local
   19424                 :          0 : *vteprec_ucast_macs_local_track_get_next(const struct vteprec_ucast_macs_local *row)
   19425                 :            : {
   19426                 :          0 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_track_get_next(&row->header_));
   19427                 :            : }
   19428                 :            : 
   19429                 :            : 
   19430                 :            : /* Deletes 'row' from table "Ucast_Macs_Local".  'row' may be freed, so it must not be
   19431                 :            :  * accessed afterward.
   19432                 :            :  *
   19433                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   19434                 :            : void
   19435                 :          2 : vteprec_ucast_macs_local_delete(const struct vteprec_ucast_macs_local *row)
   19436                 :            : {
   19437                 :          2 :     ovsdb_idl_txn_delete(&row->header_);
   19438                 :          2 : }
   19439                 :            : 
   19440                 :            : /* Inserts and returns a new row in the table "Ucast_Macs_Local" in the database
   19441                 :            :  * with open transaction 'txn'.
   19442                 :            :  *
   19443                 :            :  * The new row is assigned a randomly generated provisional UUID.
   19444                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   19445                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   19446                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   19447                 :            : struct vteprec_ucast_macs_local *
   19448                 :         10 : vteprec_ucast_macs_local_insert(struct ovsdb_idl_txn *txn)
   19449                 :            : {
   19450                 :         10 :     return vteprec_ucast_macs_local_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], NULL));
   19451                 :            : }
   19452                 :            : 
   19453                 :            : bool
   19454                 :          0 : vteprec_ucast_macs_local_is_updated(const struct vteprec_ucast_macs_local *row, enum vteprec_ucast_macs_local_column_id column)
   19455                 :            : {
   19456                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_ucast_macs_local_columns[column]);
   19457                 :            : }
   19458                 :            : 
   19459                 :            : /* Causes the original contents of column "MAC" in 'row' to be
   19460                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   19461                 :            :  * "MAC" in 'row' changed (or if 'row' was deleted) between the
   19462                 :            :  * time that the IDL originally read its contents and the time that the
   19463                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   19464                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   19465                 :            :  * change has already been received).
   19466                 :            :  *
   19467                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   19468                 :            :  * reads, an application should call this function any time "MAC" is
   19469                 :            :  * read as part of a read-modify-write operation.
   19470                 :            :  *
   19471                 :            :  * In some cases this function reduces to a no-op, because the current value
   19472                 :            :  * of "MAC" is already known:
   19473                 :            :  *
   19474                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   19475                 :            :  *     vteprec_ucast_macs_local_insert()).
   19476                 :            :  *
   19477                 :            :  *   - If "MAC" has already been modified (with
   19478                 :            :  *     vteprec_ucast_macs_local_set_MAC()) within the current transaction.
   19479                 :            :  *
   19480                 :            :  * Because of the latter property, always call this function *before*
   19481                 :            :  * vteprec_ucast_macs_local_set_MAC() for a given read-modify-write.
   19482                 :            :  *
   19483                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   19484                 :            : void
   19485                 :          0 : vteprec_ucast_macs_local_verify_MAC(const struct vteprec_ucast_macs_local *row)
   19486                 :            : {
   19487         [ #  # ]:          0 :     ovs_assert(inited);
   19488                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_MAC]);
   19489                 :          0 : }
   19490                 :            : 
   19491                 :            : /* Causes the original contents of column "ipaddr" in 'row' to be
   19492                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   19493                 :            :  * "ipaddr" in 'row' changed (or if 'row' was deleted) between the
   19494                 :            :  * time that the IDL originally read its contents and the time that the
   19495                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   19496                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   19497                 :            :  * change has already been received).
   19498                 :            :  *
   19499                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   19500                 :            :  * reads, an application should call this function any time "ipaddr" is
   19501                 :            :  * read as part of a read-modify-write operation.
   19502                 :            :  *
   19503                 :            :  * In some cases this function reduces to a no-op, because the current value
   19504                 :            :  * of "ipaddr" is already known:
   19505                 :            :  *
   19506                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   19507                 :            :  *     vteprec_ucast_macs_local_insert()).
   19508                 :            :  *
   19509                 :            :  *   - If "ipaddr" has already been modified (with
   19510                 :            :  *     vteprec_ucast_macs_local_set_ipaddr()) within the current transaction.
   19511                 :            :  *
   19512                 :            :  * Because of the latter property, always call this function *before*
   19513                 :            :  * vteprec_ucast_macs_local_set_ipaddr() for a given read-modify-write.
   19514                 :            :  *
   19515                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   19516                 :            : void
   19517                 :          0 : vteprec_ucast_macs_local_verify_ipaddr(const struct vteprec_ucast_macs_local *row)
   19518                 :            : {
   19519         [ #  # ]:          0 :     ovs_assert(inited);
   19520                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_IPADDR]);
   19521                 :          0 : }
   19522                 :            : 
   19523                 :            : /* Causes the original contents of column "locator" in 'row' to be
   19524                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   19525                 :            :  * "locator" in 'row' changed (or if 'row' was deleted) between the
   19526                 :            :  * time that the IDL originally read its contents and the time that the
   19527                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   19528                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   19529                 :            :  * change has already been received).
   19530                 :            :  *
   19531                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   19532                 :            :  * reads, an application should call this function any time "locator" is
   19533                 :            :  * read as part of a read-modify-write operation.
   19534                 :            :  *
   19535                 :            :  * In some cases this function reduces to a no-op, because the current value
   19536                 :            :  * of "locator" is already known:
   19537                 :            :  *
   19538                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   19539                 :            :  *     vteprec_ucast_macs_local_insert()).
   19540                 :            :  *
   19541                 :            :  *   - If "locator" has already been modified (with
   19542                 :            :  *     vteprec_ucast_macs_local_set_locator()) within the current transaction.
   19543                 :            :  *
   19544                 :            :  * Because of the latter property, always call this function *before*
   19545                 :            :  * vteprec_ucast_macs_local_set_locator() for a given read-modify-write.
   19546                 :            :  *
   19547                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   19548                 :            : void
   19549                 :          0 : vteprec_ucast_macs_local_verify_locator(const struct vteprec_ucast_macs_local *row)
   19550                 :            : {
   19551         [ #  # ]:          0 :     ovs_assert(inited);
   19552                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOCATOR]);
   19553                 :          0 : }
   19554                 :            : 
   19555                 :            : /* Causes the original contents of column "logical_switch" in 'row' to be
   19556                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   19557                 :            :  * "logical_switch" in 'row' changed (or if 'row' was deleted) between the
   19558                 :            :  * time that the IDL originally read its contents and the time that the
   19559                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   19560                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   19561                 :            :  * change has already been received).
   19562                 :            :  *
   19563                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   19564                 :            :  * reads, an application should call this function any time "logical_switch" is
   19565                 :            :  * read as part of a read-modify-write operation.
   19566                 :            :  *
   19567                 :            :  * In some cases this function reduces to a no-op, because the current value
   19568                 :            :  * of "logical_switch" is already known:
   19569                 :            :  *
   19570                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   19571                 :            :  *     vteprec_ucast_macs_local_insert()).
   19572                 :            :  *
   19573                 :            :  *   - If "logical_switch" has already been modified (with
   19574                 :            :  *     vteprec_ucast_macs_local_set_logical_switch()) within the current transaction.
   19575                 :            :  *
   19576                 :            :  * Because of the latter property, always call this function *before*
   19577                 :            :  * vteprec_ucast_macs_local_set_logical_switch() for a given read-modify-write.
   19578                 :            :  *
   19579                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   19580                 :            : void
   19581                 :          0 : vteprec_ucast_macs_local_verify_logical_switch(const struct vteprec_ucast_macs_local *row)
   19582                 :            : {
   19583         [ #  # ]:          0 :     ovs_assert(inited);
   19584                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOGICAL_SWITCH]);
   19585                 :          0 : }
   19586                 :            : 
   19587                 :            : /* Returns the "MAC" column's value from the "Ucast_Macs_Local" table in 'row'
   19588                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   19589                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   19590                 :            :  * for a given key than implementing the same operation on the "cooked"
   19591                 :            :  * form in 'row'.
   19592                 :            :  *
   19593                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   19594                 :            :  * (This helps to avoid silent bugs if someone changes MAC's
   19595                 :            :  * type without updating the caller.)
   19596                 :            :  *
   19597                 :            :  * The caller must not modify or free the returned value.
   19598                 :            :  *
   19599                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   19600                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   19601                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   19602                 :            :  * of it with ovsdb_datum_clone().
   19603                 :            :  *
   19604                 :            :  * This function is rarely useful, since it is easier to access the value
   19605                 :            :  * directly through the "MAC" member in vteprec_ucast_macs_local. */
   19606                 :            : const struct ovsdb_datum *
   19607                 :          0 : vteprec_ucast_macs_local_get_MAC(const struct vteprec_ucast_macs_local *row,
   19608                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   19609                 :            : {
   19610         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   19611                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_local_col_MAC);
   19612                 :            : }
   19613                 :            : 
   19614                 :            : /* Returns the "ipaddr" column's value from the "Ucast_Macs_Local" table in 'row'
   19615                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   19616                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   19617                 :            :  * for a given key than implementing the same operation on the "cooked"
   19618                 :            :  * form in 'row'.
   19619                 :            :  *
   19620                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   19621                 :            :  * (This helps to avoid silent bugs if someone changes ipaddr's
   19622                 :            :  * type without updating the caller.)
   19623                 :            :  *
   19624                 :            :  * The caller must not modify or free the returned value.
   19625                 :            :  *
   19626                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   19627                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   19628                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   19629                 :            :  * of it with ovsdb_datum_clone().
   19630                 :            :  *
   19631                 :            :  * This function is rarely useful, since it is easier to access the value
   19632                 :            :  * directly through the "ipaddr" member in vteprec_ucast_macs_local. */
   19633                 :            : const struct ovsdb_datum *
   19634                 :          0 : vteprec_ucast_macs_local_get_ipaddr(const struct vteprec_ucast_macs_local *row,
   19635                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   19636                 :            : {
   19637         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   19638                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_local_col_ipaddr);
   19639                 :            : }
   19640                 :            : 
   19641                 :            : /* Returns the "locator" column's value from the "Ucast_Macs_Local" table in 'row'
   19642                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   19643                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   19644                 :            :  * for a given key than implementing the same operation on the "cooked"
   19645                 :            :  * form in 'row'.
   19646                 :            :  *
   19647                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   19648                 :            :  * (This helps to avoid silent bugs if someone changes locator's
   19649                 :            :  * type without updating the caller.)
   19650                 :            :  *
   19651                 :            :  * The caller must not modify or free the returned value.
   19652                 :            :  *
   19653                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   19654                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   19655                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   19656                 :            :  * of it with ovsdb_datum_clone().
   19657                 :            :  *
   19658                 :            :  * This function is rarely useful, since it is easier to access the value
   19659                 :            :  * directly through the "locator" member in vteprec_ucast_macs_local. */
   19660                 :            : const struct ovsdb_datum *
   19661                 :          0 : vteprec_ucast_macs_local_get_locator(const struct vteprec_ucast_macs_local *row,
   19662                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   19663                 :            : {
   19664         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   19665                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_local_col_locator);
   19666                 :            : }
   19667                 :            : 
   19668                 :            : /* Returns the "logical_switch" column's value from the "Ucast_Macs_Local" table in 'row'
   19669                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   19670                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   19671                 :            :  * for a given key than implementing the same operation on the "cooked"
   19672                 :            :  * form in 'row'.
   19673                 :            :  *
   19674                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   19675                 :            :  * (This helps to avoid silent bugs if someone changes logical_switch's
   19676                 :            :  * type without updating the caller.)
   19677                 :            :  *
   19678                 :            :  * The caller must not modify or free the returned value.
   19679                 :            :  *
   19680                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   19681                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   19682                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   19683                 :            :  * of it with ovsdb_datum_clone().
   19684                 :            :  *
   19685                 :            :  * This function is rarely useful, since it is easier to access the value
   19686                 :            :  * directly through the "logical_switch" member in vteprec_ucast_macs_local. */
   19687                 :            : const struct ovsdb_datum *
   19688                 :          0 : vteprec_ucast_macs_local_get_logical_switch(const struct vteprec_ucast_macs_local *row,
   19689                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   19690                 :            : {
   19691         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   19692                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_local_col_logical_switch);
   19693                 :            : }
   19694                 :            : 
   19695                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Local" table in 'row' to
   19696                 :            :  * 'MAC'.
   19697                 :            :  *
   19698                 :            :  * The caller retains ownership of the arguments. */
   19699                 :            : void
   19700                 :         10 : vteprec_ucast_macs_local_set_MAC(const struct vteprec_ucast_macs_local *row, const char *MAC)
   19701                 :            : {
   19702                 :            :     struct ovsdb_datum datum;
   19703                 :            :     union ovsdb_atom key;
   19704                 :            : 
   19705         [ -  + ]:         10 :     ovs_assert(inited);
   19706                 :         10 :     datum.n = 1;
   19707                 :         10 :     datum.keys = &key;
   19708                 :         10 :     key.string = CONST_CAST(char *, MAC);
   19709                 :         10 :     datum.values = NULL;
   19710                 :         10 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_MAC], &datum);
   19711                 :         10 : }
   19712                 :            : 
   19713                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Local" table in 'row' to
   19714                 :            :  * 'ipaddr'.
   19715                 :            :  *
   19716                 :            :  * The caller retains ownership of the arguments. */
   19717                 :            : void
   19718                 :          0 : vteprec_ucast_macs_local_set_ipaddr(const struct vteprec_ucast_macs_local *row, const char *ipaddr)
   19719                 :            : {
   19720                 :            :     struct ovsdb_datum datum;
   19721                 :            :     union ovsdb_atom key;
   19722                 :            : 
   19723         [ #  # ]:          0 :     ovs_assert(inited);
   19724                 :          0 :     datum.n = 1;
   19725                 :          0 :     datum.keys = &key;
   19726                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   19727                 :          0 :     datum.values = NULL;
   19728                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_IPADDR], &datum);
   19729                 :          0 : }
   19730                 :            : 
   19731                 :            : /* Sets the "locator" column from the "Ucast_Macs_Local" table in 'row' to
   19732                 :            :  * 'locator'.
   19733                 :            :  *
   19734                 :            :  * The caller retains ownership of the arguments. */
   19735                 :            : void
   19736                 :         11 : vteprec_ucast_macs_local_set_locator(const struct vteprec_ucast_macs_local *row, const struct vteprec_physical_locator *locator)
   19737                 :            : {
   19738                 :            :     struct ovsdb_datum datum;
   19739                 :            :     union ovsdb_atom key;
   19740                 :            : 
   19741         [ -  + ]:         11 :     ovs_assert(inited);
   19742                 :         11 :     datum.n = 1;
   19743                 :         11 :     datum.keys = &key;
   19744                 :         11 :     key.uuid = locator->header_.uuid;
   19745                 :         11 :     datum.values = NULL;
   19746                 :         11 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOCATOR], &datum);
   19747                 :         11 : }
   19748                 :            : 
   19749                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Local" table in 'row' to
   19750                 :            :  * 'logical_switch'.
   19751                 :            :  *
   19752                 :            :  * The caller retains ownership of the arguments. */
   19753                 :            : void
   19754                 :         10 : vteprec_ucast_macs_local_set_logical_switch(const struct vteprec_ucast_macs_local *row, const struct vteprec_logical_switch *logical_switch)
   19755                 :            : {
   19756                 :            :     struct ovsdb_datum datum;
   19757                 :            :     union ovsdb_atom key;
   19758                 :            : 
   19759         [ -  + ]:         10 :     ovs_assert(inited);
   19760                 :         10 :     datum.n = 1;
   19761                 :         10 :     datum.keys = &key;
   19762                 :         10 :     key.uuid = logical_switch->header_.uuid;
   19763                 :         10 :     datum.values = NULL;
   19764                 :         10 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOGICAL_SWITCH], &datum);
   19765                 :         10 : }
   19766                 :            : 
   19767                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Local" table in 'row' to
   19768                 :            :  * 'MAC'.
   19769                 :            :  *
   19770                 :            :  * The caller retains ownership of the arguments. */
   19771                 :            : void
   19772                 :          0 : vteprec_ucast_macs_local_add_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   19773                 :            : {
   19774                 :            :     struct ovsdb_datum datum;
   19775                 :            :     union ovsdb_atom key;
   19776                 :            : 
   19777         [ #  # ]:          0 :     ovs_assert(inited);
   19778                 :          0 :     datum.n = 1;
   19779                 :          0 :     datum.keys = &key;
   19780                 :          0 :     key.string = CONST_CAST(char *, MAC);
   19781                 :          0 :     datum.values = NULL;
   19782                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19783                 :            :                           function,
   19784                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_MAC],
   19785                 :            :                           &datum);
   19786                 :          0 : }
   19787                 :            : 
   19788                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Local" table in 'row' to
   19789                 :            :  * 'ipaddr'.
   19790                 :            :  *
   19791                 :            :  * The caller retains ownership of the arguments. */
   19792                 :            : void
   19793                 :          0 : vteprec_ucast_macs_local_add_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   19794                 :            : {
   19795                 :            :     struct ovsdb_datum datum;
   19796                 :            :     union ovsdb_atom key;
   19797                 :            : 
   19798         [ #  # ]:          0 :     ovs_assert(inited);
   19799                 :          0 :     datum.n = 1;
   19800                 :          0 :     datum.keys = &key;
   19801                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   19802                 :          0 :     datum.values = NULL;
   19803                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19804                 :            :                           function,
   19805                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_IPADDR],
   19806                 :            :                           &datum);
   19807                 :          0 : }
   19808                 :            : 
   19809                 :            : /* Sets the "locator" column from the "Ucast_Macs_Local" table in 'row' to
   19810                 :            :  * 'locator'.
   19811                 :            :  *
   19812                 :            :  * The caller retains ownership of the arguments. */
   19813                 :            : void
   19814                 :          0 : vteprec_ucast_macs_local_add_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
   19815                 :            : {
   19816                 :            :     struct ovsdb_datum datum;
   19817                 :            :     union ovsdb_atom key;
   19818                 :            : 
   19819         [ #  # ]:          0 :     ovs_assert(inited);
   19820                 :          0 :     datum.n = 1;
   19821                 :          0 :     datum.keys = &key;
   19822                 :          0 :     key.uuid = *locator;
   19823                 :          0 :     datum.values = NULL;
   19824                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19825                 :            :                           function,
   19826                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOCATOR],
   19827                 :            :                           &datum);
   19828                 :          0 : }
   19829                 :            : 
   19830                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Local" table in 'row' to
   19831                 :            :  * 'logical_switch'.
   19832                 :            :  *
   19833                 :            :  * The caller retains ownership of the arguments. */
   19834                 :            : void
   19835                 :          0 : vteprec_ucast_macs_local_add_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   19836                 :            : {
   19837                 :            :     struct ovsdb_datum datum;
   19838                 :            :     union ovsdb_atom key;
   19839                 :            : 
   19840         [ #  # ]:          0 :     ovs_assert(inited);
   19841                 :          0 :     datum.n = 1;
   19842                 :          0 :     datum.keys = &key;
   19843                 :          0 :     key.uuid = *logical_switch;
   19844                 :          0 :     datum.values = NULL;
   19845                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19846                 :            :                           function,
   19847                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOGICAL_SWITCH],
   19848                 :            :                           &datum);
   19849                 :          0 : }
   19850                 :            : void
   19851                 :          0 : vteprec_ucast_macs_local_add_clause_false(struct ovsdb_idl *idl)
   19852                 :            : {
   19853                 :            :     struct ovsdb_datum datum;
   19854                 :            : 
   19855                 :          0 :     ovsdb_datum_init_empty(&datum);
   19856                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], OVSDB_F_FALSE, NULL, &datum);
   19857                 :          0 : }
   19858                 :            : void
   19859                 :          0 : vteprec_ucast_macs_local_add_clause_true(struct ovsdb_idl *idl)
   19860                 :            : {
   19861                 :            :     struct ovsdb_datum datum;
   19862                 :            : 
   19863                 :          0 :     ovsdb_datum_init_empty(&datum);
   19864                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], OVSDB_F_TRUE, NULL, &datum);
   19865                 :          0 : }
   19866                 :            : 
   19867                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Local" table in 'row' to
   19868                 :            :  * 'MAC'.
   19869                 :            :  *
   19870                 :            :  * The caller retains ownership of the arguments. */
   19871                 :            : void
   19872                 :          0 : vteprec_ucast_macs_local_remove_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   19873                 :            : {
   19874                 :            :     struct ovsdb_datum datum;
   19875                 :            :     union ovsdb_atom key;
   19876                 :            : 
   19877         [ #  # ]:          0 :     ovs_assert(inited);
   19878                 :          0 :     datum.n = 1;
   19879                 :          0 :     datum.keys = &key;
   19880                 :          0 :     key.string = CONST_CAST(char *, MAC);
   19881                 :          0 :     datum.values = NULL;
   19882                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19883                 :            :                           function,
   19884                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_MAC],
   19885                 :            :                           &datum);
   19886                 :          0 : }
   19887                 :            : 
   19888                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Local" table in 'row' to
   19889                 :            :  * 'ipaddr'.
   19890                 :            :  *
   19891                 :            :  * The caller retains ownership of the arguments. */
   19892                 :            : void
   19893                 :          0 : vteprec_ucast_macs_local_remove_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   19894                 :            : {
   19895                 :            :     struct ovsdb_datum datum;
   19896                 :            :     union ovsdb_atom key;
   19897                 :            : 
   19898         [ #  # ]:          0 :     ovs_assert(inited);
   19899                 :          0 :     datum.n = 1;
   19900                 :          0 :     datum.keys = &key;
   19901                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   19902                 :          0 :     datum.values = NULL;
   19903                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19904                 :            :                           function,
   19905                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_IPADDR],
   19906                 :            :                           &datum);
   19907                 :          0 : }
   19908                 :            : 
   19909                 :            : /* Sets the "locator" column from the "Ucast_Macs_Local" table in 'row' to
   19910                 :            :  * 'locator'.
   19911                 :            :  *
   19912                 :            :  * The caller retains ownership of the arguments. */
   19913                 :            : void
   19914                 :          0 : vteprec_ucast_macs_local_remove_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
   19915                 :            : {
   19916                 :            :     struct ovsdb_datum datum;
   19917                 :            :     union ovsdb_atom key;
   19918                 :            : 
   19919         [ #  # ]:          0 :     ovs_assert(inited);
   19920                 :          0 :     datum.n = 1;
   19921                 :          0 :     datum.keys = &key;
   19922                 :          0 :     key.uuid = *locator;
   19923                 :          0 :     datum.values = NULL;
   19924                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19925                 :            :                           function,
   19926                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOCATOR],
   19927                 :            :                           &datum);
   19928                 :          0 : }
   19929                 :            : 
   19930                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Local" table in 'row' to
   19931                 :            :  * 'logical_switch'.
   19932                 :            :  *
   19933                 :            :  * The caller retains ownership of the arguments. */
   19934                 :            : void
   19935                 :          0 : vteprec_ucast_macs_local_remove_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   19936                 :            : {
   19937                 :            :     struct ovsdb_datum datum;
   19938                 :            :     union ovsdb_atom key;
   19939                 :            : 
   19940         [ #  # ]:          0 :     ovs_assert(inited);
   19941                 :          0 :     datum.n = 1;
   19942                 :          0 :     datum.keys = &key;
   19943                 :          0 :     key.uuid = *logical_switch;
   19944                 :          0 :     datum.values = NULL;
   19945                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL],
   19946                 :            :                           function,
   19947                 :            :                           &vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_COL_LOGICAL_SWITCH],
   19948                 :            :                           &datum);
   19949                 :          0 : }
   19950                 :            : void
   19951                 :          0 : vteprec_ucast_macs_local_remove_clause_false(struct ovsdb_idl *idl)
   19952                 :            : {
   19953                 :            :     struct ovsdb_datum datum;
   19954                 :            : 
   19955                 :          0 :     ovsdb_datum_init_empty(&datum);
   19956                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], OVSDB_F_FALSE, NULL, &datum);
   19957                 :          0 : }
   19958                 :            : void
   19959                 :          0 : vteprec_ucast_macs_local_remove_clause_true(struct ovsdb_idl *idl)
   19960                 :            : {
   19961                 :            :     struct ovsdb_datum datum;
   19962                 :            : 
   19963                 :          0 :     ovsdb_datum_init_empty(&datum);
   19964                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_LOCAL], OVSDB_F_TRUE, NULL, &datum);
   19965                 :          0 : }
   19966                 :            : 
   19967                 :            : struct ovsdb_idl_column vteprec_ucast_macs_local_columns[VTEPREC_UCAST_MACS_LOCAL_N_COLUMNS];
   19968                 :            : 
   19969                 :            : static void
   19970                 :        741 : vteprec_ucast_macs_local_columns_init(void)
   19971                 :            : {
   19972                 :            :     struct ovsdb_idl_column *c;
   19973                 :            : 
   19974                 :            :     /* Initialize vteprec_ucast_macs_local_col_MAC. */
   19975                 :        741 :     c = &vteprec_ucast_macs_local_col_MAC;
   19976                 :        741 :     c->name = "MAC";
   19977                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19978                 :        741 :     c->type.key.u.string.minLen = 0;
   19979                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   19980                 :        741 :     c->type.n_min = 1;
   19981                 :        741 :     c->type.n_max = 1;
   19982                 :        741 :     c->mutable = true;
   19983                 :        741 :     c->parse = vteprec_ucast_macs_local_parse_MAC;
   19984                 :        741 :     c->unparse = vteprec_ucast_macs_local_unparse_MAC;
   19985                 :            : 
   19986                 :            :     /* Initialize vteprec_ucast_macs_local_col_ipaddr. */
   19987                 :        741 :     c = &vteprec_ucast_macs_local_col_ipaddr;
   19988                 :        741 :     c->name = "ipaddr";
   19989                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   19990                 :        741 :     c->type.key.u.string.minLen = 0;
   19991                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   19992                 :        741 :     c->type.n_min = 1;
   19993                 :        741 :     c->type.n_max = 1;
   19994                 :        741 :     c->mutable = true;
   19995                 :        741 :     c->parse = vteprec_ucast_macs_local_parse_ipaddr;
   19996                 :        741 :     c->unparse = vteprec_ucast_macs_local_unparse_ipaddr;
   19997                 :            : 
   19998                 :            :     /* Initialize vteprec_ucast_macs_local_col_locator. */
   19999                 :        741 :     c = &vteprec_ucast_macs_local_col_locator;
   20000                 :        741 :     c->name = "locator";
   20001                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   20002                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
   20003                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   20004                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20005                 :        741 :     c->type.n_min = 1;
   20006                 :        741 :     c->type.n_max = 1;
   20007                 :        741 :     c->mutable = true;
   20008                 :        741 :     c->parse = vteprec_ucast_macs_local_parse_locator;
   20009                 :        741 :     c->unparse = vteprec_ucast_macs_local_unparse_locator;
   20010                 :            : 
   20011                 :            :     /* Initialize vteprec_ucast_macs_local_col_logical_switch. */
   20012                 :        741 :     c = &vteprec_ucast_macs_local_col_logical_switch;
   20013                 :        741 :     c->name = "logical_switch";
   20014                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   20015                 :        741 :     c->type.key.u.uuid.refTableName = "Logical_Switch";
   20016                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   20017                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20018                 :        741 :     c->type.n_min = 1;
   20019                 :        741 :     c->type.n_max = 1;
   20020                 :        741 :     c->mutable = true;
   20021                 :        741 :     c->parse = vteprec_ucast_macs_local_parse_logical_switch;
   20022                 :        741 :     c->unparse = vteprec_ucast_macs_local_unparse_logical_switch;
   20023                 :        741 : }
   20024                 :            : 
   20025                 :            : /* Ucast_Macs_Remote table. */
   20026                 :            : 
   20027                 :            : static void
   20028                 :        244 : vteprec_ucast_macs_remote_parse_MAC(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   20029                 :            : {
   20030                 :        244 :     struct vteprec_ucast_macs_remote *row = vteprec_ucast_macs_remote_cast(row_);
   20031                 :            : 
   20032         [ -  + ]:        244 :     ovs_assert(inited);
   20033         [ +  - ]:        244 :     if (datum->n >= 1) {
   20034                 :        244 :         row->MAC = datum->keys[0].string;
   20035                 :            :     } else {
   20036                 :          0 :         row->MAC = "";
   20037                 :            :     }
   20038                 :        244 : }
   20039                 :            : 
   20040                 :            : static void
   20041                 :        229 : vteprec_ucast_macs_remote_parse_ipaddr(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   20042                 :            : {
   20043                 :        229 :     struct vteprec_ucast_macs_remote *row = vteprec_ucast_macs_remote_cast(row_);
   20044                 :            : 
   20045         [ -  + ]:        229 :     ovs_assert(inited);
   20046         [ +  - ]:        229 :     if (datum->n >= 1) {
   20047                 :        229 :         row->ipaddr = datum->keys[0].string;
   20048                 :            :     } else {
   20049                 :          0 :         row->ipaddr = "";
   20050                 :            :     }
   20051                 :        229 : }
   20052                 :            : 
   20053                 :            : static void
   20054                 :        245 : vteprec_ucast_macs_remote_parse_locator(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   20055                 :            : {
   20056                 :        245 :     struct vteprec_ucast_macs_remote *row = vteprec_ucast_macs_remote_cast(row_);
   20057                 :            : 
   20058         [ -  + ]:        245 :     ovs_assert(inited);
   20059         [ +  - ]:        245 :     if (datum->n >= 1) {
   20060                 :        245 :         row->locator = vteprec_physical_locator_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_PHYSICAL_LOCATOR], &datum->keys[0].uuid));
   20061                 :            :     } else {
   20062                 :          0 :         row->locator = NULL;
   20063                 :            :     }
   20064                 :        245 : }
   20065                 :            : 
   20066                 :            : static void
   20067                 :        244 : vteprec_ucast_macs_remote_parse_logical_switch(struct ovsdb_idl_row *row_, const struct ovsdb_datum *datum)
   20068                 :            : {
   20069                 :        244 :     struct vteprec_ucast_macs_remote *row = vteprec_ucast_macs_remote_cast(row_);
   20070                 :            : 
   20071         [ -  + ]:        244 :     ovs_assert(inited);
   20072         [ +  - ]:        244 :     if (datum->n >= 1) {
   20073                 :        244 :         row->logical_switch = vteprec_logical_switch_cast(ovsdb_idl_get_row_arc(row_, &vteprec_table_classes[VTEPREC_TABLE_LOGICAL_SWITCH], &datum->keys[0].uuid));
   20074                 :            :     } else {
   20075                 :          0 :         row->logical_switch = NULL;
   20076                 :            :     }
   20077                 :        244 : }
   20078                 :            : 
   20079                 :            : static void
   20080                 :        259 : vteprec_ucast_macs_remote_unparse_MAC(struct ovsdb_idl_row *row OVS_UNUSED)
   20081                 :            : {
   20082                 :            :     /* Nothing to do. */
   20083                 :        259 : }
   20084                 :            : 
   20085                 :            : static void
   20086                 :        244 : vteprec_ucast_macs_remote_unparse_ipaddr(struct ovsdb_idl_row *row OVS_UNUSED)
   20087                 :            : {
   20088                 :            :     /* Nothing to do. */
   20089                 :        244 : }
   20090                 :            : 
   20091                 :            : static void
   20092                 :        260 : vteprec_ucast_macs_remote_unparse_locator(struct ovsdb_idl_row *row OVS_UNUSED)
   20093                 :            : {
   20094                 :            :     /* Nothing to do. */
   20095                 :        260 : }
   20096                 :            : 
   20097                 :            : static void
   20098                 :        259 : vteprec_ucast_macs_remote_unparse_logical_switch(struct ovsdb_idl_row *row OVS_UNUSED)
   20099                 :            : {
   20100                 :            :     /* Nothing to do. */
   20101                 :        259 : }
   20102                 :            : 
   20103                 :            : static void
   20104                 :        111 : vteprec_ucast_macs_remote_init__(struct ovsdb_idl_row *row)
   20105                 :            : {
   20106                 :        111 :     vteprec_ucast_macs_remote_init(vteprec_ucast_macs_remote_cast(row));
   20107                 :        111 : }
   20108                 :            : 
   20109                 :            : /* Clears the contents of 'row' in table "Ucast_Macs_Remote". */
   20110                 :            : void
   20111                 :        111 : vteprec_ucast_macs_remote_init(struct vteprec_ucast_macs_remote *row)
   20112                 :            : {
   20113                 :        111 :     memset(row, 0, sizeof *row); 
   20114                 :        111 : }
   20115                 :            : 
   20116                 :            : /* Searches table "Ucast_Macs_Remote" in 'idl' for a row with UUID 'uuid'.  Returns
   20117                 :            :  * a pointer to the row if there is one, otherwise a null pointer.  */
   20118                 :            : const struct vteprec_ucast_macs_remote *
   20119                 :          0 : vteprec_ucast_macs_remote_get_for_uuid(const struct ovsdb_idl *idl, const struct uuid *uuid)
   20120                 :            : {
   20121                 :          0 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_get_row_for_uuid(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], uuid));
   20122                 :            : }
   20123                 :            : 
   20124                 :            : /* Returns a row in table "Ucast_Macs_Remote" in 'idl', or a null pointer if that
   20125                 :            :  * table is empty.
   20126                 :            :  *
   20127                 :            :  * Database tables are internally maintained as hash tables, so adding or
   20128                 :            :  * removing rows while traversing the same table can cause some rows to be
   20129                 :            :  * visited twice or not at apply. */
   20130                 :            : const struct vteprec_ucast_macs_remote *
   20131                 :        719 : vteprec_ucast_macs_remote_first(const struct ovsdb_idl *idl)
   20132                 :            : {
   20133                 :        719 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_first_row(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE]));
   20134                 :            : }
   20135                 :            : 
   20136                 :            : /* Returns a row following 'row' within its table, or a null pointer if 'row'
   20137                 :            :  * is the last row in its table. */
   20138                 :            : const struct vteprec_ucast_macs_remote *
   20139                 :        153 : vteprec_ucast_macs_remote_next(const struct vteprec_ucast_macs_remote *row)
   20140                 :            : {
   20141                 :        153 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_next_row(&row->header_));
   20142                 :            : }
   20143                 :            : 
   20144                 :          0 : unsigned int vteprec_ucast_macs_remote_get_seqno(const struct ovsdb_idl *idl)
   20145                 :            : {
   20146                 :          0 :     return ovsdb_idl_table_get_seqno(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE]);
   20147                 :            : }
   20148                 :            : 
   20149                 :          0 : unsigned int vteprec_ucast_macs_remote_row_get_seqno(const struct vteprec_ucast_macs_remote *row, enum ovsdb_idl_change change)
   20150                 :            : {
   20151                 :          0 :     return ovsdb_idl_row_get_seqno(&row->header_, change);
   20152                 :            : }
   20153                 :            : 
   20154                 :            : const struct vteprec_ucast_macs_remote *
   20155                 :          0 : vteprec_ucast_macs_remote_track_get_first(const struct ovsdb_idl *idl)
   20156                 :            : {
   20157                 :          0 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_track_get_first(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE]));
   20158                 :            : }
   20159                 :            : 
   20160                 :            : const struct vteprec_ucast_macs_remote
   20161                 :          0 : *vteprec_ucast_macs_remote_track_get_next(const struct vteprec_ucast_macs_remote *row)
   20162                 :            : {
   20163                 :          0 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_track_get_next(&row->header_));
   20164                 :            : }
   20165                 :            : 
   20166                 :            : 
   20167                 :            : /* Deletes 'row' from table "Ucast_Macs_Remote".  'row' may be freed, so it must not be
   20168                 :            :  * accessed afterward.
   20169                 :            :  *
   20170                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   20171                 :            : void
   20172                 :          8 : vteprec_ucast_macs_remote_delete(const struct vteprec_ucast_macs_remote *row)
   20173                 :            : {
   20174                 :          8 :     ovsdb_idl_txn_delete(&row->header_);
   20175                 :          8 : }
   20176                 :            : 
   20177                 :            : /* Inserts and returns a new row in the table "Ucast_Macs_Remote" in the database
   20178                 :            :  * with open transaction 'txn'.
   20179                 :            :  *
   20180                 :            :  * The new row is assigned a randomly generated provisional UUID.
   20181                 :            :  * ovsdb-server will assign a different UUID when 'txn' is committed,
   20182                 :            :  * but the IDL will replace any uses of the provisional UUID in the
   20183                 :            :  * data to be to be committed by the UUID assigned by ovsdb-server. */
   20184                 :            : struct vteprec_ucast_macs_remote *
   20185                 :         15 : vteprec_ucast_macs_remote_insert(struct ovsdb_idl_txn *txn)
   20186                 :            : {
   20187                 :         15 :     return vteprec_ucast_macs_remote_cast(ovsdb_idl_txn_insert(txn, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], NULL));
   20188                 :            : }
   20189                 :            : 
   20190                 :            : bool
   20191                 :          0 : vteprec_ucast_macs_remote_is_updated(const struct vteprec_ucast_macs_remote *row, enum vteprec_ucast_macs_remote_column_id column)
   20192                 :            : {
   20193                 :          0 :     return ovsdb_idl_track_is_updated(&row->header_, &vteprec_ucast_macs_remote_columns[column]);
   20194                 :            : }
   20195                 :            : 
   20196                 :            : /* Causes the original contents of column "MAC" in 'row' to be
   20197                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   20198                 :            :  * "MAC" in 'row' changed (or if 'row' was deleted) between the
   20199                 :            :  * time that the IDL originally read its contents and the time that the
   20200                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   20201                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   20202                 :            :  * change has already been received).
   20203                 :            :  *
   20204                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   20205                 :            :  * reads, an application should call this function any time "MAC" is
   20206                 :            :  * read as part of a read-modify-write operation.
   20207                 :            :  *
   20208                 :            :  * In some cases this function reduces to a no-op, because the current value
   20209                 :            :  * of "MAC" is already known:
   20210                 :            :  *
   20211                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   20212                 :            :  *     vteprec_ucast_macs_remote_insert()).
   20213                 :            :  *
   20214                 :            :  *   - If "MAC" has already been modified (with
   20215                 :            :  *     vteprec_ucast_macs_remote_set_MAC()) within the current transaction.
   20216                 :            :  *
   20217                 :            :  * Because of the latter property, always call this function *before*
   20218                 :            :  * vteprec_ucast_macs_remote_set_MAC() for a given read-modify-write.
   20219                 :            :  *
   20220                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   20221                 :            : void
   20222                 :          0 : vteprec_ucast_macs_remote_verify_MAC(const struct vteprec_ucast_macs_remote *row)
   20223                 :            : {
   20224         [ #  # ]:          0 :     ovs_assert(inited);
   20225                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_MAC]);
   20226                 :          0 : }
   20227                 :            : 
   20228                 :            : /* Causes the original contents of column "ipaddr" in 'row' to be
   20229                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   20230                 :            :  * "ipaddr" in 'row' changed (or if 'row' was deleted) between the
   20231                 :            :  * time that the IDL originally read its contents and the time that the
   20232                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   20233                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   20234                 :            :  * change has already been received).
   20235                 :            :  *
   20236                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   20237                 :            :  * reads, an application should call this function any time "ipaddr" is
   20238                 :            :  * read as part of a read-modify-write operation.
   20239                 :            :  *
   20240                 :            :  * In some cases this function reduces to a no-op, because the current value
   20241                 :            :  * of "ipaddr" is already known:
   20242                 :            :  *
   20243                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   20244                 :            :  *     vteprec_ucast_macs_remote_insert()).
   20245                 :            :  *
   20246                 :            :  *   - If "ipaddr" has already been modified (with
   20247                 :            :  *     vteprec_ucast_macs_remote_set_ipaddr()) within the current transaction.
   20248                 :            :  *
   20249                 :            :  * Because of the latter property, always call this function *before*
   20250                 :            :  * vteprec_ucast_macs_remote_set_ipaddr() for a given read-modify-write.
   20251                 :            :  *
   20252                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   20253                 :            : void
   20254                 :          0 : vteprec_ucast_macs_remote_verify_ipaddr(const struct vteprec_ucast_macs_remote *row)
   20255                 :            : {
   20256         [ #  # ]:          0 :     ovs_assert(inited);
   20257                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_IPADDR]);
   20258                 :          0 : }
   20259                 :            : 
   20260                 :            : /* Causes the original contents of column "locator" in 'row' to be
   20261                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   20262                 :            :  * "locator" in 'row' changed (or if 'row' was deleted) between the
   20263                 :            :  * time that the IDL originally read its contents and the time that the
   20264                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   20265                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   20266                 :            :  * change has already been received).
   20267                 :            :  *
   20268                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   20269                 :            :  * reads, an application should call this function any time "locator" is
   20270                 :            :  * read as part of a read-modify-write operation.
   20271                 :            :  *
   20272                 :            :  * In some cases this function reduces to a no-op, because the current value
   20273                 :            :  * of "locator" is already known:
   20274                 :            :  *
   20275                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   20276                 :            :  *     vteprec_ucast_macs_remote_insert()).
   20277                 :            :  *
   20278                 :            :  *   - If "locator" has already been modified (with
   20279                 :            :  *     vteprec_ucast_macs_remote_set_locator()) within the current transaction.
   20280                 :            :  *
   20281                 :            :  * Because of the latter property, always call this function *before*
   20282                 :            :  * vteprec_ucast_macs_remote_set_locator() for a given read-modify-write.
   20283                 :            :  *
   20284                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   20285                 :            : void
   20286                 :          0 : vteprec_ucast_macs_remote_verify_locator(const struct vteprec_ucast_macs_remote *row)
   20287                 :            : {
   20288         [ #  # ]:          0 :     ovs_assert(inited);
   20289                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOCATOR]);
   20290                 :          0 : }
   20291                 :            : 
   20292                 :            : /* Causes the original contents of column "logical_switch" in 'row' to be
   20293                 :            :  * verified as a prerequisite to completing the transaction.  That is, if
   20294                 :            :  * "logical_switch" in 'row' changed (or if 'row' was deleted) between the
   20295                 :            :  * time that the IDL originally read its contents and the time that the
   20296                 :            :  * transaction commits, then the transaction aborts and ovsdb_idl_txn_commit()
   20297                 :            :  * returns TXN_AGAIN_WAIT or TXN_AGAIN_NOW (depending on whether the database
   20298                 :            :  * change has already been received).
   20299                 :            :  *
   20300                 :            :  * The intention is that, to ensure that no transaction commits based on dirty
   20301                 :            :  * reads, an application should call this function any time "logical_switch" is
   20302                 :            :  * read as part of a read-modify-write operation.
   20303                 :            :  *
   20304                 :            :  * In some cases this function reduces to a no-op, because the current value
   20305                 :            :  * of "logical_switch" is already known:
   20306                 :            :  *
   20307                 :            :  *   - If 'row' is a row created by the current transaction (returned by
   20308                 :            :  *     vteprec_ucast_macs_remote_insert()).
   20309                 :            :  *
   20310                 :            :  *   - If "logical_switch" has already been modified (with
   20311                 :            :  *     vteprec_ucast_macs_remote_set_logical_switch()) within the current transaction.
   20312                 :            :  *
   20313                 :            :  * Because of the latter property, always call this function *before*
   20314                 :            :  * vteprec_ucast_macs_remote_set_logical_switch() for a given read-modify-write.
   20315                 :            :  *
   20316                 :            :  * The caller must have started a transaction with ovsdb_idl_txn_create(). */
   20317                 :            : void
   20318                 :          0 : vteprec_ucast_macs_remote_verify_logical_switch(const struct vteprec_ucast_macs_remote *row)
   20319                 :            : {
   20320         [ #  # ]:          0 :     ovs_assert(inited);
   20321                 :          0 :     ovsdb_idl_txn_verify(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOGICAL_SWITCH]);
   20322                 :          0 : }
   20323                 :            : 
   20324                 :            : /* Returns the "MAC" column's value from the "Ucast_Macs_Remote" table in 'row'
   20325                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   20326                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   20327                 :            :  * for a given key than implementing the same operation on the "cooked"
   20328                 :            :  * form in 'row'.
   20329                 :            :  *
   20330                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   20331                 :            :  * (This helps to avoid silent bugs if someone changes MAC's
   20332                 :            :  * type without updating the caller.)
   20333                 :            :  *
   20334                 :            :  * The caller must not modify or free the returned value.
   20335                 :            :  *
   20336                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   20337                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   20338                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   20339                 :            :  * of it with ovsdb_datum_clone().
   20340                 :            :  *
   20341                 :            :  * This function is rarely useful, since it is easier to access the value
   20342                 :            :  * directly through the "MAC" member in vteprec_ucast_macs_remote. */
   20343                 :            : const struct ovsdb_datum *
   20344                 :          0 : vteprec_ucast_macs_remote_get_MAC(const struct vteprec_ucast_macs_remote *row,
   20345                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   20346                 :            : {
   20347         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   20348                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_remote_col_MAC);
   20349                 :            : }
   20350                 :            : 
   20351                 :            : /* Returns the "ipaddr" column's value from the "Ucast_Macs_Remote" table in 'row'
   20352                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   20353                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   20354                 :            :  * for a given key than implementing the same operation on the "cooked"
   20355                 :            :  * form in 'row'.
   20356                 :            :  *
   20357                 :            :  * 'key_type' must be OVSDB_TYPE_STRING.
   20358                 :            :  * (This helps to avoid silent bugs if someone changes ipaddr's
   20359                 :            :  * type without updating the caller.)
   20360                 :            :  *
   20361                 :            :  * The caller must not modify or free the returned value.
   20362                 :            :  *
   20363                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   20364                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   20365                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   20366                 :            :  * of it with ovsdb_datum_clone().
   20367                 :            :  *
   20368                 :            :  * This function is rarely useful, since it is easier to access the value
   20369                 :            :  * directly through the "ipaddr" member in vteprec_ucast_macs_remote. */
   20370                 :            : const struct ovsdb_datum *
   20371                 :          0 : vteprec_ucast_macs_remote_get_ipaddr(const struct vteprec_ucast_macs_remote *row,
   20372                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   20373                 :            : {
   20374         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_STRING);
   20375                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_remote_col_ipaddr);
   20376                 :            : }
   20377                 :            : 
   20378                 :            : /* Returns the "locator" column's value from the "Ucast_Macs_Remote" table in 'row'
   20379                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   20380                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   20381                 :            :  * for a given key than implementing the same operation on the "cooked"
   20382                 :            :  * form in 'row'.
   20383                 :            :  *
   20384                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   20385                 :            :  * (This helps to avoid silent bugs if someone changes locator's
   20386                 :            :  * type without updating the caller.)
   20387                 :            :  *
   20388                 :            :  * The caller must not modify or free the returned value.
   20389                 :            :  *
   20390                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   20391                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   20392                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   20393                 :            :  * of it with ovsdb_datum_clone().
   20394                 :            :  *
   20395                 :            :  * This function is rarely useful, since it is easier to access the value
   20396                 :            :  * directly through the "locator" member in vteprec_ucast_macs_remote. */
   20397                 :            : const struct ovsdb_datum *
   20398                 :          0 : vteprec_ucast_macs_remote_get_locator(const struct vteprec_ucast_macs_remote *row,
   20399                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   20400                 :            : {
   20401         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   20402                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_remote_col_locator);
   20403                 :            : }
   20404                 :            : 
   20405                 :            : /* Returns the "logical_switch" column's value from the "Ucast_Macs_Remote" table in 'row'
   20406                 :            :  * as a struct ovsdb_datum.  This is useful occasionally: for example,
   20407                 :            :  * ovsdb_datum_find_key() is an easier and more efficient way to search
   20408                 :            :  * for a given key than implementing the same operation on the "cooked"
   20409                 :            :  * form in 'row'.
   20410                 :            :  *
   20411                 :            :  * 'key_type' must be OVSDB_TYPE_UUID.
   20412                 :            :  * (This helps to avoid silent bugs if someone changes logical_switch's
   20413                 :            :  * type without updating the caller.)
   20414                 :            :  *
   20415                 :            :  * The caller must not modify or free the returned value.
   20416                 :            :  *
   20417                 :            :  * Various kinds of changes can invalidate the returned value: modifying
   20418                 :            :  * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
   20419                 :            :  * If the returned value is needed for a long time, it is best to make a copy
   20420                 :            :  * of it with ovsdb_datum_clone().
   20421                 :            :  *
   20422                 :            :  * This function is rarely useful, since it is easier to access the value
   20423                 :            :  * directly through the "logical_switch" member in vteprec_ucast_macs_remote. */
   20424                 :            : const struct ovsdb_datum *
   20425                 :          0 : vteprec_ucast_macs_remote_get_logical_switch(const struct vteprec_ucast_macs_remote *row,
   20426                 :            :     enum ovsdb_atomic_type key_type OVS_UNUSED)
   20427                 :            : {
   20428         [ #  # ]:          0 :     ovs_assert(key_type == OVSDB_TYPE_UUID);
   20429                 :          0 :     return ovsdb_idl_read(&row->header_, &vteprec_ucast_macs_remote_col_logical_switch);
   20430                 :            : }
   20431                 :            : 
   20432                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Remote" table in 'row' to
   20433                 :            :  * 'MAC'.
   20434                 :            :  *
   20435                 :            :  * The caller retains ownership of the arguments. */
   20436                 :            : void
   20437                 :         15 : vteprec_ucast_macs_remote_set_MAC(const struct vteprec_ucast_macs_remote *row, const char *MAC)
   20438                 :            : {
   20439                 :            :     struct ovsdb_datum datum;
   20440                 :            :     union ovsdb_atom key;
   20441                 :            : 
   20442         [ -  + ]:         15 :     ovs_assert(inited);
   20443                 :         15 :     datum.n = 1;
   20444                 :         15 :     datum.keys = &key;
   20445                 :         15 :     key.string = CONST_CAST(char *, MAC);
   20446                 :         15 :     datum.values = NULL;
   20447                 :         15 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_MAC], &datum);
   20448                 :         15 : }
   20449                 :            : 
   20450                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Remote" table in 'row' to
   20451                 :            :  * 'ipaddr'.
   20452                 :            :  *
   20453                 :            :  * The caller retains ownership of the arguments. */
   20454                 :            : void
   20455                 :          0 : vteprec_ucast_macs_remote_set_ipaddr(const struct vteprec_ucast_macs_remote *row, const char *ipaddr)
   20456                 :            : {
   20457                 :            :     struct ovsdb_datum datum;
   20458                 :            :     union ovsdb_atom key;
   20459                 :            : 
   20460         [ #  # ]:          0 :     ovs_assert(inited);
   20461                 :          0 :     datum.n = 1;
   20462                 :          0 :     datum.keys = &key;
   20463                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   20464                 :          0 :     datum.values = NULL;
   20465                 :          0 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_IPADDR], &datum);
   20466                 :          0 : }
   20467                 :            : 
   20468                 :            : /* Sets the "locator" column from the "Ucast_Macs_Remote" table in 'row' to
   20469                 :            :  * 'locator'.
   20470                 :            :  *
   20471                 :            :  * The caller retains ownership of the arguments. */
   20472                 :            : void
   20473                 :         16 : vteprec_ucast_macs_remote_set_locator(const struct vteprec_ucast_macs_remote *row, const struct vteprec_physical_locator *locator)
   20474                 :            : {
   20475                 :            :     struct ovsdb_datum datum;
   20476                 :            :     union ovsdb_atom key;
   20477                 :            : 
   20478         [ -  + ]:         16 :     ovs_assert(inited);
   20479                 :         16 :     datum.n = 1;
   20480                 :         16 :     datum.keys = &key;
   20481                 :         16 :     key.uuid = locator->header_.uuid;
   20482                 :         16 :     datum.values = NULL;
   20483                 :         16 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOCATOR], &datum);
   20484                 :         16 : }
   20485                 :            : 
   20486                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Remote" table in 'row' to
   20487                 :            :  * 'logical_switch'.
   20488                 :            :  *
   20489                 :            :  * The caller retains ownership of the arguments. */
   20490                 :            : void
   20491                 :         15 : vteprec_ucast_macs_remote_set_logical_switch(const struct vteprec_ucast_macs_remote *row, const struct vteprec_logical_switch *logical_switch)
   20492                 :            : {
   20493                 :            :     struct ovsdb_datum datum;
   20494                 :            :     union ovsdb_atom key;
   20495                 :            : 
   20496         [ -  + ]:         15 :     ovs_assert(inited);
   20497                 :         15 :     datum.n = 1;
   20498                 :         15 :     datum.keys = &key;
   20499                 :         15 :     key.uuid = logical_switch->header_.uuid;
   20500                 :         15 :     datum.values = NULL;
   20501                 :         15 :     ovsdb_idl_txn_write_clone(&row->header_, &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOGICAL_SWITCH], &datum);
   20502                 :         15 : }
   20503                 :            : 
   20504                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Remote" table in 'row' to
   20505                 :            :  * 'MAC'.
   20506                 :            :  *
   20507                 :            :  * The caller retains ownership of the arguments. */
   20508                 :            : void
   20509                 :          0 : vteprec_ucast_macs_remote_add_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   20510                 :            : {
   20511                 :            :     struct ovsdb_datum datum;
   20512                 :            :     union ovsdb_atom key;
   20513                 :            : 
   20514         [ #  # ]:          0 :     ovs_assert(inited);
   20515                 :          0 :     datum.n = 1;
   20516                 :          0 :     datum.keys = &key;
   20517                 :          0 :     key.string = CONST_CAST(char *, MAC);
   20518                 :          0 :     datum.values = NULL;
   20519                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20520                 :            :                           function,
   20521                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_MAC],
   20522                 :            :                           &datum);
   20523                 :          0 : }
   20524                 :            : 
   20525                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Remote" table in 'row' to
   20526                 :            :  * 'ipaddr'.
   20527                 :            :  *
   20528                 :            :  * The caller retains ownership of the arguments. */
   20529                 :            : void
   20530                 :          0 : vteprec_ucast_macs_remote_add_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   20531                 :            : {
   20532                 :            :     struct ovsdb_datum datum;
   20533                 :            :     union ovsdb_atom key;
   20534                 :            : 
   20535         [ #  # ]:          0 :     ovs_assert(inited);
   20536                 :          0 :     datum.n = 1;
   20537                 :          0 :     datum.keys = &key;
   20538                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   20539                 :          0 :     datum.values = NULL;
   20540                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20541                 :            :                           function,
   20542                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_IPADDR],
   20543                 :            :                           &datum);
   20544                 :          0 : }
   20545                 :            : 
   20546                 :            : /* Sets the "locator" column from the "Ucast_Macs_Remote" table in 'row' to
   20547                 :            :  * 'locator'.
   20548                 :            :  *
   20549                 :            :  * The caller retains ownership of the arguments. */
   20550                 :            : void
   20551                 :          0 : vteprec_ucast_macs_remote_add_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
   20552                 :            : {
   20553                 :            :     struct ovsdb_datum datum;
   20554                 :            :     union ovsdb_atom key;
   20555                 :            : 
   20556         [ #  # ]:          0 :     ovs_assert(inited);
   20557                 :          0 :     datum.n = 1;
   20558                 :          0 :     datum.keys = &key;
   20559                 :          0 :     key.uuid = *locator;
   20560                 :          0 :     datum.values = NULL;
   20561                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20562                 :            :                           function,
   20563                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOCATOR],
   20564                 :            :                           &datum);
   20565                 :          0 : }
   20566                 :            : 
   20567                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Remote" table in 'row' to
   20568                 :            :  * 'logical_switch'.
   20569                 :            :  *
   20570                 :            :  * The caller retains ownership of the arguments. */
   20571                 :            : void
   20572                 :          0 : vteprec_ucast_macs_remote_add_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   20573                 :            : {
   20574                 :            :     struct ovsdb_datum datum;
   20575                 :            :     union ovsdb_atom key;
   20576                 :            : 
   20577         [ #  # ]:          0 :     ovs_assert(inited);
   20578                 :          0 :     datum.n = 1;
   20579                 :          0 :     datum.keys = &key;
   20580                 :          0 :     key.uuid = *logical_switch;
   20581                 :          0 :     datum.values = NULL;
   20582                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20583                 :            :                           function,
   20584                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOGICAL_SWITCH],
   20585                 :            :                           &datum);
   20586                 :          0 : }
   20587                 :            : void
   20588                 :          0 : vteprec_ucast_macs_remote_add_clause_false(struct ovsdb_idl *idl)
   20589                 :            : {
   20590                 :            :     struct ovsdb_datum datum;
   20591                 :            : 
   20592                 :          0 :     ovsdb_datum_init_empty(&datum);
   20593                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], OVSDB_F_FALSE, NULL, &datum);
   20594                 :          0 : }
   20595                 :            : void
   20596                 :          0 : vteprec_ucast_macs_remote_add_clause_true(struct ovsdb_idl *idl)
   20597                 :            : {
   20598                 :            :     struct ovsdb_datum datum;
   20599                 :            : 
   20600                 :          0 :     ovsdb_datum_init_empty(&datum);
   20601                 :          0 :     ovsdb_idl_condition_add_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], OVSDB_F_TRUE, NULL, &datum);
   20602                 :          0 : }
   20603                 :            : 
   20604                 :            : /* Sets the "MAC" column from the "Ucast_Macs_Remote" table in 'row' to
   20605                 :            :  * 'MAC'.
   20606                 :            :  *
   20607                 :            :  * The caller retains ownership of the arguments. */
   20608                 :            : void
   20609                 :          0 : vteprec_ucast_macs_remote_remove_clause_MAC(struct ovsdb_idl *idl, enum ovsdb_function function, const char *MAC)
   20610                 :            : {
   20611                 :            :     struct ovsdb_datum datum;
   20612                 :            :     union ovsdb_atom key;
   20613                 :            : 
   20614         [ #  # ]:          0 :     ovs_assert(inited);
   20615                 :          0 :     datum.n = 1;
   20616                 :          0 :     datum.keys = &key;
   20617                 :          0 :     key.string = CONST_CAST(char *, MAC);
   20618                 :          0 :     datum.values = NULL;
   20619                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20620                 :            :                           function,
   20621                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_MAC],
   20622                 :            :                           &datum);
   20623                 :          0 : }
   20624                 :            : 
   20625                 :            : /* Sets the "ipaddr" column from the "Ucast_Macs_Remote" table in 'row' to
   20626                 :            :  * 'ipaddr'.
   20627                 :            :  *
   20628                 :            :  * The caller retains ownership of the arguments. */
   20629                 :            : void
   20630                 :          0 : vteprec_ucast_macs_remote_remove_clause_ipaddr(struct ovsdb_idl *idl, enum ovsdb_function function, const char *ipaddr)
   20631                 :            : {
   20632                 :            :     struct ovsdb_datum datum;
   20633                 :            :     union ovsdb_atom key;
   20634                 :            : 
   20635         [ #  # ]:          0 :     ovs_assert(inited);
   20636                 :          0 :     datum.n = 1;
   20637                 :          0 :     datum.keys = &key;
   20638                 :          0 :     key.string = CONST_CAST(char *, ipaddr);
   20639                 :          0 :     datum.values = NULL;
   20640                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20641                 :            :                           function,
   20642                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_IPADDR],
   20643                 :            :                           &datum);
   20644                 :          0 : }
   20645                 :            : 
   20646                 :            : /* Sets the "locator" column from the "Ucast_Macs_Remote" table in 'row' to
   20647                 :            :  * 'locator'.
   20648                 :            :  *
   20649                 :            :  * The caller retains ownership of the arguments. */
   20650                 :            : void
   20651                 :          0 : vteprec_ucast_macs_remote_remove_clause_locator(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *locator)
   20652                 :            : {
   20653                 :            :     struct ovsdb_datum datum;
   20654                 :            :     union ovsdb_atom key;
   20655                 :            : 
   20656         [ #  # ]:          0 :     ovs_assert(inited);
   20657                 :          0 :     datum.n = 1;
   20658                 :          0 :     datum.keys = &key;
   20659                 :          0 :     key.uuid = *locator;
   20660                 :          0 :     datum.values = NULL;
   20661                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20662                 :            :                           function,
   20663                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOCATOR],
   20664                 :            :                           &datum);
   20665                 :          0 : }
   20666                 :            : 
   20667                 :            : /* Sets the "logical_switch" column from the "Ucast_Macs_Remote" table in 'row' to
   20668                 :            :  * 'logical_switch'.
   20669                 :            :  *
   20670                 :            :  * The caller retains ownership of the arguments. */
   20671                 :            : void
   20672                 :          0 : vteprec_ucast_macs_remote_remove_clause_logical_switch(struct ovsdb_idl *idl, enum ovsdb_function function, const struct uuid *logical_switch)
   20673                 :            : {
   20674                 :            :     struct ovsdb_datum datum;
   20675                 :            :     union ovsdb_atom key;
   20676                 :            : 
   20677         [ #  # ]:          0 :     ovs_assert(inited);
   20678                 :          0 :     datum.n = 1;
   20679                 :          0 :     datum.keys = &key;
   20680                 :          0 :     key.uuid = *logical_switch;
   20681                 :          0 :     datum.values = NULL;
   20682                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE],
   20683                 :            :                           function,
   20684                 :            :                           &vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_COL_LOGICAL_SWITCH],
   20685                 :            :                           &datum);
   20686                 :          0 : }
   20687                 :            : void
   20688                 :          0 : vteprec_ucast_macs_remote_remove_clause_false(struct ovsdb_idl *idl)
   20689                 :            : {
   20690                 :            :     struct ovsdb_datum datum;
   20691                 :            : 
   20692                 :          0 :     ovsdb_datum_init_empty(&datum);
   20693                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], OVSDB_F_FALSE, NULL, &datum);
   20694                 :          0 : }
   20695                 :            : void
   20696                 :          0 : vteprec_ucast_macs_remote_remove_clause_true(struct ovsdb_idl *idl)
   20697                 :            : {
   20698                 :            :     struct ovsdb_datum datum;
   20699                 :            : 
   20700                 :          0 :     ovsdb_datum_init_empty(&datum);
   20701                 :          0 :     ovsdb_idl_condition_remove_clause(idl, &vteprec_table_classes[VTEPREC_TABLE_UCAST_MACS_REMOTE], OVSDB_F_TRUE, NULL, &datum);
   20702                 :          0 : }
   20703                 :            : 
   20704                 :            : struct ovsdb_idl_column vteprec_ucast_macs_remote_columns[VTEPREC_UCAST_MACS_REMOTE_N_COLUMNS];
   20705                 :            : 
   20706                 :            : static void
   20707                 :        741 : vteprec_ucast_macs_remote_columns_init(void)
   20708                 :            : {
   20709                 :            :     struct ovsdb_idl_column *c;
   20710                 :            : 
   20711                 :            :     /* Initialize vteprec_ucast_macs_remote_col_MAC. */
   20712                 :        741 :     c = &vteprec_ucast_macs_remote_col_MAC;
   20713                 :        741 :     c->name = "MAC";
   20714                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   20715                 :        741 :     c->type.key.u.string.minLen = 0;
   20716                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20717                 :        741 :     c->type.n_min = 1;
   20718                 :        741 :     c->type.n_max = 1;
   20719                 :        741 :     c->mutable = true;
   20720                 :        741 :     c->parse = vteprec_ucast_macs_remote_parse_MAC;
   20721                 :        741 :     c->unparse = vteprec_ucast_macs_remote_unparse_MAC;
   20722                 :            : 
   20723                 :            :     /* Initialize vteprec_ucast_macs_remote_col_ipaddr. */
   20724                 :        741 :     c = &vteprec_ucast_macs_remote_col_ipaddr;
   20725                 :        741 :     c->name = "ipaddr";
   20726                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_STRING);
   20727                 :        741 :     c->type.key.u.string.minLen = 0;
   20728                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20729                 :        741 :     c->type.n_min = 1;
   20730                 :        741 :     c->type.n_max = 1;
   20731                 :        741 :     c->mutable = true;
   20732                 :        741 :     c->parse = vteprec_ucast_macs_remote_parse_ipaddr;
   20733                 :        741 :     c->unparse = vteprec_ucast_macs_remote_unparse_ipaddr;
   20734                 :            : 
   20735                 :            :     /* Initialize vteprec_ucast_macs_remote_col_locator. */
   20736                 :        741 :     c = &vteprec_ucast_macs_remote_col_locator;
   20737                 :        741 :     c->name = "locator";
   20738                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   20739                 :        741 :     c->type.key.u.uuid.refTableName = "Physical_Locator";
   20740                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   20741                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20742                 :        741 :     c->type.n_min = 1;
   20743                 :        741 :     c->type.n_max = 1;
   20744                 :        741 :     c->mutable = true;
   20745                 :        741 :     c->parse = vteprec_ucast_macs_remote_parse_locator;
   20746                 :        741 :     c->unparse = vteprec_ucast_macs_remote_unparse_locator;
   20747                 :            : 
   20748                 :            :     /* Initialize vteprec_ucast_macs_remote_col_logical_switch. */
   20749                 :        741 :     c = &vteprec_ucast_macs_remote_col_logical_switch;
   20750                 :        741 :     c->name = "logical_switch";
   20751                 :        741 :     ovsdb_base_type_init(&c->type.key, OVSDB_TYPE_UUID);
   20752                 :        741 :     c->type.key.u.uuid.refTableName = "Logical_Switch";
   20753                 :        741 :     c->type.key.u.uuid.refType = OVSDB_REF_STRONG;
   20754                 :        741 :     ovsdb_base_type_init(&c->type.value, OVSDB_TYPE_VOID);
   20755                 :        741 :     c->type.n_min = 1;
   20756                 :        741 :     c->type.n_max = 1;
   20757                 :        741 :     c->mutable = true;
   20758                 :        741 :     c->parse = vteprec_ucast_macs_remote_parse_logical_switch;
   20759                 :        741 :     c->unparse = vteprec_ucast_macs_remote_unparse_logical_switch;
   20760                 :        741 : }
   20761                 :            : 
   20762                 :            : struct ovsdb_idl_table_class vteprec_table_classes[VTEPREC_N_TABLES] = {
   20763                 :            :     {"ACL", true,
   20764                 :            :      vteprec_acl_columns, ARRAY_SIZE(vteprec_acl_columns),
   20765                 :            :      sizeof(struct vteprec_acl), vteprec_acl_init__},
   20766                 :            :     {"ACL_entry", true,
   20767                 :            :      vteprec_acl_entry_columns, ARRAY_SIZE(vteprec_acl_entry_columns),
   20768                 :            :      sizeof(struct vteprec_acl_entry), vteprec_acl_entry_init__},
   20769                 :            :     {"Arp_Sources_Local", true,
   20770                 :            :      vteprec_arp_sources_local_columns, ARRAY_SIZE(vteprec_arp_sources_local_columns),
   20771                 :            :      sizeof(struct vteprec_arp_sources_local), vteprec_arp_sources_local_init__},
   20772                 :            :     {"Arp_Sources_Remote", true,
   20773                 :            :      vteprec_arp_sources_remote_columns, ARRAY_SIZE(vteprec_arp_sources_remote_columns),
   20774                 :            :      sizeof(struct vteprec_arp_sources_remote), vteprec_arp_sources_remote_init__},
   20775                 :            :     {"Global", true,
   20776                 :            :      vteprec_global_columns, ARRAY_SIZE(vteprec_global_columns),
   20777                 :            :      sizeof(struct vteprec_global), vteprec_global_init__},
   20778                 :            :     {"Logical_Binding_Stats", false,
   20779                 :            :      vteprec_logical_binding_stats_columns, ARRAY_SIZE(vteprec_logical_binding_stats_columns),
   20780                 :            :      sizeof(struct vteprec_logical_binding_stats), vteprec_logical_binding_stats_init__},
   20781                 :            :     {"Logical_Router", true,
   20782                 :            :      vteprec_logical_router_columns, ARRAY_SIZE(vteprec_logical_router_columns),
   20783                 :            :      sizeof(struct vteprec_logical_router), vteprec_logical_router_init__},
   20784                 :            :     {"Logical_Switch", true,
   20785                 :            :      vteprec_logical_switch_columns, ARRAY_SIZE(vteprec_logical_switch_columns),
   20786                 :            :      sizeof(struct vteprec_logical_switch), vteprec_logical_switch_init__},
   20787                 :            :     {"Manager", false,
   20788                 :            :      vteprec_manager_columns, ARRAY_SIZE(vteprec_manager_columns),
   20789                 :            :      sizeof(struct vteprec_manager), vteprec_manager_init__},
   20790                 :            :     {"Mcast_Macs_Local", true,
   20791                 :            :      vteprec_mcast_macs_local_columns, ARRAY_SIZE(vteprec_mcast_macs_local_columns),
   20792                 :            :      sizeof(struct vteprec_mcast_macs_local), vteprec_mcast_macs_local_init__},
   20793                 :            :     {"Mcast_Macs_Remote", true,
   20794                 :            :      vteprec_mcast_macs_remote_columns, ARRAY_SIZE(vteprec_mcast_macs_remote_columns),
   20795                 :            :      sizeof(struct vteprec_mcast_macs_remote), vteprec_mcast_macs_remote_init__},
   20796                 :            :     {"Physical_Locator", false,
   20797                 :            :      vteprec_physical_locator_columns, ARRAY_SIZE(vteprec_physical_locator_columns),
   20798                 :            :      sizeof(struct vteprec_physical_locator), vteprec_physical_locator_init__},
   20799                 :            :     {"Physical_Locator_Set", false,
   20800                 :            :      vteprec_physical_locator_set_columns, ARRAY_SIZE(vteprec_physical_locator_set_columns),
   20801                 :            :      sizeof(struct vteprec_physical_locator_set), vteprec_physical_locator_set_init__},
   20802                 :            :     {"Physical_Port", false,
   20803                 :            :      vteprec_physical_port_columns, ARRAY_SIZE(vteprec_physical_port_columns),
   20804                 :            :      sizeof(struct vteprec_physical_port), vteprec_physical_port_init__},
   20805                 :            :     {"Physical_Switch", false,
   20806                 :            :      vteprec_physical_switch_columns, ARRAY_SIZE(vteprec_physical_switch_columns),
   20807                 :            :      sizeof(struct vteprec_physical_switch), vteprec_physical_switch_init__},
   20808                 :            :     {"Tunnel", false,
   20809                 :            :      vteprec_tunnel_columns, ARRAY_SIZE(vteprec_tunnel_columns),
   20810                 :            :      sizeof(struct vteprec_tunnel), vteprec_tunnel_init__},
   20811                 :            :     {"Ucast_Macs_Local", true,
   20812                 :            :      vteprec_ucast_macs_local_columns, ARRAY_SIZE(vteprec_ucast_macs_local_columns),
   20813                 :            :      sizeof(struct vteprec_ucast_macs_local), vteprec_ucast_macs_local_init__},
   20814                 :            :     {"Ucast_Macs_Remote", true,
   20815                 :            :      vteprec_ucast_macs_remote_columns, ARRAY_SIZE(vteprec_ucast_macs_remote_columns),
   20816                 :            :      sizeof(struct vteprec_ucast_macs_remote), vteprec_ucast_macs_remote_init__},
   20817                 :            : };
   20818                 :            : 
   20819                 :            : struct ovsdb_idl_class vteprec_idl_class = {
   20820                 :            :     "hardware_vtep", vteprec_table_classes, ARRAY_SIZE(vteprec_table_classes)
   20821                 :            : };
   20822                 :            : 
   20823                 :            : void
   20824                 :        741 : vteprec_init(void)
   20825                 :            : {
   20826         [ -  + ]:        741 :     if (inited) {
   20827                 :          0 :         return;
   20828                 :            :     }
   20829                 :        741 :     assert_single_threaded();
   20830                 :        741 :     inited = true;
   20831                 :            : 
   20832                 :        741 :     vteprec_acl_columns_init();
   20833                 :        741 :     vteprec_acl_entry_columns_init();
   20834                 :        741 :     vteprec_arp_sources_local_columns_init();
   20835                 :        741 :     vteprec_arp_sources_remote_columns_init();
   20836                 :        741 :     vteprec_global_columns_init();
   20837                 :        741 :     vteprec_logical_binding_stats_columns_init();
   20838                 :        741 :     vteprec_logical_router_columns_init();
   20839                 :        741 :     vteprec_logical_switch_columns_init();
   20840                 :        741 :     vteprec_manager_columns_init();
   20841                 :        741 :     vteprec_mcast_macs_local_columns_init();
   20842                 :        741 :     vteprec_mcast_macs_remote_columns_init();
   20843                 :        741 :     vteprec_physical_locator_columns_init();
   20844                 :        741 :     vteprec_physical_locator_set_columns_init();
   20845                 :        741 :     vteprec_physical_port_columns_init();
   20846                 :        741 :     vteprec_physical_switch_columns_init();
   20847                 :        741 :     vteprec_tunnel_columns_init();
   20848                 :        741 :     vteprec_ucast_macs_local_columns_init();
   20849                 :        741 :     vteprec_ucast_macs_remote_columns_init();
   20850                 :            : }
   20851                 :            : 
   20852                 :            : /* Return the schema version.  The caller must not free the returned value. */
   20853                 :            : const char *
   20854                 :          0 : vteprec_get_db_version(void)
   20855                 :            : {
   20856                 :          0 :     return "1.7.0";
   20857                 :            : }
   20858                 :            : 

Generated by: LCOV version 1.12