Coverage Report

Created: 2023-03-26 07:42

/src/openvswitch/lib/vswitch-idl.h
Line
Count
Source (jump to first uncovered line)
1
/* Generated automatically -- do not modify!    -*- buffer-read-only: t -*- */
2
3
#ifndef OVSREC_IDL_HEADER
4
#define OVSREC_IDL_HEADER 1
5
6
#include <stdbool.h>
7
#include <stddef.h>
8
#include <stdint.h>
9
#include "openvswitch/json.h"
10
#include "ovsdb-data.h"
11
#include "ovsdb-idl-provider.h"
12
#include "smap.h"
13
#include "uuid.h"
14
15
#ifdef  __cplusplus
16
extern "C" {
17
#endif
18
19

20
/* AutoAttach table. */
21
struct ovsrec_autoattach {
22
  struct ovsdb_idl_row header_;
23
24
  /* mappings column. */
25
  int64_t *key_mappings;
26
  int64_t *value_mappings;
27
  size_t n_mappings;
28
29
  /* system_description column. */
30
  char *system_description; /* Always nonnull. */
31
32
  /* system_name column. */
33
  char *system_name;  /* Always nonnull. */
34
};
35
36
enum ovsrec_autoattach_column_id {
37
    OVSREC_AUTOATTACH_COL_MAPPINGS,
38
    OVSREC_AUTOATTACH_COL_SYSTEM_DESCRIPTION,
39
    OVSREC_AUTOATTACH_COL_SYSTEM_NAME,
40
    OVSREC_AUTOATTACH_N_COLUMNS
41
};
42
43
0
#define ovsrec_autoattach_col_mappings (ovsrec_autoattach_columns[OVSREC_AUTOATTACH_COL_MAPPINGS])
44
0
#define ovsrec_autoattach_col_system_description (ovsrec_autoattach_columns[OVSREC_AUTOATTACH_COL_SYSTEM_DESCRIPTION])
45
0
#define ovsrec_autoattach_col_system_name (ovsrec_autoattach_columns[OVSREC_AUTOATTACH_COL_SYSTEM_NAME])
46
47
extern struct ovsdb_idl_column ovsrec_autoattach_columns[OVSREC_AUTOATTACH_N_COLUMNS];
48
bool ovsrec_server_has_autoattach_table_col_mappings(const struct ovsdb_idl *); 
49
bool ovsrec_server_has_autoattach_table_col_system_description(const struct ovsdb_idl *); 
50
bool ovsrec_server_has_autoattach_table_col_system_name(const struct ovsdb_idl *); 
51
52
bool ovsrec_server_has_autoattach_table(const struct ovsdb_idl *);
53
const struct ovsrec_autoattach_table *ovsrec_autoattach_table_get(const struct ovsdb_idl *);
54
const struct ovsrec_autoattach *ovsrec_autoattach_table_first(const struct ovsrec_autoattach_table *);
55
56
#define OVSREC_AUTOATTACH_TABLE_FOR_EACH(ROW, TABLE) \
57
        for ((ROW) = ovsrec_autoattach_table_first(TABLE); \
58
             (ROW); \
59
             (ROW) = ovsrec_autoattach_next(ROW))
60
#define OVSREC_AUTOATTACH_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
61
        for ((ROW) = ovsrec_autoattach_table_first(TABLE); \
62
             (ROW) ? ((NEXT) = ovsrec_autoattach_next(ROW), 1) : 0; \
63
             (ROW) = (NEXT))
64
#define OVSREC_AUTOATTACH_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
65
        for (const struct ovsrec_autoattach * ROW__next = ((ROW) = ovsrec_autoattach_table_first(TABLE), NULL); \
66
             (ROW) ? (ROW__next = ovsrec_autoattach_next(ROW), 1) : (ROW__next = NULL, 0); \
67
             (ROW) = ROW__next)
68
#define OVSREC_AUTOATTACH_TABLE_FOR_EACH_SAFE(...)                                        \
69
        OVERLOAD_SAFE_MACRO(OVSREC_AUTOATTACH_TABLE_FOR_EACH_SAFE_LONG,                   \
70
                            OVSREC_AUTOATTACH_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
71
72
73
const struct ovsrec_autoattach *ovsrec_autoattach_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
74
const struct ovsrec_autoattach *ovsrec_autoattach_table_get_for_uuid(const struct ovsrec_autoattach_table *, const struct uuid *);
75
const struct ovsrec_autoattach *ovsrec_autoattach_first(const struct ovsdb_idl *);
76
const struct ovsrec_autoattach *ovsrec_autoattach_next(const struct ovsrec_autoattach *);
77
#define OVSREC_AUTOATTACH_FOR_EACH(ROW, IDL) \
78
        for ((ROW) = ovsrec_autoattach_first(IDL); \
79
             (ROW); \
80
             (ROW) = ovsrec_autoattach_next(ROW))
81
#define OVSREC_AUTOATTACH_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
82
        for ((ROW) = ovsrec_autoattach_first(IDL); \
83
             (ROW) ? ((NEXT) = ovsrec_autoattach_next(ROW), 1) : 0; \
84
             (ROW) = (NEXT))
85
#define OVSREC_AUTOATTACH_FOR_EACH_SAFE_SHORT(ROW, IDL) \
86
        for (const struct ovsrec_autoattach * ROW__next = ((ROW) = ovsrec_autoattach_first(IDL), NULL); \
87
             (ROW) ? (ROW__next = ovsrec_autoattach_next(ROW), 1) : (ROW__next = NULL, 0); \
88
             (ROW) = ROW__next)
89
#define OVSREC_AUTOATTACH_FOR_EACH_SAFE(...)                                         \
90
        OVERLOAD_SAFE_MACRO(OVSREC_AUTOATTACH_FOR_EACH_SAFE_LONG,                    \
91
                            OVSREC_AUTOATTACH_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
92
93
unsigned int ovsrec_autoattach_get_seqno(const struct ovsdb_idl *);
94
unsigned int ovsrec_autoattach_row_get_seqno(const struct ovsrec_autoattach *row, enum ovsdb_idl_change change);
95
const struct ovsrec_autoattach *ovsrec_autoattach_track_get_first(const struct ovsdb_idl *);
96
const struct ovsrec_autoattach *ovsrec_autoattach_track_get_next(const struct ovsrec_autoattach *);
97
#define OVSREC_AUTOATTACH_FOR_EACH_TRACKED(ROW, IDL) \
98
        for ((ROW) = ovsrec_autoattach_track_get_first(IDL); \
99
             (ROW); \
100
             (ROW) = ovsrec_autoattach_track_get_next(ROW))
101
102
const struct ovsrec_autoattach *ovsrec_autoattach_table_track_get_first(const struct ovsrec_autoattach_table *);
103
#define OVSREC_AUTOATTACH_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
104
        for ((ROW) = ovsrec_autoattach_table_track_get_first(TABLE); \
105
             (ROW); \
106
             (ROW) = ovsrec_autoattach_track_get_next(ROW))
107
108
109
/* Returns true if 'row' was inserted since the last change tracking reset.
110
 *
111
 * Note: This can only be used to test rows of tracked changes. This cannot be
112
 * used to test if an uncommitted row that has been added locally is new or it
113
 * may given unexpected results. */
114
static inline bool ovsrec_autoattach_is_new(const struct ovsrec_autoattach *row)
115
0
{
116
0
    return ovsrec_autoattach_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
117
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_autoattach_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_autoattach_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_autoattach_is_new
118
119
/* Returns true if 'row' was deleted since the last change tracking reset.
120
 *
121
 * Note: This can only be used to test rows of tracked changes. This cannot be
122
 * used to test if an uncommitted row that has been added locally has been
123
 * deleted or it may given unexpected results. */
124
static inline bool ovsrec_autoattach_is_deleted(const struct ovsrec_autoattach *row)
125
0
{
126
0
    return ovsrec_autoattach_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
127
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_autoattach_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_autoattach_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_autoattach_is_deleted
128
129
void ovsrec_autoattach_index_destroy_row(const struct ovsrec_autoattach *);
130
131
struct ovsrec_autoattach *ovsrec_autoattach_index_find(struct ovsdb_idl_index *, const struct ovsrec_autoattach *);
132
133
int ovsrec_autoattach_index_compare(
134
    struct ovsdb_idl_index *, 
135
    const struct ovsrec_autoattach *, 
136
    const struct ovsrec_autoattach *);
137
struct ovsdb_idl_cursor ovsrec_autoattach_cursor_first(struct ovsdb_idl_index *);
138
struct ovsdb_idl_cursor ovsrec_autoattach_cursor_first_eq(
139
    struct ovsdb_idl_index *, const struct ovsrec_autoattach *);
140
struct ovsdb_idl_cursor ovsrec_autoattach_cursor_first_ge(
141
    struct ovsdb_idl_index *, const struct ovsrec_autoattach *);
142
143
struct ovsrec_autoattach *ovsrec_autoattach_cursor_data(struct ovsdb_idl_cursor *);
144
145
#define OVSREC_AUTOATTACH_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
146
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_autoattach_cursor_first_ge(INDEX, FROM); \
147
             (cursor__.position \
148
              && ((ROW) = ovsrec_autoattach_cursor_data(&cursor__), \
149
                  !(TO) || ovsrec_autoattach_index_compare(INDEX, ROW, TO) <= 0)); \
150
             ovsdb_idl_cursor_next(&cursor__))
151
#define OVSREC_AUTOATTACH_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
152
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_autoattach_cursor_first_eq(INDEX, KEY); \
153
             (cursor__.position \
154
              ? ((ROW) = ovsrec_autoattach_cursor_data(&cursor__), \
155
                 ovsdb_idl_cursor_next_eq(&cursor__), \
156
                 true) \
157
              : false); \
158
            )
159
#define OVSREC_AUTOATTACH_FOR_EACH_BYINDEX(ROW, INDEX) \
160
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_autoattach_cursor_first(INDEX); \
161
             (cursor__.position \
162
              ? ((ROW) = ovsrec_autoattach_cursor_data(&cursor__), \
163
                 ovsdb_idl_cursor_next(&cursor__), \
164
                 true) \
165
              : false); \
166
            )
167
168
void ovsrec_autoattach_init(struct ovsrec_autoattach *);
169
void ovsrec_autoattach_delete(const struct ovsrec_autoattach *);
170
struct ovsrec_autoattach *ovsrec_autoattach_insert(struct ovsdb_idl_txn *);
171
struct ovsrec_autoattach *ovsrec_autoattach_insert_persist_uuid(
172
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
173
174
/* Returns true if the tracked column referenced by 'enum ovsrec_autoattach_column_id' of
175
 * the row referenced by 'struct ovsrec_autoattach *' was updated since the last change
176
 * tracking reset.
177
 *
178
 * Note: This can only be used to test rows of tracked changes. This cannot be
179
 * used to test if an uncommitted row that has been added locally has been
180
 * updated or it may given unexpected results. */
181
bool ovsrec_autoattach_is_updated(const struct ovsrec_autoattach *, enum ovsrec_autoattach_column_id);
182
183
void ovsrec_autoattach_verify_mappings(const struct ovsrec_autoattach *);
184
void ovsrec_autoattach_verify_system_description(const struct ovsrec_autoattach *);
185
void ovsrec_autoattach_verify_system_name(const struct ovsrec_autoattach *);
186
187
const struct ovsdb_datum *ovsrec_autoattach_get_mappings(const struct ovsrec_autoattach *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
188
const struct ovsdb_datum *ovsrec_autoattach_get_system_description(const struct ovsrec_autoattach *, enum ovsdb_atomic_type key_type);
189
const struct ovsdb_datum *ovsrec_autoattach_get_system_name(const struct ovsrec_autoattach *, enum ovsdb_atomic_type key_type);
190
191
void ovsrec_autoattach_set_mappings(const struct ovsrec_autoattach *, const int64_t *key_mappings, const int64_t *value_mappings, size_t n_mappings);
192
void ovsrec_autoattach_set_system_description(const struct ovsrec_autoattach *, const char *system_description);
193
void ovsrec_autoattach_set_system_name(const struct ovsrec_autoattach *, const char *system_name);
194
195
void ovsrec_autoattach_update_mappings_setkey(const struct ovsrec_autoattach *,  int64_t , int64_t );
196
void ovsrec_autoattach_update_mappings_delkey(const struct ovsrec_autoattach *,  int64_t );
197
void ovsrec_autoattach_add_clause_mappings(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *key_mappings, const int64_t *value_mappings, size_t n_mappings);
198
unsigned int ovsrec_autoattach_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
199
void ovsrec_autoattach_add_clause_system_description(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *system_description);
200
unsigned int ovsrec_autoattach_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
201
void ovsrec_autoattach_add_clause_system_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *system_name);
202
unsigned int ovsrec_autoattach_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
203
204
struct ovsrec_autoattach *ovsrec_autoattach_index_init_row(struct ovsdb_idl_index *);
205
void ovsrec_autoattach_index_set_mappings(const struct ovsrec_autoattach *,
206
const int64_t *key_mappings, const int64_t *value_mappings, size_t n_mappings);
207
void ovsrec_autoattach_index_set_system_description(const struct ovsrec_autoattach *,
208
const char *system_description);
209
void ovsrec_autoattach_index_set_system_name(const struct ovsrec_autoattach *,
210
const char *system_name);
211

212
/* Bridge table. */
213
struct ovsrec_bridge {
214
  struct ovsdb_idl_row header_;
215
216
  /* auto_attach column. */
217
  struct ovsrec_autoattach *auto_attach;
218
219
  /* controller column. */
220
  struct ovsrec_controller **controller;
221
  size_t n_controller;
222
223
  /* datapath_id column. */
224
  char *datapath_id;
225
226
  /* datapath_type column. */
227
  char *datapath_type;  /* Always nonnull. */
228
229
  /* datapath_version column. */
230
  char *datapath_version; /* Always nonnull. */
231
232
  /* external_ids column. */
233
  struct smap external_ids;
234
235
  /* fail_mode column. */
236
  char *fail_mode;
237
238
  /* flood_vlans column. */
239
  int64_t *flood_vlans;
240
  size_t n_flood_vlans;
241
242
  /* flow_tables column. */
243
  int64_t *key_flow_tables;
244
  struct ovsrec_flow_table **value_flow_tables;
245
  size_t n_flow_tables;
246
247
  /* ipfix column. */
248
  struct ovsrec_ipfix *ipfix;
249
250
  /* mcast_snooping_enable column. */
251
  bool mcast_snooping_enable;
252
253
  /* mirrors column. */
254
  struct ovsrec_mirror **mirrors;
255
  size_t n_mirrors;
256
257
  /* name column. */
258
  char *name; /* Always nonnull. */
259
260
  /* netflow column. */
261
  struct ovsrec_netflow *netflow;
262
263
  /* other_config column. */
264
  struct smap other_config;
265
266
  /* ports column. */
267
  struct ovsrec_port **ports;
268
  size_t n_ports;
269
270
  /* protocols column. */
271
  char **protocols;
272
  size_t n_protocols;
273
274
  /* rstp_enable column. */
275
  bool rstp_enable;
276
277
  /* rstp_status column. */
278
  struct smap rstp_status;
279
280
  /* sflow column. */
281
  struct ovsrec_sflow *sflow;
282
283
  /* status column. */
284
  struct smap status;
285
286
  /* stp_enable column. */
287
  bool stp_enable;
288
};
289
290
enum ovsrec_bridge_column_id {
291
    OVSREC_BRIDGE_COL_AUTO_ATTACH,
292
    OVSREC_BRIDGE_COL_CONTROLLER,
293
    OVSREC_BRIDGE_COL_DATAPATH_ID,
294
    OVSREC_BRIDGE_COL_DATAPATH_TYPE,
295
    OVSREC_BRIDGE_COL_DATAPATH_VERSION,
296
    OVSREC_BRIDGE_COL_EXTERNAL_IDS,
297
    OVSREC_BRIDGE_COL_FAIL_MODE,
298
    OVSREC_BRIDGE_COL_FLOOD_VLANS,
299
    OVSREC_BRIDGE_COL_FLOW_TABLES,
300
    OVSREC_BRIDGE_COL_IPFIX,
301
    OVSREC_BRIDGE_COL_MCAST_SNOOPING_ENABLE,
302
    OVSREC_BRIDGE_COL_MIRRORS,
303
    OVSREC_BRIDGE_COL_NAME,
304
    OVSREC_BRIDGE_COL_NETFLOW,
305
    OVSREC_BRIDGE_COL_OTHER_CONFIG,
306
    OVSREC_BRIDGE_COL_PORTS,
307
    OVSREC_BRIDGE_COL_PROTOCOLS,
308
    OVSREC_BRIDGE_COL_RSTP_ENABLE,
309
    OVSREC_BRIDGE_COL_RSTP_STATUS,
310
    OVSREC_BRIDGE_COL_SFLOW,
311
    OVSREC_BRIDGE_COL_STATUS,
312
    OVSREC_BRIDGE_COL_STP_ENABLE,
313
    OVSREC_BRIDGE_N_COLUMNS
314
};
315
316
0
#define ovsrec_bridge_col_auto_attach (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_AUTO_ATTACH])
317
0
#define ovsrec_bridge_col_controller (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_CONTROLLER])
318
0
#define ovsrec_bridge_col_datapath_id (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_DATAPATH_ID])
319
0
#define ovsrec_bridge_col_datapath_type (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_DATAPATH_TYPE])
320
0
#define ovsrec_bridge_col_datapath_version (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_DATAPATH_VERSION])
321
0
#define ovsrec_bridge_col_external_ids (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_EXTERNAL_IDS])
322
0
#define ovsrec_bridge_col_fail_mode (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_FAIL_MODE])
323
0
#define ovsrec_bridge_col_flood_vlans (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_FLOOD_VLANS])
324
0
#define ovsrec_bridge_col_flow_tables (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_FLOW_TABLES])
325
0
#define ovsrec_bridge_col_ipfix (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_IPFIX])
326
0
#define ovsrec_bridge_col_mcast_snooping_enable (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_MCAST_SNOOPING_ENABLE])
327
0
#define ovsrec_bridge_col_mirrors (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_MIRRORS])
328
0
#define ovsrec_bridge_col_name (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_NAME])
329
0
#define ovsrec_bridge_col_netflow (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_NETFLOW])
330
0
#define ovsrec_bridge_col_other_config (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_OTHER_CONFIG])
331
0
#define ovsrec_bridge_col_ports (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_PORTS])
332
0
#define ovsrec_bridge_col_protocols (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_PROTOCOLS])
333
0
#define ovsrec_bridge_col_rstp_enable (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_RSTP_ENABLE])
334
0
#define ovsrec_bridge_col_rstp_status (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_RSTP_STATUS])
335
0
#define ovsrec_bridge_col_sflow (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_SFLOW])
336
0
#define ovsrec_bridge_col_status (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_STATUS])
337
0
#define ovsrec_bridge_col_stp_enable (ovsrec_bridge_columns[OVSREC_BRIDGE_COL_STP_ENABLE])
338
339
extern struct ovsdb_idl_column ovsrec_bridge_columns[OVSREC_BRIDGE_N_COLUMNS];
340
bool ovsrec_server_has_bridge_table_col_auto_attach(const struct ovsdb_idl *); 
341
bool ovsrec_server_has_bridge_table_col_controller(const struct ovsdb_idl *); 
342
bool ovsrec_server_has_bridge_table_col_datapath_id(const struct ovsdb_idl *); 
343
bool ovsrec_server_has_bridge_table_col_datapath_type(const struct ovsdb_idl *); 
344
bool ovsrec_server_has_bridge_table_col_datapath_version(const struct ovsdb_idl *); 
345
bool ovsrec_server_has_bridge_table_col_external_ids(const struct ovsdb_idl *); 
346
bool ovsrec_server_has_bridge_table_col_fail_mode(const struct ovsdb_idl *); 
347
bool ovsrec_server_has_bridge_table_col_flood_vlans(const struct ovsdb_idl *); 
348
bool ovsrec_server_has_bridge_table_col_flow_tables(const struct ovsdb_idl *); 
349
bool ovsrec_server_has_bridge_table_col_ipfix(const struct ovsdb_idl *); 
350
bool ovsrec_server_has_bridge_table_col_mcast_snooping_enable(const struct ovsdb_idl *); 
351
bool ovsrec_server_has_bridge_table_col_mirrors(const struct ovsdb_idl *); 
352
bool ovsrec_server_has_bridge_table_col_name(const struct ovsdb_idl *); 
353
bool ovsrec_server_has_bridge_table_col_netflow(const struct ovsdb_idl *); 
354
bool ovsrec_server_has_bridge_table_col_other_config(const struct ovsdb_idl *); 
355
bool ovsrec_server_has_bridge_table_col_ports(const struct ovsdb_idl *); 
356
bool ovsrec_server_has_bridge_table_col_protocols(const struct ovsdb_idl *); 
357
bool ovsrec_server_has_bridge_table_col_rstp_enable(const struct ovsdb_idl *); 
358
bool ovsrec_server_has_bridge_table_col_rstp_status(const struct ovsdb_idl *); 
359
bool ovsrec_server_has_bridge_table_col_sflow(const struct ovsdb_idl *); 
360
bool ovsrec_server_has_bridge_table_col_status(const struct ovsdb_idl *); 
361
bool ovsrec_server_has_bridge_table_col_stp_enable(const struct ovsdb_idl *); 
362
363
bool ovsrec_server_has_bridge_table(const struct ovsdb_idl *);
364
const struct ovsrec_bridge_table *ovsrec_bridge_table_get(const struct ovsdb_idl *);
365
const struct ovsrec_bridge *ovsrec_bridge_table_first(const struct ovsrec_bridge_table *);
366
367
#define OVSREC_BRIDGE_TABLE_FOR_EACH(ROW, TABLE) \
368
        for ((ROW) = ovsrec_bridge_table_first(TABLE); \
369
             (ROW); \
370
             (ROW) = ovsrec_bridge_next(ROW))
371
#define OVSREC_BRIDGE_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
372
        for ((ROW) = ovsrec_bridge_table_first(TABLE); \
373
             (ROW) ? ((NEXT) = ovsrec_bridge_next(ROW), 1) : 0; \
374
             (ROW) = (NEXT))
375
#define OVSREC_BRIDGE_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
376
        for (const struct ovsrec_bridge * ROW__next = ((ROW) = ovsrec_bridge_table_first(TABLE), NULL); \
377
             (ROW) ? (ROW__next = ovsrec_bridge_next(ROW), 1) : (ROW__next = NULL, 0); \
378
             (ROW) = ROW__next)
379
#define OVSREC_BRIDGE_TABLE_FOR_EACH_SAFE(...)                                        \
380
        OVERLOAD_SAFE_MACRO(OVSREC_BRIDGE_TABLE_FOR_EACH_SAFE_LONG,                   \
381
                            OVSREC_BRIDGE_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
382
383
384
const struct ovsrec_bridge *ovsrec_bridge_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
385
const struct ovsrec_bridge *ovsrec_bridge_table_get_for_uuid(const struct ovsrec_bridge_table *, const struct uuid *);
386
const struct ovsrec_bridge *ovsrec_bridge_first(const struct ovsdb_idl *);
387
const struct ovsrec_bridge *ovsrec_bridge_next(const struct ovsrec_bridge *);
388
#define OVSREC_BRIDGE_FOR_EACH(ROW, IDL) \
389
        for ((ROW) = ovsrec_bridge_first(IDL); \
390
             (ROW); \
391
             (ROW) = ovsrec_bridge_next(ROW))
392
#define OVSREC_BRIDGE_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
393
        for ((ROW) = ovsrec_bridge_first(IDL); \
394
             (ROW) ? ((NEXT) = ovsrec_bridge_next(ROW), 1) : 0; \
395
             (ROW) = (NEXT))
396
#define OVSREC_BRIDGE_FOR_EACH_SAFE_SHORT(ROW, IDL) \
397
        for (const struct ovsrec_bridge * ROW__next = ((ROW) = ovsrec_bridge_first(IDL), NULL); \
398
             (ROW) ? (ROW__next = ovsrec_bridge_next(ROW), 1) : (ROW__next = NULL, 0); \
399
             (ROW) = ROW__next)
400
#define OVSREC_BRIDGE_FOR_EACH_SAFE(...)                                         \
401
        OVERLOAD_SAFE_MACRO(OVSREC_BRIDGE_FOR_EACH_SAFE_LONG,                    \
402
                            OVSREC_BRIDGE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
403
404
unsigned int ovsrec_bridge_get_seqno(const struct ovsdb_idl *);
405
unsigned int ovsrec_bridge_row_get_seqno(const struct ovsrec_bridge *row, enum ovsdb_idl_change change);
406
const struct ovsrec_bridge *ovsrec_bridge_track_get_first(const struct ovsdb_idl *);
407
const struct ovsrec_bridge *ovsrec_bridge_track_get_next(const struct ovsrec_bridge *);
408
#define OVSREC_BRIDGE_FOR_EACH_TRACKED(ROW, IDL) \
409
        for ((ROW) = ovsrec_bridge_track_get_first(IDL); \
410
             (ROW); \
411
             (ROW) = ovsrec_bridge_track_get_next(ROW))
412
413
const struct ovsrec_bridge *ovsrec_bridge_table_track_get_first(const struct ovsrec_bridge_table *);
414
#define OVSREC_BRIDGE_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
415
        for ((ROW) = ovsrec_bridge_table_track_get_first(TABLE); \
416
             (ROW); \
417
             (ROW) = ovsrec_bridge_track_get_next(ROW))
418
419
420
/* Returns true if 'row' was inserted since the last change tracking reset.
421
 *
422
 * Note: This can only be used to test rows of tracked changes. This cannot be
423
 * used to test if an uncommitted row that has been added locally is new or it
424
 * may given unexpected results. */
425
static inline bool ovsrec_bridge_is_new(const struct ovsrec_bridge *row)
426
0
{
427
0
    return ovsrec_bridge_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
428
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_bridge_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_bridge_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_bridge_is_new
429
430
/* Returns true if 'row' was deleted since the last change tracking reset.
431
 *
432
 * Note: This can only be used to test rows of tracked changes. This cannot be
433
 * used to test if an uncommitted row that has been added locally has been
434
 * deleted or it may given unexpected results. */
435
static inline bool ovsrec_bridge_is_deleted(const struct ovsrec_bridge *row)
436
0
{
437
0
    return ovsrec_bridge_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
438
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_bridge_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_bridge_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_bridge_is_deleted
439
440
void ovsrec_bridge_index_destroy_row(const struct ovsrec_bridge *);
441
442
struct ovsrec_bridge *ovsrec_bridge_index_find(struct ovsdb_idl_index *, const struct ovsrec_bridge *);
443
444
int ovsrec_bridge_index_compare(
445
    struct ovsdb_idl_index *, 
446
    const struct ovsrec_bridge *, 
447
    const struct ovsrec_bridge *);
448
struct ovsdb_idl_cursor ovsrec_bridge_cursor_first(struct ovsdb_idl_index *);
449
struct ovsdb_idl_cursor ovsrec_bridge_cursor_first_eq(
450
    struct ovsdb_idl_index *, const struct ovsrec_bridge *);
451
struct ovsdb_idl_cursor ovsrec_bridge_cursor_first_ge(
452
    struct ovsdb_idl_index *, const struct ovsrec_bridge *);
453
454
struct ovsrec_bridge *ovsrec_bridge_cursor_data(struct ovsdb_idl_cursor *);
455
456
#define OVSREC_BRIDGE_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
457
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_bridge_cursor_first_ge(INDEX, FROM); \
458
             (cursor__.position \
459
              && ((ROW) = ovsrec_bridge_cursor_data(&cursor__), \
460
                  !(TO) || ovsrec_bridge_index_compare(INDEX, ROW, TO) <= 0)); \
461
             ovsdb_idl_cursor_next(&cursor__))
462
#define OVSREC_BRIDGE_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
463
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_bridge_cursor_first_eq(INDEX, KEY); \
464
             (cursor__.position \
465
              ? ((ROW) = ovsrec_bridge_cursor_data(&cursor__), \
466
                 ovsdb_idl_cursor_next_eq(&cursor__), \
467
                 true) \
468
              : false); \
469
            )
470
#define OVSREC_BRIDGE_FOR_EACH_BYINDEX(ROW, INDEX) \
471
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_bridge_cursor_first(INDEX); \
472
             (cursor__.position \
473
              ? ((ROW) = ovsrec_bridge_cursor_data(&cursor__), \
474
                 ovsdb_idl_cursor_next(&cursor__), \
475
                 true) \
476
              : false); \
477
            )
478
479
void ovsrec_bridge_init(struct ovsrec_bridge *);
480
void ovsrec_bridge_delete(const struct ovsrec_bridge *);
481
struct ovsrec_bridge *ovsrec_bridge_insert(struct ovsdb_idl_txn *);
482
struct ovsrec_bridge *ovsrec_bridge_insert_persist_uuid(
483
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
484
485
/* Returns true if the tracked column referenced by 'enum ovsrec_bridge_column_id' of
486
 * the row referenced by 'struct ovsrec_bridge *' was updated since the last change
487
 * tracking reset.
488
 *
489
 * Note: This can only be used to test rows of tracked changes. This cannot be
490
 * used to test if an uncommitted row that has been added locally has been
491
 * updated or it may given unexpected results. */
492
bool ovsrec_bridge_is_updated(const struct ovsrec_bridge *, enum ovsrec_bridge_column_id);
493
494
void ovsrec_bridge_verify_auto_attach(const struct ovsrec_bridge *);
495
void ovsrec_bridge_verify_controller(const struct ovsrec_bridge *);
496
void ovsrec_bridge_verify_datapath_id(const struct ovsrec_bridge *);
497
void ovsrec_bridge_verify_datapath_type(const struct ovsrec_bridge *);
498
void ovsrec_bridge_verify_datapath_version(const struct ovsrec_bridge *);
499
void ovsrec_bridge_verify_external_ids(const struct ovsrec_bridge *);
500
void ovsrec_bridge_verify_fail_mode(const struct ovsrec_bridge *);
501
void ovsrec_bridge_verify_flood_vlans(const struct ovsrec_bridge *);
502
void ovsrec_bridge_verify_flow_tables(const struct ovsrec_bridge *);
503
void ovsrec_bridge_verify_ipfix(const struct ovsrec_bridge *);
504
void ovsrec_bridge_verify_mcast_snooping_enable(const struct ovsrec_bridge *);
505
void ovsrec_bridge_verify_mirrors(const struct ovsrec_bridge *);
506
void ovsrec_bridge_verify_name(const struct ovsrec_bridge *);
507
void ovsrec_bridge_verify_netflow(const struct ovsrec_bridge *);
508
void ovsrec_bridge_verify_other_config(const struct ovsrec_bridge *);
509
void ovsrec_bridge_verify_ports(const struct ovsrec_bridge *);
510
void ovsrec_bridge_verify_protocols(const struct ovsrec_bridge *);
511
void ovsrec_bridge_verify_rstp_enable(const struct ovsrec_bridge *);
512
void ovsrec_bridge_verify_rstp_status(const struct ovsrec_bridge *);
513
void ovsrec_bridge_verify_sflow(const struct ovsrec_bridge *);
514
void ovsrec_bridge_verify_status(const struct ovsrec_bridge *);
515
void ovsrec_bridge_verify_stp_enable(const struct ovsrec_bridge *);
516
517
const struct ovsdb_datum *ovsrec_bridge_get_auto_attach(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
518
const struct ovsdb_datum *ovsrec_bridge_get_controller(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
519
const struct ovsdb_datum *ovsrec_bridge_get_datapath_id(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
520
const struct ovsdb_datum *ovsrec_bridge_get_datapath_type(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
521
const struct ovsdb_datum *ovsrec_bridge_get_datapath_version(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
522
const struct ovsdb_datum *ovsrec_bridge_get_external_ids(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
523
const struct ovsdb_datum *ovsrec_bridge_get_fail_mode(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
524
const struct ovsdb_datum *ovsrec_bridge_get_flood_vlans(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
525
const struct ovsdb_datum *ovsrec_bridge_get_flow_tables(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
526
const struct ovsdb_datum *ovsrec_bridge_get_ipfix(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
527
const struct ovsdb_datum *ovsrec_bridge_get_mcast_snooping_enable(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
528
const struct ovsdb_datum *ovsrec_bridge_get_mirrors(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
529
const struct ovsdb_datum *ovsrec_bridge_get_name(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
530
const struct ovsdb_datum *ovsrec_bridge_get_netflow(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
531
const struct ovsdb_datum *ovsrec_bridge_get_other_config(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
532
const struct ovsdb_datum *ovsrec_bridge_get_ports(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
533
const struct ovsdb_datum *ovsrec_bridge_get_protocols(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
534
const struct ovsdb_datum *ovsrec_bridge_get_rstp_enable(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
535
const struct ovsdb_datum *ovsrec_bridge_get_rstp_status(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
536
const struct ovsdb_datum *ovsrec_bridge_get_sflow(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
537
const struct ovsdb_datum *ovsrec_bridge_get_status(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
538
const struct ovsdb_datum *ovsrec_bridge_get_stp_enable(const struct ovsrec_bridge *, enum ovsdb_atomic_type key_type);
539
540
void ovsrec_bridge_set_auto_attach(const struct ovsrec_bridge *, const struct ovsrec_autoattach *auto_attach);
541
void ovsrec_bridge_set_controller(const struct ovsrec_bridge *, struct ovsrec_controller **controller, size_t n_controller);
542
void ovsrec_bridge_set_datapath_id(const struct ovsrec_bridge *, const char *datapath_id);
543
void ovsrec_bridge_set_datapath_type(const struct ovsrec_bridge *, const char *datapath_type);
544
void ovsrec_bridge_set_datapath_version(const struct ovsrec_bridge *, const char *datapath_version);
545
void ovsrec_bridge_set_external_ids(const struct ovsrec_bridge *, const struct smap *);
546
void ovsrec_bridge_set_fail_mode(const struct ovsrec_bridge *, const char *fail_mode);
547
void ovsrec_bridge_set_flood_vlans(const struct ovsrec_bridge *, const int64_t *flood_vlans, size_t n_flood_vlans);
548
void ovsrec_bridge_set_flow_tables(const struct ovsrec_bridge *, const int64_t *key_flow_tables, struct ovsrec_flow_table **value_flow_tables, size_t n_flow_tables);
549
void ovsrec_bridge_set_ipfix(const struct ovsrec_bridge *, const struct ovsrec_ipfix *ipfix);
550
void ovsrec_bridge_set_mcast_snooping_enable(const struct ovsrec_bridge *, bool mcast_snooping_enable);
551
void ovsrec_bridge_set_mirrors(const struct ovsrec_bridge *, struct ovsrec_mirror **mirrors, size_t n_mirrors);
552
void ovsrec_bridge_set_name(const struct ovsrec_bridge *, const char *name);
553
void ovsrec_bridge_set_netflow(const struct ovsrec_bridge *, const struct ovsrec_netflow *netflow);
554
void ovsrec_bridge_set_other_config(const struct ovsrec_bridge *, const struct smap *);
555
void ovsrec_bridge_set_ports(const struct ovsrec_bridge *, struct ovsrec_port **ports, size_t n_ports);
556
void ovsrec_bridge_set_protocols(const struct ovsrec_bridge *, const char **protocols, size_t n_protocols);
557
void ovsrec_bridge_set_rstp_enable(const struct ovsrec_bridge *, bool rstp_enable);
558
void ovsrec_bridge_set_rstp_status(const struct ovsrec_bridge *, const struct smap *);
559
void ovsrec_bridge_set_sflow(const struct ovsrec_bridge *, const struct ovsrec_sflow *sflow);
560
void ovsrec_bridge_set_status(const struct ovsrec_bridge *, const struct smap *);
561
void ovsrec_bridge_set_stp_enable(const struct ovsrec_bridge *, bool stp_enable);
562
563
void ovsrec_bridge_update_auto_attach_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_autoattach *);
564
void ovsrec_bridge_update_auto_attach_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_autoattach *);
565
void ovsrec_bridge_add_clause_auto_attach(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *auto_attach);
566
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
567
void ovsrec_bridge_update_controller_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_controller *);
568
void ovsrec_bridge_update_controller_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_controller *);
569
void ovsrec_bridge_add_clause_controller(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **controller, size_t n_controller);
570
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
571
void ovsrec_bridge_update_datapath_id_addvalue(const struct ovsrec_bridge *,  const char *);
572
void ovsrec_bridge_update_datapath_id_delvalue(const struct ovsrec_bridge *,  const char *);
573
void ovsrec_bridge_add_clause_datapath_id(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *datapath_id);
574
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
575
void ovsrec_bridge_add_clause_datapath_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *datapath_type);
576
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
577
void ovsrec_bridge_add_clause_datapath_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *datapath_version);
578
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
579
void ovsrec_bridge_update_external_ids_setkey(const struct ovsrec_bridge *,  const char *, const char *);
580
void ovsrec_bridge_update_external_ids_delkey(const struct ovsrec_bridge *,  const char *);
581
void ovsrec_bridge_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
582
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
583
void ovsrec_bridge_update_fail_mode_addvalue(const struct ovsrec_bridge *,  const char *);
584
void ovsrec_bridge_update_fail_mode_delvalue(const struct ovsrec_bridge *,  const char *);
585
void ovsrec_bridge_add_clause_fail_mode(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *fail_mode);
586
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
587
void ovsrec_bridge_update_flood_vlans_addvalue(const struct ovsrec_bridge *,  int64_t );
588
void ovsrec_bridge_update_flood_vlans_delvalue(const struct ovsrec_bridge *,  int64_t );
589
void ovsrec_bridge_add_clause_flood_vlans(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *flood_vlans, size_t n_flood_vlans);
590
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
591
void ovsrec_bridge_update_flow_tables_setkey(const struct ovsrec_bridge *,  int64_t , const struct ovsrec_flow_table *);
592
void ovsrec_bridge_update_flow_tables_delkey(const struct ovsrec_bridge *,  int64_t );
593
void ovsrec_bridge_add_clause_flow_tables(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *key_flow_tables, struct uuid **value_flow_tables, size_t n_flow_tables);
594
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
595
void ovsrec_bridge_update_ipfix_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_ipfix *);
596
void ovsrec_bridge_update_ipfix_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_ipfix *);
597
void ovsrec_bridge_add_clause_ipfix(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *ipfix);
598
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
599
void ovsrec_bridge_add_clause_mcast_snooping_enable(struct ovsdb_idl_condition *, enum ovsdb_function function, bool mcast_snooping_enable);
600
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
601
void ovsrec_bridge_update_mirrors_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_mirror *);
602
void ovsrec_bridge_update_mirrors_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_mirror *);
603
void ovsrec_bridge_add_clause_mirrors(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **mirrors, size_t n_mirrors);
604
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
605
void ovsrec_bridge_add_clause_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *name);
606
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
607
void ovsrec_bridge_update_netflow_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_netflow *);
608
void ovsrec_bridge_update_netflow_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_netflow *);
609
void ovsrec_bridge_add_clause_netflow(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *netflow);
610
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
611
void ovsrec_bridge_update_other_config_setkey(const struct ovsrec_bridge *,  const char *, const char *);
612
void ovsrec_bridge_update_other_config_delkey(const struct ovsrec_bridge *,  const char *);
613
void ovsrec_bridge_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
614
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
615
void ovsrec_bridge_update_ports_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_port *);
616
void ovsrec_bridge_update_ports_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_port *);
617
void ovsrec_bridge_add_clause_ports(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **ports, size_t n_ports);
618
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
619
void ovsrec_bridge_update_protocols_addvalue(const struct ovsrec_bridge *,  const char *);
620
void ovsrec_bridge_update_protocols_delvalue(const struct ovsrec_bridge *,  const char *);
621
void ovsrec_bridge_add_clause_protocols(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **protocols, size_t n_protocols);
622
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
623
void ovsrec_bridge_add_clause_rstp_enable(struct ovsdb_idl_condition *, enum ovsdb_function function, bool rstp_enable);
624
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
625
void ovsrec_bridge_update_rstp_status_setkey(const struct ovsrec_bridge *,  const char *, const char *);
626
void ovsrec_bridge_update_rstp_status_delkey(const struct ovsrec_bridge *,  const char *);
627
void ovsrec_bridge_add_clause_rstp_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
628
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
629
void ovsrec_bridge_update_sflow_addvalue(const struct ovsrec_bridge *,  const struct ovsrec_sflow *);
630
void ovsrec_bridge_update_sflow_delvalue(const struct ovsrec_bridge *,  const struct ovsrec_sflow *);
631
void ovsrec_bridge_add_clause_sflow(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *sflow);
632
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
633
void ovsrec_bridge_update_status_setkey(const struct ovsrec_bridge *,  const char *, const char *);
634
void ovsrec_bridge_update_status_delkey(const struct ovsrec_bridge *,  const char *);
635
void ovsrec_bridge_add_clause_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
636
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
637
void ovsrec_bridge_add_clause_stp_enable(struct ovsdb_idl_condition *, enum ovsdb_function function, bool stp_enable);
638
unsigned int ovsrec_bridge_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
639
640
struct ovsrec_bridge *ovsrec_bridge_index_init_row(struct ovsdb_idl_index *);
641
void ovsrec_bridge_index_set_auto_attach(const struct ovsrec_bridge *,
642
const struct ovsrec_autoattach *auto_attach);
643
void ovsrec_bridge_index_set_controller(const struct ovsrec_bridge *,
644
struct ovsrec_controller **controller, size_t n_controller);
645
void ovsrec_bridge_index_set_datapath_id(const struct ovsrec_bridge *,
646
const char *datapath_id);
647
void ovsrec_bridge_index_set_datapath_type(const struct ovsrec_bridge *,
648
const char *datapath_type);
649
void ovsrec_bridge_index_set_datapath_version(const struct ovsrec_bridge *,
650
const char *datapath_version);
651
void ovsrec_bridge_index_set_external_ids(const struct ovsrec_bridge *,
652
const struct smap *);
653
void ovsrec_bridge_index_set_fail_mode(const struct ovsrec_bridge *,
654
const char *fail_mode);
655
void ovsrec_bridge_index_set_flood_vlans(const struct ovsrec_bridge *,
656
const int64_t *flood_vlans, size_t n_flood_vlans);
657
void ovsrec_bridge_index_set_flow_tables(const struct ovsrec_bridge *,
658
const int64_t *key_flow_tables, struct ovsrec_flow_table **value_flow_tables, size_t n_flow_tables);
659
void ovsrec_bridge_index_set_ipfix(const struct ovsrec_bridge *,
660
const struct ovsrec_ipfix *ipfix);
661
void ovsrec_bridge_index_set_mcast_snooping_enable(const struct ovsrec_bridge *,
662
bool mcast_snooping_enable);
663
void ovsrec_bridge_index_set_mirrors(const struct ovsrec_bridge *,
664
struct ovsrec_mirror **mirrors, size_t n_mirrors);
665
void ovsrec_bridge_index_set_name(const struct ovsrec_bridge *,
666
const char *name);
667
void ovsrec_bridge_index_set_netflow(const struct ovsrec_bridge *,
668
const struct ovsrec_netflow *netflow);
669
void ovsrec_bridge_index_set_other_config(const struct ovsrec_bridge *,
670
const struct smap *);
671
void ovsrec_bridge_index_set_ports(const struct ovsrec_bridge *,
672
struct ovsrec_port **ports, size_t n_ports);
673
void ovsrec_bridge_index_set_protocols(const struct ovsrec_bridge *,
674
const char **protocols, size_t n_protocols);
675
void ovsrec_bridge_index_set_rstp_enable(const struct ovsrec_bridge *,
676
bool rstp_enable);
677
void ovsrec_bridge_index_set_rstp_status(const struct ovsrec_bridge *,
678
const struct smap *);
679
void ovsrec_bridge_index_set_sflow(const struct ovsrec_bridge *,
680
const struct ovsrec_sflow *sflow);
681
void ovsrec_bridge_index_set_status(const struct ovsrec_bridge *,
682
const struct smap *);
683
void ovsrec_bridge_index_set_stp_enable(const struct ovsrec_bridge *,
684
bool stp_enable);
685

686
/* CT_Timeout_Policy table. */
687
struct ovsrec_ct_timeout_policy {
688
  struct ovsdb_idl_row header_;
689
690
  /* external_ids column. */
691
  struct smap external_ids;
692
693
  /* timeouts column. */
694
  char **key_timeouts;
695
  int64_t *value_timeouts;
696
  size_t n_timeouts;
697
};
698
699
enum ovsrec_ct_timeout_policy_column_id {
700
    OVSREC_CT_TIMEOUT_POLICY_COL_EXTERNAL_IDS,
701
    OVSREC_CT_TIMEOUT_POLICY_COL_TIMEOUTS,
702
    OVSREC_CT_TIMEOUT_POLICY_N_COLUMNS
703
};
704
705
0
#define ovsrec_ct_timeout_policy_col_external_ids (ovsrec_ct_timeout_policy_columns[OVSREC_CT_TIMEOUT_POLICY_COL_EXTERNAL_IDS])
706
0
#define ovsrec_ct_timeout_policy_col_timeouts (ovsrec_ct_timeout_policy_columns[OVSREC_CT_TIMEOUT_POLICY_COL_TIMEOUTS])
707
708
extern struct ovsdb_idl_column ovsrec_ct_timeout_policy_columns[OVSREC_CT_TIMEOUT_POLICY_N_COLUMNS];
709
bool ovsrec_server_has_ct_timeout_policy_table_col_external_ids(const struct ovsdb_idl *); 
710
bool ovsrec_server_has_ct_timeout_policy_table_col_timeouts(const struct ovsdb_idl *); 
711
712
bool ovsrec_server_has_ct_timeout_policy_table(const struct ovsdb_idl *);
713
const struct ovsrec_ct_timeout_policy_table *ovsrec_ct_timeout_policy_table_get(const struct ovsdb_idl *);
714
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_table_first(const struct ovsrec_ct_timeout_policy_table *);
715
716
#define OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH(ROW, TABLE) \
717
        for ((ROW) = ovsrec_ct_timeout_policy_table_first(TABLE); \
718
             (ROW); \
719
             (ROW) = ovsrec_ct_timeout_policy_next(ROW))
720
#define OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
721
        for ((ROW) = ovsrec_ct_timeout_policy_table_first(TABLE); \
722
             (ROW) ? ((NEXT) = ovsrec_ct_timeout_policy_next(ROW), 1) : 0; \
723
             (ROW) = (NEXT))
724
#define OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
725
        for (const struct ovsrec_ct_timeout_policy * ROW__next = ((ROW) = ovsrec_ct_timeout_policy_table_first(TABLE), NULL); \
726
             (ROW) ? (ROW__next = ovsrec_ct_timeout_policy_next(ROW), 1) : (ROW__next = NULL, 0); \
727
             (ROW) = ROW__next)
728
#define OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_SAFE(...)                                        \
729
        OVERLOAD_SAFE_MACRO(OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_SAFE_LONG,                   \
730
                            OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
731
732
733
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
734
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_table_get_for_uuid(const struct ovsrec_ct_timeout_policy_table *, const struct uuid *);
735
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_first(const struct ovsdb_idl *);
736
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_next(const struct ovsrec_ct_timeout_policy *);
737
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH(ROW, IDL) \
738
        for ((ROW) = ovsrec_ct_timeout_policy_first(IDL); \
739
             (ROW); \
740
             (ROW) = ovsrec_ct_timeout_policy_next(ROW))
741
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
742
        for ((ROW) = ovsrec_ct_timeout_policy_first(IDL); \
743
             (ROW) ? ((NEXT) = ovsrec_ct_timeout_policy_next(ROW), 1) : 0; \
744
             (ROW) = (NEXT))
745
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_SAFE_SHORT(ROW, IDL) \
746
        for (const struct ovsrec_ct_timeout_policy * ROW__next = ((ROW) = ovsrec_ct_timeout_policy_first(IDL), NULL); \
747
             (ROW) ? (ROW__next = ovsrec_ct_timeout_policy_next(ROW), 1) : (ROW__next = NULL, 0); \
748
             (ROW) = ROW__next)
749
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_SAFE(...)                                         \
750
        OVERLOAD_SAFE_MACRO(OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_SAFE_LONG,                    \
751
                            OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
752
753
unsigned int ovsrec_ct_timeout_policy_get_seqno(const struct ovsdb_idl *);
754
unsigned int ovsrec_ct_timeout_policy_row_get_seqno(const struct ovsrec_ct_timeout_policy *row, enum ovsdb_idl_change change);
755
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_track_get_first(const struct ovsdb_idl *);
756
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_track_get_next(const struct ovsrec_ct_timeout_policy *);
757
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_TRACKED(ROW, IDL) \
758
        for ((ROW) = ovsrec_ct_timeout_policy_track_get_first(IDL); \
759
             (ROW); \
760
             (ROW) = ovsrec_ct_timeout_policy_track_get_next(ROW))
761
762
const struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_table_track_get_first(const struct ovsrec_ct_timeout_policy_table *);
763
#define OVSREC_CT_TIMEOUT_POLICY_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
764
        for ((ROW) = ovsrec_ct_timeout_policy_table_track_get_first(TABLE); \
765
             (ROW); \
766
             (ROW) = ovsrec_ct_timeout_policy_track_get_next(ROW))
767
768
769
/* Returns true if 'row' was inserted since the last change tracking reset.
770
 *
771
 * Note: This can only be used to test rows of tracked changes. This cannot be
772
 * used to test if an uncommitted row that has been added locally is new or it
773
 * may given unexpected results. */
774
static inline bool ovsrec_ct_timeout_policy_is_new(const struct ovsrec_ct_timeout_policy *row)
775
0
{
776
0
    return ovsrec_ct_timeout_policy_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
777
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ct_timeout_policy_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_ct_timeout_policy_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_ct_timeout_policy_is_new
778
779
/* Returns true if 'row' was deleted since the last change tracking reset.
780
 *
781
 * Note: This can only be used to test rows of tracked changes. This cannot be
782
 * used to test if an uncommitted row that has been added locally has been
783
 * deleted or it may given unexpected results. */
784
static inline bool ovsrec_ct_timeout_policy_is_deleted(const struct ovsrec_ct_timeout_policy *row)
785
0
{
786
0
    return ovsrec_ct_timeout_policy_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
787
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ct_timeout_policy_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_ct_timeout_policy_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_ct_timeout_policy_is_deleted
788
789
void ovsrec_ct_timeout_policy_index_destroy_row(const struct ovsrec_ct_timeout_policy *);
790
791
struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_index_find(struct ovsdb_idl_index *, const struct ovsrec_ct_timeout_policy *);
792
793
int ovsrec_ct_timeout_policy_index_compare(
794
    struct ovsdb_idl_index *, 
795
    const struct ovsrec_ct_timeout_policy *, 
796
    const struct ovsrec_ct_timeout_policy *);
797
struct ovsdb_idl_cursor ovsrec_ct_timeout_policy_cursor_first(struct ovsdb_idl_index *);
798
struct ovsdb_idl_cursor ovsrec_ct_timeout_policy_cursor_first_eq(
799
    struct ovsdb_idl_index *, const struct ovsrec_ct_timeout_policy *);
800
struct ovsdb_idl_cursor ovsrec_ct_timeout_policy_cursor_first_ge(
801
    struct ovsdb_idl_index *, const struct ovsrec_ct_timeout_policy *);
802
803
struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_cursor_data(struct ovsdb_idl_cursor *);
804
805
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
806
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_timeout_policy_cursor_first_ge(INDEX, FROM); \
807
             (cursor__.position \
808
              && ((ROW) = ovsrec_ct_timeout_policy_cursor_data(&cursor__), \
809
                  !(TO) || ovsrec_ct_timeout_policy_index_compare(INDEX, ROW, TO) <= 0)); \
810
             ovsdb_idl_cursor_next(&cursor__))
811
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
812
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_timeout_policy_cursor_first_eq(INDEX, KEY); \
813
             (cursor__.position \
814
              ? ((ROW) = ovsrec_ct_timeout_policy_cursor_data(&cursor__), \
815
                 ovsdb_idl_cursor_next_eq(&cursor__), \
816
                 true) \
817
              : false); \
818
            )
819
#define OVSREC_CT_TIMEOUT_POLICY_FOR_EACH_BYINDEX(ROW, INDEX) \
820
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_timeout_policy_cursor_first(INDEX); \
821
             (cursor__.position \
822
              ? ((ROW) = ovsrec_ct_timeout_policy_cursor_data(&cursor__), \
823
                 ovsdb_idl_cursor_next(&cursor__), \
824
                 true) \
825
              : false); \
826
            )
827
828
void ovsrec_ct_timeout_policy_init(struct ovsrec_ct_timeout_policy *);
829
void ovsrec_ct_timeout_policy_delete(const struct ovsrec_ct_timeout_policy *);
830
struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_insert(struct ovsdb_idl_txn *);
831
struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_insert_persist_uuid(
832
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
833
834
/* Returns true if the tracked column referenced by 'enum ovsrec_ct_timeout_policy_column_id' of
835
 * the row referenced by 'struct ovsrec_ct_timeout_policy *' was updated since the last change
836
 * tracking reset.
837
 *
838
 * Note: This can only be used to test rows of tracked changes. This cannot be
839
 * used to test if an uncommitted row that has been added locally has been
840
 * updated or it may given unexpected results. */
841
bool ovsrec_ct_timeout_policy_is_updated(const struct ovsrec_ct_timeout_policy *, enum ovsrec_ct_timeout_policy_column_id);
842
843
void ovsrec_ct_timeout_policy_verify_external_ids(const struct ovsrec_ct_timeout_policy *);
844
void ovsrec_ct_timeout_policy_verify_timeouts(const struct ovsrec_ct_timeout_policy *);
845
846
const struct ovsdb_datum *ovsrec_ct_timeout_policy_get_external_ids(const struct ovsrec_ct_timeout_policy *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
847
const struct ovsdb_datum *ovsrec_ct_timeout_policy_get_timeouts(const struct ovsrec_ct_timeout_policy *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
848
849
void ovsrec_ct_timeout_policy_set_external_ids(const struct ovsrec_ct_timeout_policy *, const struct smap *);
850
void ovsrec_ct_timeout_policy_set_timeouts(const struct ovsrec_ct_timeout_policy *, const char **key_timeouts, const int64_t *value_timeouts, size_t n_timeouts);
851
852
void ovsrec_ct_timeout_policy_update_external_ids_setkey(const struct ovsrec_ct_timeout_policy *,  const char *, const char *);
853
void ovsrec_ct_timeout_policy_update_external_ids_delkey(const struct ovsrec_ct_timeout_policy *,  const char *);
854
void ovsrec_ct_timeout_policy_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
855
unsigned int ovsrec_ct_timeout_policy_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
856
void ovsrec_ct_timeout_policy_update_timeouts_setkey(const struct ovsrec_ct_timeout_policy *,  const char *, int64_t );
857
void ovsrec_ct_timeout_policy_update_timeouts_delkey(const struct ovsrec_ct_timeout_policy *,  const char *);
858
void ovsrec_ct_timeout_policy_add_clause_timeouts(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_timeouts, const int64_t *value_timeouts, size_t n_timeouts);
859
unsigned int ovsrec_ct_timeout_policy_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
860
861
struct ovsrec_ct_timeout_policy *ovsrec_ct_timeout_policy_index_init_row(struct ovsdb_idl_index *);
862
void ovsrec_ct_timeout_policy_index_set_external_ids(const struct ovsrec_ct_timeout_policy *,
863
const struct smap *);
864
void ovsrec_ct_timeout_policy_index_set_timeouts(const struct ovsrec_ct_timeout_policy *,
865
const char **key_timeouts, const int64_t *value_timeouts, size_t n_timeouts);
866

867
/* CT_Zone table. */
868
struct ovsrec_ct_zone {
869
  struct ovsdb_idl_row header_;
870
871
  /* external_ids column. */
872
  struct smap external_ids;
873
874
  /* timeout_policy column. */
875
  struct ovsrec_ct_timeout_policy *timeout_policy;
876
};
877
878
enum ovsrec_ct_zone_column_id {
879
    OVSREC_CT_ZONE_COL_EXTERNAL_IDS,
880
    OVSREC_CT_ZONE_COL_TIMEOUT_POLICY,
881
    OVSREC_CT_ZONE_N_COLUMNS
882
};
883
884
0
#define ovsrec_ct_zone_col_external_ids (ovsrec_ct_zone_columns[OVSREC_CT_ZONE_COL_EXTERNAL_IDS])
885
0
#define ovsrec_ct_zone_col_timeout_policy (ovsrec_ct_zone_columns[OVSREC_CT_ZONE_COL_TIMEOUT_POLICY])
886
887
extern struct ovsdb_idl_column ovsrec_ct_zone_columns[OVSREC_CT_ZONE_N_COLUMNS];
888
bool ovsrec_server_has_ct_zone_table_col_external_ids(const struct ovsdb_idl *); 
889
bool ovsrec_server_has_ct_zone_table_col_timeout_policy(const struct ovsdb_idl *); 
890
891
bool ovsrec_server_has_ct_zone_table(const struct ovsdb_idl *);
892
const struct ovsrec_ct_zone_table *ovsrec_ct_zone_table_get(const struct ovsdb_idl *);
893
const struct ovsrec_ct_zone *ovsrec_ct_zone_table_first(const struct ovsrec_ct_zone_table *);
894
895
#define OVSREC_CT_ZONE_TABLE_FOR_EACH(ROW, TABLE) \
896
        for ((ROW) = ovsrec_ct_zone_table_first(TABLE); \
897
             (ROW); \
898
             (ROW) = ovsrec_ct_zone_next(ROW))
899
#define OVSREC_CT_ZONE_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
900
        for ((ROW) = ovsrec_ct_zone_table_first(TABLE); \
901
             (ROW) ? ((NEXT) = ovsrec_ct_zone_next(ROW), 1) : 0; \
902
             (ROW) = (NEXT))
903
#define OVSREC_CT_ZONE_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
904
        for (const struct ovsrec_ct_zone * ROW__next = ((ROW) = ovsrec_ct_zone_table_first(TABLE), NULL); \
905
             (ROW) ? (ROW__next = ovsrec_ct_zone_next(ROW), 1) : (ROW__next = NULL, 0); \
906
             (ROW) = ROW__next)
907
#define OVSREC_CT_ZONE_TABLE_FOR_EACH_SAFE(...)                                        \
908
        OVERLOAD_SAFE_MACRO(OVSREC_CT_ZONE_TABLE_FOR_EACH_SAFE_LONG,                   \
909
                            OVSREC_CT_ZONE_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
910
911
912
const struct ovsrec_ct_zone *ovsrec_ct_zone_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
913
const struct ovsrec_ct_zone *ovsrec_ct_zone_table_get_for_uuid(const struct ovsrec_ct_zone_table *, const struct uuid *);
914
const struct ovsrec_ct_zone *ovsrec_ct_zone_first(const struct ovsdb_idl *);
915
const struct ovsrec_ct_zone *ovsrec_ct_zone_next(const struct ovsrec_ct_zone *);
916
#define OVSREC_CT_ZONE_FOR_EACH(ROW, IDL) \
917
        for ((ROW) = ovsrec_ct_zone_first(IDL); \
918
             (ROW); \
919
             (ROW) = ovsrec_ct_zone_next(ROW))
920
#define OVSREC_CT_ZONE_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
921
        for ((ROW) = ovsrec_ct_zone_first(IDL); \
922
             (ROW) ? ((NEXT) = ovsrec_ct_zone_next(ROW), 1) : 0; \
923
             (ROW) = (NEXT))
924
#define OVSREC_CT_ZONE_FOR_EACH_SAFE_SHORT(ROW, IDL) \
925
        for (const struct ovsrec_ct_zone * ROW__next = ((ROW) = ovsrec_ct_zone_first(IDL), NULL); \
926
             (ROW) ? (ROW__next = ovsrec_ct_zone_next(ROW), 1) : (ROW__next = NULL, 0); \
927
             (ROW) = ROW__next)
928
#define OVSREC_CT_ZONE_FOR_EACH_SAFE(...)                                         \
929
        OVERLOAD_SAFE_MACRO(OVSREC_CT_ZONE_FOR_EACH_SAFE_LONG,                    \
930
                            OVSREC_CT_ZONE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
931
932
unsigned int ovsrec_ct_zone_get_seqno(const struct ovsdb_idl *);
933
unsigned int ovsrec_ct_zone_row_get_seqno(const struct ovsrec_ct_zone *row, enum ovsdb_idl_change change);
934
const struct ovsrec_ct_zone *ovsrec_ct_zone_track_get_first(const struct ovsdb_idl *);
935
const struct ovsrec_ct_zone *ovsrec_ct_zone_track_get_next(const struct ovsrec_ct_zone *);
936
#define OVSREC_CT_ZONE_FOR_EACH_TRACKED(ROW, IDL) \
937
        for ((ROW) = ovsrec_ct_zone_track_get_first(IDL); \
938
             (ROW); \
939
             (ROW) = ovsrec_ct_zone_track_get_next(ROW))
940
941
const struct ovsrec_ct_zone *ovsrec_ct_zone_table_track_get_first(const struct ovsrec_ct_zone_table *);
942
#define OVSREC_CT_ZONE_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
943
        for ((ROW) = ovsrec_ct_zone_table_track_get_first(TABLE); \
944
             (ROW); \
945
             (ROW) = ovsrec_ct_zone_track_get_next(ROW))
946
947
948
/* Returns true if 'row' was inserted since the last change tracking reset.
949
 *
950
 * Note: This can only be used to test rows of tracked changes. This cannot be
951
 * used to test if an uncommitted row that has been added locally is new or it
952
 * may given unexpected results. */
953
static inline bool ovsrec_ct_zone_is_new(const struct ovsrec_ct_zone *row)
954
0
{
955
0
    return ovsrec_ct_zone_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
956
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ct_zone_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_ct_zone_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_ct_zone_is_new
957
958
/* Returns true if 'row' was deleted since the last change tracking reset.
959
 *
960
 * Note: This can only be used to test rows of tracked changes. This cannot be
961
 * used to test if an uncommitted row that has been added locally has been
962
 * deleted or it may given unexpected results. */
963
static inline bool ovsrec_ct_zone_is_deleted(const struct ovsrec_ct_zone *row)
964
0
{
965
0
    return ovsrec_ct_zone_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
966
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ct_zone_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_ct_zone_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_ct_zone_is_deleted
967
968
void ovsrec_ct_zone_index_destroy_row(const struct ovsrec_ct_zone *);
969
970
struct ovsrec_ct_zone *ovsrec_ct_zone_index_find(struct ovsdb_idl_index *, const struct ovsrec_ct_zone *);
971
972
int ovsrec_ct_zone_index_compare(
973
    struct ovsdb_idl_index *, 
974
    const struct ovsrec_ct_zone *, 
975
    const struct ovsrec_ct_zone *);
976
struct ovsdb_idl_cursor ovsrec_ct_zone_cursor_first(struct ovsdb_idl_index *);
977
struct ovsdb_idl_cursor ovsrec_ct_zone_cursor_first_eq(
978
    struct ovsdb_idl_index *, const struct ovsrec_ct_zone *);
979
struct ovsdb_idl_cursor ovsrec_ct_zone_cursor_first_ge(
980
    struct ovsdb_idl_index *, const struct ovsrec_ct_zone *);
981
982
struct ovsrec_ct_zone *ovsrec_ct_zone_cursor_data(struct ovsdb_idl_cursor *);
983
984
#define OVSREC_CT_ZONE_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
985
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_zone_cursor_first_ge(INDEX, FROM); \
986
             (cursor__.position \
987
              && ((ROW) = ovsrec_ct_zone_cursor_data(&cursor__), \
988
                  !(TO) || ovsrec_ct_zone_index_compare(INDEX, ROW, TO) <= 0)); \
989
             ovsdb_idl_cursor_next(&cursor__))
990
#define OVSREC_CT_ZONE_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
991
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_zone_cursor_first_eq(INDEX, KEY); \
992
             (cursor__.position \
993
              ? ((ROW) = ovsrec_ct_zone_cursor_data(&cursor__), \
994
                 ovsdb_idl_cursor_next_eq(&cursor__), \
995
                 true) \
996
              : false); \
997
            )
998
#define OVSREC_CT_ZONE_FOR_EACH_BYINDEX(ROW, INDEX) \
999
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ct_zone_cursor_first(INDEX); \
1000
             (cursor__.position \
1001
              ? ((ROW) = ovsrec_ct_zone_cursor_data(&cursor__), \
1002
                 ovsdb_idl_cursor_next(&cursor__), \
1003
                 true) \
1004
              : false); \
1005
            )
1006
1007
void ovsrec_ct_zone_init(struct ovsrec_ct_zone *);
1008
void ovsrec_ct_zone_delete(const struct ovsrec_ct_zone *);
1009
struct ovsrec_ct_zone *ovsrec_ct_zone_insert(struct ovsdb_idl_txn *);
1010
struct ovsrec_ct_zone *ovsrec_ct_zone_insert_persist_uuid(
1011
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
1012
1013
/* Returns true if the tracked column referenced by 'enum ovsrec_ct_zone_column_id' of
1014
 * the row referenced by 'struct ovsrec_ct_zone *' was updated since the last change
1015
 * tracking reset.
1016
 *
1017
 * Note: This can only be used to test rows of tracked changes. This cannot be
1018
 * used to test if an uncommitted row that has been added locally has been
1019
 * updated or it may given unexpected results. */
1020
bool ovsrec_ct_zone_is_updated(const struct ovsrec_ct_zone *, enum ovsrec_ct_zone_column_id);
1021
1022
void ovsrec_ct_zone_verify_external_ids(const struct ovsrec_ct_zone *);
1023
void ovsrec_ct_zone_verify_timeout_policy(const struct ovsrec_ct_zone *);
1024
1025
const struct ovsdb_datum *ovsrec_ct_zone_get_external_ids(const struct ovsrec_ct_zone *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1026
const struct ovsdb_datum *ovsrec_ct_zone_get_timeout_policy(const struct ovsrec_ct_zone *, enum ovsdb_atomic_type key_type);
1027
1028
void ovsrec_ct_zone_set_external_ids(const struct ovsrec_ct_zone *, const struct smap *);
1029
void ovsrec_ct_zone_set_timeout_policy(const struct ovsrec_ct_zone *, const struct ovsrec_ct_timeout_policy *timeout_policy);
1030
1031
void ovsrec_ct_zone_update_external_ids_setkey(const struct ovsrec_ct_zone *,  const char *, const char *);
1032
void ovsrec_ct_zone_update_external_ids_delkey(const struct ovsrec_ct_zone *,  const char *);
1033
void ovsrec_ct_zone_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1034
unsigned int ovsrec_ct_zone_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1035
void ovsrec_ct_zone_update_timeout_policy_addvalue(const struct ovsrec_ct_zone *,  const struct ovsrec_ct_timeout_policy *);
1036
void ovsrec_ct_zone_update_timeout_policy_delvalue(const struct ovsrec_ct_zone *,  const struct ovsrec_ct_timeout_policy *);
1037
void ovsrec_ct_zone_add_clause_timeout_policy(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *timeout_policy);
1038
unsigned int ovsrec_ct_zone_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1039
1040
struct ovsrec_ct_zone *ovsrec_ct_zone_index_init_row(struct ovsdb_idl_index *);
1041
void ovsrec_ct_zone_index_set_external_ids(const struct ovsrec_ct_zone *,
1042
const struct smap *);
1043
void ovsrec_ct_zone_index_set_timeout_policy(const struct ovsrec_ct_zone *,
1044
const struct ovsrec_ct_timeout_policy *timeout_policy);
1045

1046
/* Controller table. */
1047
struct ovsrec_controller {
1048
  struct ovsdb_idl_row header_;
1049
1050
  /* connection_mode column. */
1051
  char *connection_mode;
1052
1053
  /* controller_burst_limit column. */
1054
  int64_t *controller_burst_limit;
1055
  size_t n_controller_burst_limit;
1056
1057
  /* controller_queue_size column. */
1058
  int64_t *controller_queue_size;
1059
  size_t n_controller_queue_size;
1060
1061
  /* controller_rate_limit column. */
1062
  int64_t *controller_rate_limit;
1063
  size_t n_controller_rate_limit;
1064
1065
  /* enable_async_messages column. */
1066
  bool *enable_async_messages;
1067
  size_t n_enable_async_messages;
1068
1069
  /* external_ids column. */
1070
  struct smap external_ids;
1071
1072
  /* inactivity_probe column. */
1073
  int64_t *inactivity_probe;
1074
  size_t n_inactivity_probe;
1075
1076
  /* is_connected column. */
1077
  bool is_connected;
1078
1079
  /* local_gateway column. */
1080
  char *local_gateway;
1081
1082
  /* local_ip column. */
1083
  char *local_ip;
1084
1085
  /* local_netmask column. */
1086
  char *local_netmask;
1087
1088
  /* max_backoff column. */
1089
  int64_t *max_backoff;
1090
  size_t n_max_backoff;
1091
1092
  /* other_config column. */
1093
  struct smap other_config;
1094
1095
  /* role column. */
1096
  char *role;
1097
1098
  /* status column. */
1099
  struct smap status;
1100
1101
  /* target column. */
1102
  char *target; /* Always nonnull. */
1103
1104
  /* type column. */
1105
  char *type;
1106
};
1107
1108
enum ovsrec_controller_column_id {
1109
    OVSREC_CONTROLLER_COL_CONNECTION_MODE,
1110
    OVSREC_CONTROLLER_COL_CONTROLLER_BURST_LIMIT,
1111
    OVSREC_CONTROLLER_COL_CONTROLLER_QUEUE_SIZE,
1112
    OVSREC_CONTROLLER_COL_CONTROLLER_RATE_LIMIT,
1113
    OVSREC_CONTROLLER_COL_ENABLE_ASYNC_MESSAGES,
1114
    OVSREC_CONTROLLER_COL_EXTERNAL_IDS,
1115
    OVSREC_CONTROLLER_COL_INACTIVITY_PROBE,
1116
    OVSREC_CONTROLLER_COL_IS_CONNECTED,
1117
    OVSREC_CONTROLLER_COL_LOCAL_GATEWAY,
1118
    OVSREC_CONTROLLER_COL_LOCAL_IP,
1119
    OVSREC_CONTROLLER_COL_LOCAL_NETMASK,
1120
    OVSREC_CONTROLLER_COL_MAX_BACKOFF,
1121
    OVSREC_CONTROLLER_COL_OTHER_CONFIG,
1122
    OVSREC_CONTROLLER_COL_ROLE,
1123
    OVSREC_CONTROLLER_COL_STATUS,
1124
    OVSREC_CONTROLLER_COL_TARGET,
1125
    OVSREC_CONTROLLER_COL_TYPE,
1126
    OVSREC_CONTROLLER_N_COLUMNS
1127
};
1128
1129
0
#define ovsrec_controller_col_connection_mode (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_CONNECTION_MODE])
1130
0
#define ovsrec_controller_col_controller_burst_limit (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_CONTROLLER_BURST_LIMIT])
1131
0
#define ovsrec_controller_col_controller_queue_size (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_CONTROLLER_QUEUE_SIZE])
1132
0
#define ovsrec_controller_col_controller_rate_limit (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_CONTROLLER_RATE_LIMIT])
1133
0
#define ovsrec_controller_col_enable_async_messages (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_ENABLE_ASYNC_MESSAGES])
1134
0
#define ovsrec_controller_col_external_ids (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_EXTERNAL_IDS])
1135
0
#define ovsrec_controller_col_inactivity_probe (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_INACTIVITY_PROBE])
1136
0
#define ovsrec_controller_col_is_connected (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_IS_CONNECTED])
1137
0
#define ovsrec_controller_col_local_gateway (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_LOCAL_GATEWAY])
1138
0
#define ovsrec_controller_col_local_ip (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_LOCAL_IP])
1139
0
#define ovsrec_controller_col_local_netmask (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_LOCAL_NETMASK])
1140
0
#define ovsrec_controller_col_max_backoff (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_MAX_BACKOFF])
1141
0
#define ovsrec_controller_col_other_config (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_OTHER_CONFIG])
1142
0
#define ovsrec_controller_col_role (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_ROLE])
1143
0
#define ovsrec_controller_col_status (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_STATUS])
1144
0
#define ovsrec_controller_col_target (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_TARGET])
1145
0
#define ovsrec_controller_col_type (ovsrec_controller_columns[OVSREC_CONTROLLER_COL_TYPE])
1146
1147
extern struct ovsdb_idl_column ovsrec_controller_columns[OVSREC_CONTROLLER_N_COLUMNS];
1148
bool ovsrec_server_has_controller_table_col_connection_mode(const struct ovsdb_idl *); 
1149
bool ovsrec_server_has_controller_table_col_controller_burst_limit(const struct ovsdb_idl *); 
1150
bool ovsrec_server_has_controller_table_col_controller_queue_size(const struct ovsdb_idl *); 
1151
bool ovsrec_server_has_controller_table_col_controller_rate_limit(const struct ovsdb_idl *); 
1152
bool ovsrec_server_has_controller_table_col_enable_async_messages(const struct ovsdb_idl *); 
1153
bool ovsrec_server_has_controller_table_col_external_ids(const struct ovsdb_idl *); 
1154
bool ovsrec_server_has_controller_table_col_inactivity_probe(const struct ovsdb_idl *); 
1155
bool ovsrec_server_has_controller_table_col_is_connected(const struct ovsdb_idl *); 
1156
bool ovsrec_server_has_controller_table_col_local_gateway(const struct ovsdb_idl *); 
1157
bool ovsrec_server_has_controller_table_col_local_ip(const struct ovsdb_idl *); 
1158
bool ovsrec_server_has_controller_table_col_local_netmask(const struct ovsdb_idl *); 
1159
bool ovsrec_server_has_controller_table_col_max_backoff(const struct ovsdb_idl *); 
1160
bool ovsrec_server_has_controller_table_col_other_config(const struct ovsdb_idl *); 
1161
bool ovsrec_server_has_controller_table_col_role(const struct ovsdb_idl *); 
1162
bool ovsrec_server_has_controller_table_col_status(const struct ovsdb_idl *); 
1163
bool ovsrec_server_has_controller_table_col_target(const struct ovsdb_idl *); 
1164
bool ovsrec_server_has_controller_table_col_type(const struct ovsdb_idl *); 
1165
1166
bool ovsrec_server_has_controller_table(const struct ovsdb_idl *);
1167
const struct ovsrec_controller_table *ovsrec_controller_table_get(const struct ovsdb_idl *);
1168
const struct ovsrec_controller *ovsrec_controller_table_first(const struct ovsrec_controller_table *);
1169
1170
#define OVSREC_CONTROLLER_TABLE_FOR_EACH(ROW, TABLE) \
1171
        for ((ROW) = ovsrec_controller_table_first(TABLE); \
1172
             (ROW); \
1173
             (ROW) = ovsrec_controller_next(ROW))
1174
#define OVSREC_CONTROLLER_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
1175
        for ((ROW) = ovsrec_controller_table_first(TABLE); \
1176
             (ROW) ? ((NEXT) = ovsrec_controller_next(ROW), 1) : 0; \
1177
             (ROW) = (NEXT))
1178
#define OVSREC_CONTROLLER_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
1179
        for (const struct ovsrec_controller * ROW__next = ((ROW) = ovsrec_controller_table_first(TABLE), NULL); \
1180
             (ROW) ? (ROW__next = ovsrec_controller_next(ROW), 1) : (ROW__next = NULL, 0); \
1181
             (ROW) = ROW__next)
1182
#define OVSREC_CONTROLLER_TABLE_FOR_EACH_SAFE(...)                                        \
1183
        OVERLOAD_SAFE_MACRO(OVSREC_CONTROLLER_TABLE_FOR_EACH_SAFE_LONG,                   \
1184
                            OVSREC_CONTROLLER_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1185
1186
1187
const struct ovsrec_controller *ovsrec_controller_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
1188
const struct ovsrec_controller *ovsrec_controller_table_get_for_uuid(const struct ovsrec_controller_table *, const struct uuid *);
1189
const struct ovsrec_controller *ovsrec_controller_first(const struct ovsdb_idl *);
1190
const struct ovsrec_controller *ovsrec_controller_next(const struct ovsrec_controller *);
1191
#define OVSREC_CONTROLLER_FOR_EACH(ROW, IDL) \
1192
        for ((ROW) = ovsrec_controller_first(IDL); \
1193
             (ROW); \
1194
             (ROW) = ovsrec_controller_next(ROW))
1195
#define OVSREC_CONTROLLER_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
1196
        for ((ROW) = ovsrec_controller_first(IDL); \
1197
             (ROW) ? ((NEXT) = ovsrec_controller_next(ROW), 1) : 0; \
1198
             (ROW) = (NEXT))
1199
#define OVSREC_CONTROLLER_FOR_EACH_SAFE_SHORT(ROW, IDL) \
1200
        for (const struct ovsrec_controller * ROW__next = ((ROW) = ovsrec_controller_first(IDL), NULL); \
1201
             (ROW) ? (ROW__next = ovsrec_controller_next(ROW), 1) : (ROW__next = NULL, 0); \
1202
             (ROW) = ROW__next)
1203
#define OVSREC_CONTROLLER_FOR_EACH_SAFE(...)                                         \
1204
        OVERLOAD_SAFE_MACRO(OVSREC_CONTROLLER_FOR_EACH_SAFE_LONG,                    \
1205
                            OVSREC_CONTROLLER_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1206
1207
unsigned int ovsrec_controller_get_seqno(const struct ovsdb_idl *);
1208
unsigned int ovsrec_controller_row_get_seqno(const struct ovsrec_controller *row, enum ovsdb_idl_change change);
1209
const struct ovsrec_controller *ovsrec_controller_track_get_first(const struct ovsdb_idl *);
1210
const struct ovsrec_controller *ovsrec_controller_track_get_next(const struct ovsrec_controller *);
1211
#define OVSREC_CONTROLLER_FOR_EACH_TRACKED(ROW, IDL) \
1212
        for ((ROW) = ovsrec_controller_track_get_first(IDL); \
1213
             (ROW); \
1214
             (ROW) = ovsrec_controller_track_get_next(ROW))
1215
1216
const struct ovsrec_controller *ovsrec_controller_table_track_get_first(const struct ovsrec_controller_table *);
1217
#define OVSREC_CONTROLLER_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
1218
        for ((ROW) = ovsrec_controller_table_track_get_first(TABLE); \
1219
             (ROW); \
1220
             (ROW) = ovsrec_controller_track_get_next(ROW))
1221
1222
1223
/* Returns true if 'row' was inserted since the last change tracking reset.
1224
 *
1225
 * Note: This can only be used to test rows of tracked changes. This cannot be
1226
 * used to test if an uncommitted row that has been added locally is new or it
1227
 * may given unexpected results. */
1228
static inline bool ovsrec_controller_is_new(const struct ovsrec_controller *row)
1229
0
{
1230
0
    return ovsrec_controller_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
1231
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_controller_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_controller_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_controller_is_new
1232
1233
/* Returns true if 'row' was deleted since the last change tracking reset.
1234
 *
1235
 * Note: This can only be used to test rows of tracked changes. This cannot be
1236
 * used to test if an uncommitted row that has been added locally has been
1237
 * deleted or it may given unexpected results. */
1238
static inline bool ovsrec_controller_is_deleted(const struct ovsrec_controller *row)
1239
0
{
1240
0
    return ovsrec_controller_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
1241
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_controller_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_controller_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_controller_is_deleted
1242
1243
void ovsrec_controller_index_destroy_row(const struct ovsrec_controller *);
1244
1245
struct ovsrec_controller *ovsrec_controller_index_find(struct ovsdb_idl_index *, const struct ovsrec_controller *);
1246
1247
int ovsrec_controller_index_compare(
1248
    struct ovsdb_idl_index *, 
1249
    const struct ovsrec_controller *, 
1250
    const struct ovsrec_controller *);
1251
struct ovsdb_idl_cursor ovsrec_controller_cursor_first(struct ovsdb_idl_index *);
1252
struct ovsdb_idl_cursor ovsrec_controller_cursor_first_eq(
1253
    struct ovsdb_idl_index *, const struct ovsrec_controller *);
1254
struct ovsdb_idl_cursor ovsrec_controller_cursor_first_ge(
1255
    struct ovsdb_idl_index *, const struct ovsrec_controller *);
1256
1257
struct ovsrec_controller *ovsrec_controller_cursor_data(struct ovsdb_idl_cursor *);
1258
1259
#define OVSREC_CONTROLLER_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
1260
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_controller_cursor_first_ge(INDEX, FROM); \
1261
             (cursor__.position \
1262
              && ((ROW) = ovsrec_controller_cursor_data(&cursor__), \
1263
                  !(TO) || ovsrec_controller_index_compare(INDEX, ROW, TO) <= 0)); \
1264
             ovsdb_idl_cursor_next(&cursor__))
1265
#define OVSREC_CONTROLLER_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
1266
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_controller_cursor_first_eq(INDEX, KEY); \
1267
             (cursor__.position \
1268
              ? ((ROW) = ovsrec_controller_cursor_data(&cursor__), \
1269
                 ovsdb_idl_cursor_next_eq(&cursor__), \
1270
                 true) \
1271
              : false); \
1272
            )
1273
#define OVSREC_CONTROLLER_FOR_EACH_BYINDEX(ROW, INDEX) \
1274
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_controller_cursor_first(INDEX); \
1275
             (cursor__.position \
1276
              ? ((ROW) = ovsrec_controller_cursor_data(&cursor__), \
1277
                 ovsdb_idl_cursor_next(&cursor__), \
1278
                 true) \
1279
              : false); \
1280
            )
1281
1282
void ovsrec_controller_init(struct ovsrec_controller *);
1283
void ovsrec_controller_delete(const struct ovsrec_controller *);
1284
struct ovsrec_controller *ovsrec_controller_insert(struct ovsdb_idl_txn *);
1285
struct ovsrec_controller *ovsrec_controller_insert_persist_uuid(
1286
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
1287
1288
/* Returns true if the tracked column referenced by 'enum ovsrec_controller_column_id' of
1289
 * the row referenced by 'struct ovsrec_controller *' was updated since the last change
1290
 * tracking reset.
1291
 *
1292
 * Note: This can only be used to test rows of tracked changes. This cannot be
1293
 * used to test if an uncommitted row that has been added locally has been
1294
 * updated or it may given unexpected results. */
1295
bool ovsrec_controller_is_updated(const struct ovsrec_controller *, enum ovsrec_controller_column_id);
1296
1297
void ovsrec_controller_verify_connection_mode(const struct ovsrec_controller *);
1298
void ovsrec_controller_verify_controller_burst_limit(const struct ovsrec_controller *);
1299
void ovsrec_controller_verify_controller_queue_size(const struct ovsrec_controller *);
1300
void ovsrec_controller_verify_controller_rate_limit(const struct ovsrec_controller *);
1301
void ovsrec_controller_verify_enable_async_messages(const struct ovsrec_controller *);
1302
void ovsrec_controller_verify_external_ids(const struct ovsrec_controller *);
1303
void ovsrec_controller_verify_inactivity_probe(const struct ovsrec_controller *);
1304
void ovsrec_controller_verify_is_connected(const struct ovsrec_controller *);
1305
void ovsrec_controller_verify_local_gateway(const struct ovsrec_controller *);
1306
void ovsrec_controller_verify_local_ip(const struct ovsrec_controller *);
1307
void ovsrec_controller_verify_local_netmask(const struct ovsrec_controller *);
1308
void ovsrec_controller_verify_max_backoff(const struct ovsrec_controller *);
1309
void ovsrec_controller_verify_other_config(const struct ovsrec_controller *);
1310
void ovsrec_controller_verify_role(const struct ovsrec_controller *);
1311
void ovsrec_controller_verify_status(const struct ovsrec_controller *);
1312
void ovsrec_controller_verify_target(const struct ovsrec_controller *);
1313
void ovsrec_controller_verify_type(const struct ovsrec_controller *);
1314
1315
const struct ovsdb_datum *ovsrec_controller_get_connection_mode(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1316
const struct ovsdb_datum *ovsrec_controller_get_controller_burst_limit(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1317
const struct ovsdb_datum *ovsrec_controller_get_controller_queue_size(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1318
const struct ovsdb_datum *ovsrec_controller_get_controller_rate_limit(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1319
const struct ovsdb_datum *ovsrec_controller_get_enable_async_messages(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1320
const struct ovsdb_datum *ovsrec_controller_get_external_ids(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1321
const struct ovsdb_datum *ovsrec_controller_get_inactivity_probe(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1322
const struct ovsdb_datum *ovsrec_controller_get_is_connected(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1323
const struct ovsdb_datum *ovsrec_controller_get_local_gateway(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1324
const struct ovsdb_datum *ovsrec_controller_get_local_ip(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1325
const struct ovsdb_datum *ovsrec_controller_get_local_netmask(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1326
const struct ovsdb_datum *ovsrec_controller_get_max_backoff(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1327
const struct ovsdb_datum *ovsrec_controller_get_other_config(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1328
const struct ovsdb_datum *ovsrec_controller_get_role(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1329
const struct ovsdb_datum *ovsrec_controller_get_status(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1330
const struct ovsdb_datum *ovsrec_controller_get_target(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1331
const struct ovsdb_datum *ovsrec_controller_get_type(const struct ovsrec_controller *, enum ovsdb_atomic_type key_type);
1332
1333
void ovsrec_controller_set_connection_mode(const struct ovsrec_controller *, const char *connection_mode);
1334
void ovsrec_controller_set_controller_burst_limit(const struct ovsrec_controller *, const int64_t *controller_burst_limit, size_t n_controller_burst_limit);
1335
void ovsrec_controller_set_controller_queue_size(const struct ovsrec_controller *, const int64_t *controller_queue_size, size_t n_controller_queue_size);
1336
void ovsrec_controller_set_controller_rate_limit(const struct ovsrec_controller *, const int64_t *controller_rate_limit, size_t n_controller_rate_limit);
1337
void ovsrec_controller_set_enable_async_messages(const struct ovsrec_controller *, const bool *enable_async_messages, size_t n_enable_async_messages);
1338
void ovsrec_controller_set_external_ids(const struct ovsrec_controller *, const struct smap *);
1339
void ovsrec_controller_set_inactivity_probe(const struct ovsrec_controller *, const int64_t *inactivity_probe, size_t n_inactivity_probe);
1340
void ovsrec_controller_set_is_connected(const struct ovsrec_controller *, bool is_connected);
1341
void ovsrec_controller_set_local_gateway(const struct ovsrec_controller *, const char *local_gateway);
1342
void ovsrec_controller_set_local_ip(const struct ovsrec_controller *, const char *local_ip);
1343
void ovsrec_controller_set_local_netmask(const struct ovsrec_controller *, const char *local_netmask);
1344
void ovsrec_controller_set_max_backoff(const struct ovsrec_controller *, const int64_t *max_backoff, size_t n_max_backoff);
1345
void ovsrec_controller_set_other_config(const struct ovsrec_controller *, const struct smap *);
1346
void ovsrec_controller_set_role(const struct ovsrec_controller *, const char *role);
1347
void ovsrec_controller_set_status(const struct ovsrec_controller *, const struct smap *);
1348
void ovsrec_controller_set_target(const struct ovsrec_controller *, const char *target);
1349
void ovsrec_controller_set_type(const struct ovsrec_controller *, const char *type);
1350
1351
void ovsrec_controller_update_connection_mode_addvalue(const struct ovsrec_controller *,  const char *);
1352
void ovsrec_controller_update_connection_mode_delvalue(const struct ovsrec_controller *,  const char *);
1353
void ovsrec_controller_add_clause_connection_mode(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *connection_mode);
1354
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1355
void ovsrec_controller_update_controller_burst_limit_addvalue(const struct ovsrec_controller *,  int64_t );
1356
void ovsrec_controller_update_controller_burst_limit_delvalue(const struct ovsrec_controller *,  int64_t );
1357
void ovsrec_controller_add_clause_controller_burst_limit(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *controller_burst_limit, size_t n_controller_burst_limit);
1358
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1359
void ovsrec_controller_update_controller_queue_size_addvalue(const struct ovsrec_controller *,  int64_t );
1360
void ovsrec_controller_update_controller_queue_size_delvalue(const struct ovsrec_controller *,  int64_t );
1361
void ovsrec_controller_add_clause_controller_queue_size(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *controller_queue_size, size_t n_controller_queue_size);
1362
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1363
void ovsrec_controller_update_controller_rate_limit_addvalue(const struct ovsrec_controller *,  int64_t );
1364
void ovsrec_controller_update_controller_rate_limit_delvalue(const struct ovsrec_controller *,  int64_t );
1365
void ovsrec_controller_add_clause_controller_rate_limit(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *controller_rate_limit, size_t n_controller_rate_limit);
1366
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1367
void ovsrec_controller_update_enable_async_messages_addvalue(const struct ovsrec_controller *,  bool );
1368
void ovsrec_controller_update_enable_async_messages_delvalue(const struct ovsrec_controller *,  bool );
1369
void ovsrec_controller_add_clause_enable_async_messages(struct ovsdb_idl_condition *, enum ovsdb_function function, const bool *enable_async_messages, size_t n_enable_async_messages);
1370
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1371
void ovsrec_controller_update_external_ids_setkey(const struct ovsrec_controller *,  const char *, const char *);
1372
void ovsrec_controller_update_external_ids_delkey(const struct ovsrec_controller *,  const char *);
1373
void ovsrec_controller_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1374
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1375
void ovsrec_controller_update_inactivity_probe_addvalue(const struct ovsrec_controller *,  int64_t );
1376
void ovsrec_controller_update_inactivity_probe_delvalue(const struct ovsrec_controller *,  int64_t );
1377
void ovsrec_controller_add_clause_inactivity_probe(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *inactivity_probe, size_t n_inactivity_probe);
1378
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1379
void ovsrec_controller_add_clause_is_connected(struct ovsdb_idl_condition *, enum ovsdb_function function, bool is_connected);
1380
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1381
void ovsrec_controller_update_local_gateway_addvalue(const struct ovsrec_controller *,  const char *);
1382
void ovsrec_controller_update_local_gateway_delvalue(const struct ovsrec_controller *,  const char *);
1383
void ovsrec_controller_add_clause_local_gateway(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *local_gateway);
1384
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1385
void ovsrec_controller_update_local_ip_addvalue(const struct ovsrec_controller *,  const char *);
1386
void ovsrec_controller_update_local_ip_delvalue(const struct ovsrec_controller *,  const char *);
1387
void ovsrec_controller_add_clause_local_ip(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *local_ip);
1388
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1389
void ovsrec_controller_update_local_netmask_addvalue(const struct ovsrec_controller *,  const char *);
1390
void ovsrec_controller_update_local_netmask_delvalue(const struct ovsrec_controller *,  const char *);
1391
void ovsrec_controller_add_clause_local_netmask(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *local_netmask);
1392
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1393
void ovsrec_controller_update_max_backoff_addvalue(const struct ovsrec_controller *,  int64_t );
1394
void ovsrec_controller_update_max_backoff_delvalue(const struct ovsrec_controller *,  int64_t );
1395
void ovsrec_controller_add_clause_max_backoff(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *max_backoff, size_t n_max_backoff);
1396
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1397
void ovsrec_controller_update_other_config_setkey(const struct ovsrec_controller *,  const char *, const char *);
1398
void ovsrec_controller_update_other_config_delkey(const struct ovsrec_controller *,  const char *);
1399
void ovsrec_controller_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1400
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1401
void ovsrec_controller_update_role_addvalue(const struct ovsrec_controller *,  const char *);
1402
void ovsrec_controller_update_role_delvalue(const struct ovsrec_controller *,  const char *);
1403
void ovsrec_controller_add_clause_role(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *role);
1404
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1405
void ovsrec_controller_update_status_setkey(const struct ovsrec_controller *,  const char *, const char *);
1406
void ovsrec_controller_update_status_delkey(const struct ovsrec_controller *,  const char *);
1407
void ovsrec_controller_add_clause_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1408
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1409
void ovsrec_controller_add_clause_target(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *target);
1410
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1411
void ovsrec_controller_update_type_addvalue(const struct ovsrec_controller *,  const char *);
1412
void ovsrec_controller_update_type_delvalue(const struct ovsrec_controller *,  const char *);
1413
void ovsrec_controller_add_clause_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *type);
1414
unsigned int ovsrec_controller_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1415
1416
struct ovsrec_controller *ovsrec_controller_index_init_row(struct ovsdb_idl_index *);
1417
void ovsrec_controller_index_set_connection_mode(const struct ovsrec_controller *,
1418
const char *connection_mode);
1419
void ovsrec_controller_index_set_controller_burst_limit(const struct ovsrec_controller *,
1420
const int64_t *controller_burst_limit, size_t n_controller_burst_limit);
1421
void ovsrec_controller_index_set_controller_queue_size(const struct ovsrec_controller *,
1422
const int64_t *controller_queue_size, size_t n_controller_queue_size);
1423
void ovsrec_controller_index_set_controller_rate_limit(const struct ovsrec_controller *,
1424
const int64_t *controller_rate_limit, size_t n_controller_rate_limit);
1425
void ovsrec_controller_index_set_enable_async_messages(const struct ovsrec_controller *,
1426
const bool *enable_async_messages, size_t n_enable_async_messages);
1427
void ovsrec_controller_index_set_external_ids(const struct ovsrec_controller *,
1428
const struct smap *);
1429
void ovsrec_controller_index_set_inactivity_probe(const struct ovsrec_controller *,
1430
const int64_t *inactivity_probe, size_t n_inactivity_probe);
1431
void ovsrec_controller_index_set_is_connected(const struct ovsrec_controller *,
1432
bool is_connected);
1433
void ovsrec_controller_index_set_local_gateway(const struct ovsrec_controller *,
1434
const char *local_gateway);
1435
void ovsrec_controller_index_set_local_ip(const struct ovsrec_controller *,
1436
const char *local_ip);
1437
void ovsrec_controller_index_set_local_netmask(const struct ovsrec_controller *,
1438
const char *local_netmask);
1439
void ovsrec_controller_index_set_max_backoff(const struct ovsrec_controller *,
1440
const int64_t *max_backoff, size_t n_max_backoff);
1441
void ovsrec_controller_index_set_other_config(const struct ovsrec_controller *,
1442
const struct smap *);
1443
void ovsrec_controller_index_set_role(const struct ovsrec_controller *,
1444
const char *role);
1445
void ovsrec_controller_index_set_status(const struct ovsrec_controller *,
1446
const struct smap *);
1447
void ovsrec_controller_index_set_target(const struct ovsrec_controller *,
1448
const char *target);
1449
void ovsrec_controller_index_set_type(const struct ovsrec_controller *,
1450
const char *type);
1451

1452
/* Datapath table. */
1453
struct ovsrec_datapath {
1454
  struct ovsdb_idl_row header_;
1455
1456
  /* capabilities column. */
1457
  struct smap capabilities;
1458
1459
  /* ct_zones column. */
1460
  int64_t *key_ct_zones;
1461
  struct ovsrec_ct_zone **value_ct_zones;
1462
  size_t n_ct_zones;
1463
1464
  /* datapath_version column. */
1465
  char *datapath_version; /* Always nonnull. */
1466
1467
  /* external_ids column. */
1468
  struct smap external_ids;
1469
};
1470
1471
enum ovsrec_datapath_column_id {
1472
    OVSREC_DATAPATH_COL_CAPABILITIES,
1473
    OVSREC_DATAPATH_COL_CT_ZONES,
1474
    OVSREC_DATAPATH_COL_DATAPATH_VERSION,
1475
    OVSREC_DATAPATH_COL_EXTERNAL_IDS,
1476
    OVSREC_DATAPATH_N_COLUMNS
1477
};
1478
1479
0
#define ovsrec_datapath_col_capabilities (ovsrec_datapath_columns[OVSREC_DATAPATH_COL_CAPABILITIES])
1480
0
#define ovsrec_datapath_col_ct_zones (ovsrec_datapath_columns[OVSREC_DATAPATH_COL_CT_ZONES])
1481
0
#define ovsrec_datapath_col_datapath_version (ovsrec_datapath_columns[OVSREC_DATAPATH_COL_DATAPATH_VERSION])
1482
0
#define ovsrec_datapath_col_external_ids (ovsrec_datapath_columns[OVSREC_DATAPATH_COL_EXTERNAL_IDS])
1483
1484
extern struct ovsdb_idl_column ovsrec_datapath_columns[OVSREC_DATAPATH_N_COLUMNS];
1485
bool ovsrec_server_has_datapath_table_col_capabilities(const struct ovsdb_idl *); 
1486
bool ovsrec_server_has_datapath_table_col_ct_zones(const struct ovsdb_idl *); 
1487
bool ovsrec_server_has_datapath_table_col_datapath_version(const struct ovsdb_idl *); 
1488
bool ovsrec_server_has_datapath_table_col_external_ids(const struct ovsdb_idl *); 
1489
1490
bool ovsrec_server_has_datapath_table(const struct ovsdb_idl *);
1491
const struct ovsrec_datapath_table *ovsrec_datapath_table_get(const struct ovsdb_idl *);
1492
const struct ovsrec_datapath *ovsrec_datapath_table_first(const struct ovsrec_datapath_table *);
1493
1494
#define OVSREC_DATAPATH_TABLE_FOR_EACH(ROW, TABLE) \
1495
        for ((ROW) = ovsrec_datapath_table_first(TABLE); \
1496
             (ROW); \
1497
             (ROW) = ovsrec_datapath_next(ROW))
1498
#define OVSREC_DATAPATH_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
1499
        for ((ROW) = ovsrec_datapath_table_first(TABLE); \
1500
             (ROW) ? ((NEXT) = ovsrec_datapath_next(ROW), 1) : 0; \
1501
             (ROW) = (NEXT))
1502
#define OVSREC_DATAPATH_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
1503
        for (const struct ovsrec_datapath * ROW__next = ((ROW) = ovsrec_datapath_table_first(TABLE), NULL); \
1504
             (ROW) ? (ROW__next = ovsrec_datapath_next(ROW), 1) : (ROW__next = NULL, 0); \
1505
             (ROW) = ROW__next)
1506
#define OVSREC_DATAPATH_TABLE_FOR_EACH_SAFE(...)                                        \
1507
        OVERLOAD_SAFE_MACRO(OVSREC_DATAPATH_TABLE_FOR_EACH_SAFE_LONG,                   \
1508
                            OVSREC_DATAPATH_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1509
1510
1511
const struct ovsrec_datapath *ovsrec_datapath_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
1512
const struct ovsrec_datapath *ovsrec_datapath_table_get_for_uuid(const struct ovsrec_datapath_table *, const struct uuid *);
1513
const struct ovsrec_datapath *ovsrec_datapath_first(const struct ovsdb_idl *);
1514
const struct ovsrec_datapath *ovsrec_datapath_next(const struct ovsrec_datapath *);
1515
#define OVSREC_DATAPATH_FOR_EACH(ROW, IDL) \
1516
        for ((ROW) = ovsrec_datapath_first(IDL); \
1517
             (ROW); \
1518
             (ROW) = ovsrec_datapath_next(ROW))
1519
#define OVSREC_DATAPATH_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
1520
        for ((ROW) = ovsrec_datapath_first(IDL); \
1521
             (ROW) ? ((NEXT) = ovsrec_datapath_next(ROW), 1) : 0; \
1522
             (ROW) = (NEXT))
1523
#define OVSREC_DATAPATH_FOR_EACH_SAFE_SHORT(ROW, IDL) \
1524
        for (const struct ovsrec_datapath * ROW__next = ((ROW) = ovsrec_datapath_first(IDL), NULL); \
1525
             (ROW) ? (ROW__next = ovsrec_datapath_next(ROW), 1) : (ROW__next = NULL, 0); \
1526
             (ROW) = ROW__next)
1527
#define OVSREC_DATAPATH_FOR_EACH_SAFE(...)                                         \
1528
        OVERLOAD_SAFE_MACRO(OVSREC_DATAPATH_FOR_EACH_SAFE_LONG,                    \
1529
                            OVSREC_DATAPATH_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1530
1531
unsigned int ovsrec_datapath_get_seqno(const struct ovsdb_idl *);
1532
unsigned int ovsrec_datapath_row_get_seqno(const struct ovsrec_datapath *row, enum ovsdb_idl_change change);
1533
const struct ovsrec_datapath *ovsrec_datapath_track_get_first(const struct ovsdb_idl *);
1534
const struct ovsrec_datapath *ovsrec_datapath_track_get_next(const struct ovsrec_datapath *);
1535
#define OVSREC_DATAPATH_FOR_EACH_TRACKED(ROW, IDL) \
1536
        for ((ROW) = ovsrec_datapath_track_get_first(IDL); \
1537
             (ROW); \
1538
             (ROW) = ovsrec_datapath_track_get_next(ROW))
1539
1540
const struct ovsrec_datapath *ovsrec_datapath_table_track_get_first(const struct ovsrec_datapath_table *);
1541
#define OVSREC_DATAPATH_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
1542
        for ((ROW) = ovsrec_datapath_table_track_get_first(TABLE); \
1543
             (ROW); \
1544
             (ROW) = ovsrec_datapath_track_get_next(ROW))
1545
1546
1547
/* Returns true if 'row' was inserted since the last change tracking reset.
1548
 *
1549
 * Note: This can only be used to test rows of tracked changes. This cannot be
1550
 * used to test if an uncommitted row that has been added locally is new or it
1551
 * may given unexpected results. */
1552
static inline bool ovsrec_datapath_is_new(const struct ovsrec_datapath *row)
1553
0
{
1554
0
    return ovsrec_datapath_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
1555
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_datapath_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_datapath_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_datapath_is_new
1556
1557
/* Returns true if 'row' was deleted since the last change tracking reset.
1558
 *
1559
 * Note: This can only be used to test rows of tracked changes. This cannot be
1560
 * used to test if an uncommitted row that has been added locally has been
1561
 * deleted or it may given unexpected results. */
1562
static inline bool ovsrec_datapath_is_deleted(const struct ovsrec_datapath *row)
1563
0
{
1564
0
    return ovsrec_datapath_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
1565
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_datapath_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_datapath_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_datapath_is_deleted
1566
1567
void ovsrec_datapath_index_destroy_row(const struct ovsrec_datapath *);
1568
1569
struct ovsrec_datapath *ovsrec_datapath_index_find(struct ovsdb_idl_index *, const struct ovsrec_datapath *);
1570
1571
int ovsrec_datapath_index_compare(
1572
    struct ovsdb_idl_index *, 
1573
    const struct ovsrec_datapath *, 
1574
    const struct ovsrec_datapath *);
1575
struct ovsdb_idl_cursor ovsrec_datapath_cursor_first(struct ovsdb_idl_index *);
1576
struct ovsdb_idl_cursor ovsrec_datapath_cursor_first_eq(
1577
    struct ovsdb_idl_index *, const struct ovsrec_datapath *);
1578
struct ovsdb_idl_cursor ovsrec_datapath_cursor_first_ge(
1579
    struct ovsdb_idl_index *, const struct ovsrec_datapath *);
1580
1581
struct ovsrec_datapath *ovsrec_datapath_cursor_data(struct ovsdb_idl_cursor *);
1582
1583
#define OVSREC_DATAPATH_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
1584
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_datapath_cursor_first_ge(INDEX, FROM); \
1585
             (cursor__.position \
1586
              && ((ROW) = ovsrec_datapath_cursor_data(&cursor__), \
1587
                  !(TO) || ovsrec_datapath_index_compare(INDEX, ROW, TO) <= 0)); \
1588
             ovsdb_idl_cursor_next(&cursor__))
1589
#define OVSREC_DATAPATH_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
1590
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_datapath_cursor_first_eq(INDEX, KEY); \
1591
             (cursor__.position \
1592
              ? ((ROW) = ovsrec_datapath_cursor_data(&cursor__), \
1593
                 ovsdb_idl_cursor_next_eq(&cursor__), \
1594
                 true) \
1595
              : false); \
1596
            )
1597
#define OVSREC_DATAPATH_FOR_EACH_BYINDEX(ROW, INDEX) \
1598
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_datapath_cursor_first(INDEX); \
1599
             (cursor__.position \
1600
              ? ((ROW) = ovsrec_datapath_cursor_data(&cursor__), \
1601
                 ovsdb_idl_cursor_next(&cursor__), \
1602
                 true) \
1603
              : false); \
1604
            )
1605
1606
void ovsrec_datapath_init(struct ovsrec_datapath *);
1607
void ovsrec_datapath_delete(const struct ovsrec_datapath *);
1608
struct ovsrec_datapath *ovsrec_datapath_insert(struct ovsdb_idl_txn *);
1609
struct ovsrec_datapath *ovsrec_datapath_insert_persist_uuid(
1610
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
1611
1612
/* Returns true if the tracked column referenced by 'enum ovsrec_datapath_column_id' of
1613
 * the row referenced by 'struct ovsrec_datapath *' was updated since the last change
1614
 * tracking reset.
1615
 *
1616
 * Note: This can only be used to test rows of tracked changes. This cannot be
1617
 * used to test if an uncommitted row that has been added locally has been
1618
 * updated or it may given unexpected results. */
1619
bool ovsrec_datapath_is_updated(const struct ovsrec_datapath *, enum ovsrec_datapath_column_id);
1620
1621
void ovsrec_datapath_verify_capabilities(const struct ovsrec_datapath *);
1622
void ovsrec_datapath_verify_ct_zones(const struct ovsrec_datapath *);
1623
void ovsrec_datapath_verify_datapath_version(const struct ovsrec_datapath *);
1624
void ovsrec_datapath_verify_external_ids(const struct ovsrec_datapath *);
1625
1626
const struct ovsdb_datum *ovsrec_datapath_get_capabilities(const struct ovsrec_datapath *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1627
const struct ovsdb_datum *ovsrec_datapath_get_ct_zones(const struct ovsrec_datapath *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1628
const struct ovsdb_datum *ovsrec_datapath_get_datapath_version(const struct ovsrec_datapath *, enum ovsdb_atomic_type key_type);
1629
const struct ovsdb_datum *ovsrec_datapath_get_external_ids(const struct ovsrec_datapath *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1630
1631
void ovsrec_datapath_set_capabilities(const struct ovsrec_datapath *, const struct smap *);
1632
void ovsrec_datapath_set_ct_zones(const struct ovsrec_datapath *, const int64_t *key_ct_zones, struct ovsrec_ct_zone **value_ct_zones, size_t n_ct_zones);
1633
void ovsrec_datapath_set_datapath_version(const struct ovsrec_datapath *, const char *datapath_version);
1634
void ovsrec_datapath_set_external_ids(const struct ovsrec_datapath *, const struct smap *);
1635
1636
void ovsrec_datapath_update_capabilities_setkey(const struct ovsrec_datapath *,  const char *, const char *);
1637
void ovsrec_datapath_update_capabilities_delkey(const struct ovsrec_datapath *,  const char *);
1638
void ovsrec_datapath_add_clause_capabilities(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1639
unsigned int ovsrec_datapath_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1640
void ovsrec_datapath_update_ct_zones_setkey(const struct ovsrec_datapath *,  int64_t , const struct ovsrec_ct_zone *);
1641
void ovsrec_datapath_update_ct_zones_delkey(const struct ovsrec_datapath *,  int64_t );
1642
void ovsrec_datapath_add_clause_ct_zones(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *key_ct_zones, struct uuid **value_ct_zones, size_t n_ct_zones);
1643
unsigned int ovsrec_datapath_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1644
void ovsrec_datapath_add_clause_datapath_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *datapath_version);
1645
unsigned int ovsrec_datapath_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1646
void ovsrec_datapath_update_external_ids_setkey(const struct ovsrec_datapath *,  const char *, const char *);
1647
void ovsrec_datapath_update_external_ids_delkey(const struct ovsrec_datapath *,  const char *);
1648
void ovsrec_datapath_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1649
unsigned int ovsrec_datapath_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1650
1651
struct ovsrec_datapath *ovsrec_datapath_index_init_row(struct ovsdb_idl_index *);
1652
void ovsrec_datapath_index_set_capabilities(const struct ovsrec_datapath *,
1653
const struct smap *);
1654
void ovsrec_datapath_index_set_ct_zones(const struct ovsrec_datapath *,
1655
const int64_t *key_ct_zones, struct ovsrec_ct_zone **value_ct_zones, size_t n_ct_zones);
1656
void ovsrec_datapath_index_set_datapath_version(const struct ovsrec_datapath *,
1657
const char *datapath_version);
1658
void ovsrec_datapath_index_set_external_ids(const struct ovsrec_datapath *,
1659
const struct smap *);
1660

1661
/* Flow_Sample_Collector_Set table. */
1662
struct ovsrec_flow_sample_collector_set {
1663
  struct ovsdb_idl_row header_;
1664
1665
  /* bridge column. */
1666
  struct ovsrec_bridge *bridge;
1667
1668
  /* external_ids column. */
1669
  struct smap external_ids;
1670
1671
  /* id column. */
1672
  int64_t id;
1673
1674
  /* ipfix column. */
1675
  struct ovsrec_ipfix *ipfix;
1676
};
1677
1678
enum ovsrec_flow_sample_collector_set_column_id {
1679
    OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_BRIDGE,
1680
    OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_EXTERNAL_IDS,
1681
    OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_ID,
1682
    OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_IPFIX,
1683
    OVSREC_FLOW_SAMPLE_COLLECTOR_SET_N_COLUMNS
1684
};
1685
1686
0
#define ovsrec_flow_sample_collector_set_col_bridge (ovsrec_flow_sample_collector_set_columns[OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_BRIDGE])
1687
0
#define ovsrec_flow_sample_collector_set_col_external_ids (ovsrec_flow_sample_collector_set_columns[OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_EXTERNAL_IDS])
1688
0
#define ovsrec_flow_sample_collector_set_col_id (ovsrec_flow_sample_collector_set_columns[OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_ID])
1689
0
#define ovsrec_flow_sample_collector_set_col_ipfix (ovsrec_flow_sample_collector_set_columns[OVSREC_FLOW_SAMPLE_COLLECTOR_SET_COL_IPFIX])
1690
1691
extern struct ovsdb_idl_column ovsrec_flow_sample_collector_set_columns[OVSREC_FLOW_SAMPLE_COLLECTOR_SET_N_COLUMNS];
1692
bool ovsrec_server_has_flow_sample_collector_set_table_col_bridge(const struct ovsdb_idl *); 
1693
bool ovsrec_server_has_flow_sample_collector_set_table_col_external_ids(const struct ovsdb_idl *); 
1694
bool ovsrec_server_has_flow_sample_collector_set_table_col_id(const struct ovsdb_idl *); 
1695
bool ovsrec_server_has_flow_sample_collector_set_table_col_ipfix(const struct ovsdb_idl *); 
1696
1697
bool ovsrec_server_has_flow_sample_collector_set_table(const struct ovsdb_idl *);
1698
const struct ovsrec_flow_sample_collector_set_table *ovsrec_flow_sample_collector_set_table_get(const struct ovsdb_idl *);
1699
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_table_first(const struct ovsrec_flow_sample_collector_set_table *);
1700
1701
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH(ROW, TABLE) \
1702
        for ((ROW) = ovsrec_flow_sample_collector_set_table_first(TABLE); \
1703
             (ROW); \
1704
             (ROW) = ovsrec_flow_sample_collector_set_next(ROW))
1705
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
1706
        for ((ROW) = ovsrec_flow_sample_collector_set_table_first(TABLE); \
1707
             (ROW) ? ((NEXT) = ovsrec_flow_sample_collector_set_next(ROW), 1) : 0; \
1708
             (ROW) = (NEXT))
1709
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
1710
        for (const struct ovsrec_flow_sample_collector_set * ROW__next = ((ROW) = ovsrec_flow_sample_collector_set_table_first(TABLE), NULL); \
1711
             (ROW) ? (ROW__next = ovsrec_flow_sample_collector_set_next(ROW), 1) : (ROW__next = NULL, 0); \
1712
             (ROW) = ROW__next)
1713
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_SAFE(...)                                        \
1714
        OVERLOAD_SAFE_MACRO(OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_SAFE_LONG,                   \
1715
                            OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1716
1717
1718
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
1719
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_table_get_for_uuid(const struct ovsrec_flow_sample_collector_set_table *, const struct uuid *);
1720
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_first(const struct ovsdb_idl *);
1721
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_next(const struct ovsrec_flow_sample_collector_set *);
1722
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH(ROW, IDL) \
1723
        for ((ROW) = ovsrec_flow_sample_collector_set_first(IDL); \
1724
             (ROW); \
1725
             (ROW) = ovsrec_flow_sample_collector_set_next(ROW))
1726
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
1727
        for ((ROW) = ovsrec_flow_sample_collector_set_first(IDL); \
1728
             (ROW) ? ((NEXT) = ovsrec_flow_sample_collector_set_next(ROW), 1) : 0; \
1729
             (ROW) = (NEXT))
1730
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_SAFE_SHORT(ROW, IDL) \
1731
        for (const struct ovsrec_flow_sample_collector_set * ROW__next = ((ROW) = ovsrec_flow_sample_collector_set_first(IDL), NULL); \
1732
             (ROW) ? (ROW__next = ovsrec_flow_sample_collector_set_next(ROW), 1) : (ROW__next = NULL, 0); \
1733
             (ROW) = ROW__next)
1734
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_SAFE(...)                                         \
1735
        OVERLOAD_SAFE_MACRO(OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_SAFE_LONG,                    \
1736
                            OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1737
1738
unsigned int ovsrec_flow_sample_collector_set_get_seqno(const struct ovsdb_idl *);
1739
unsigned int ovsrec_flow_sample_collector_set_row_get_seqno(const struct ovsrec_flow_sample_collector_set *row, enum ovsdb_idl_change change);
1740
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_track_get_first(const struct ovsdb_idl *);
1741
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_track_get_next(const struct ovsrec_flow_sample_collector_set *);
1742
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_TRACKED(ROW, IDL) \
1743
        for ((ROW) = ovsrec_flow_sample_collector_set_track_get_first(IDL); \
1744
             (ROW); \
1745
             (ROW) = ovsrec_flow_sample_collector_set_track_get_next(ROW))
1746
1747
const struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_table_track_get_first(const struct ovsrec_flow_sample_collector_set_table *);
1748
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
1749
        for ((ROW) = ovsrec_flow_sample_collector_set_table_track_get_first(TABLE); \
1750
             (ROW); \
1751
             (ROW) = ovsrec_flow_sample_collector_set_track_get_next(ROW))
1752
1753
1754
/* Returns true if 'row' was inserted since the last change tracking reset.
1755
 *
1756
 * Note: This can only be used to test rows of tracked changes. This cannot be
1757
 * used to test if an uncommitted row that has been added locally is new or it
1758
 * may given unexpected results. */
1759
static inline bool ovsrec_flow_sample_collector_set_is_new(const struct ovsrec_flow_sample_collector_set *row)
1760
0
{
1761
0
    return ovsrec_flow_sample_collector_set_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
1762
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_flow_sample_collector_set_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_flow_sample_collector_set_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_flow_sample_collector_set_is_new
1763
1764
/* Returns true if 'row' was deleted since the last change tracking reset.
1765
 *
1766
 * Note: This can only be used to test rows of tracked changes. This cannot be
1767
 * used to test if an uncommitted row that has been added locally has been
1768
 * deleted or it may given unexpected results. */
1769
static inline bool ovsrec_flow_sample_collector_set_is_deleted(const struct ovsrec_flow_sample_collector_set *row)
1770
0
{
1771
0
    return ovsrec_flow_sample_collector_set_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
1772
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_flow_sample_collector_set_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_flow_sample_collector_set_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_flow_sample_collector_set_is_deleted
1773
1774
void ovsrec_flow_sample_collector_set_index_destroy_row(const struct ovsrec_flow_sample_collector_set *);
1775
1776
struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_index_find(struct ovsdb_idl_index *, const struct ovsrec_flow_sample_collector_set *);
1777
1778
int ovsrec_flow_sample_collector_set_index_compare(
1779
    struct ovsdb_idl_index *, 
1780
    const struct ovsrec_flow_sample_collector_set *, 
1781
    const struct ovsrec_flow_sample_collector_set *);
1782
struct ovsdb_idl_cursor ovsrec_flow_sample_collector_set_cursor_first(struct ovsdb_idl_index *);
1783
struct ovsdb_idl_cursor ovsrec_flow_sample_collector_set_cursor_first_eq(
1784
    struct ovsdb_idl_index *, const struct ovsrec_flow_sample_collector_set *);
1785
struct ovsdb_idl_cursor ovsrec_flow_sample_collector_set_cursor_first_ge(
1786
    struct ovsdb_idl_index *, const struct ovsrec_flow_sample_collector_set *);
1787
1788
struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_cursor_data(struct ovsdb_idl_cursor *);
1789
1790
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
1791
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_sample_collector_set_cursor_first_ge(INDEX, FROM); \
1792
             (cursor__.position \
1793
              && ((ROW) = ovsrec_flow_sample_collector_set_cursor_data(&cursor__), \
1794
                  !(TO) || ovsrec_flow_sample_collector_set_index_compare(INDEX, ROW, TO) <= 0)); \
1795
             ovsdb_idl_cursor_next(&cursor__))
1796
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
1797
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_sample_collector_set_cursor_first_eq(INDEX, KEY); \
1798
             (cursor__.position \
1799
              ? ((ROW) = ovsrec_flow_sample_collector_set_cursor_data(&cursor__), \
1800
                 ovsdb_idl_cursor_next_eq(&cursor__), \
1801
                 true) \
1802
              : false); \
1803
            )
1804
#define OVSREC_FLOW_SAMPLE_COLLECTOR_SET_FOR_EACH_BYINDEX(ROW, INDEX) \
1805
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_sample_collector_set_cursor_first(INDEX); \
1806
             (cursor__.position \
1807
              ? ((ROW) = ovsrec_flow_sample_collector_set_cursor_data(&cursor__), \
1808
                 ovsdb_idl_cursor_next(&cursor__), \
1809
                 true) \
1810
              : false); \
1811
            )
1812
1813
void ovsrec_flow_sample_collector_set_init(struct ovsrec_flow_sample_collector_set *);
1814
void ovsrec_flow_sample_collector_set_delete(const struct ovsrec_flow_sample_collector_set *);
1815
struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_insert(struct ovsdb_idl_txn *);
1816
struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_insert_persist_uuid(
1817
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
1818
1819
/* Returns true if the tracked column referenced by 'enum ovsrec_flow_sample_collector_set_column_id' of
1820
 * the row referenced by 'struct ovsrec_flow_sample_collector_set *' was updated since the last change
1821
 * tracking reset.
1822
 *
1823
 * Note: This can only be used to test rows of tracked changes. This cannot be
1824
 * used to test if an uncommitted row that has been added locally has been
1825
 * updated or it may given unexpected results. */
1826
bool ovsrec_flow_sample_collector_set_is_updated(const struct ovsrec_flow_sample_collector_set *, enum ovsrec_flow_sample_collector_set_column_id);
1827
1828
void ovsrec_flow_sample_collector_set_verify_bridge(const struct ovsrec_flow_sample_collector_set *);
1829
void ovsrec_flow_sample_collector_set_verify_external_ids(const struct ovsrec_flow_sample_collector_set *);
1830
void ovsrec_flow_sample_collector_set_verify_id(const struct ovsrec_flow_sample_collector_set *);
1831
void ovsrec_flow_sample_collector_set_verify_ipfix(const struct ovsrec_flow_sample_collector_set *);
1832
1833
const struct ovsdb_datum *ovsrec_flow_sample_collector_set_get_bridge(const struct ovsrec_flow_sample_collector_set *, enum ovsdb_atomic_type key_type);
1834
const struct ovsdb_datum *ovsrec_flow_sample_collector_set_get_external_ids(const struct ovsrec_flow_sample_collector_set *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
1835
const struct ovsdb_datum *ovsrec_flow_sample_collector_set_get_id(const struct ovsrec_flow_sample_collector_set *, enum ovsdb_atomic_type key_type);
1836
const struct ovsdb_datum *ovsrec_flow_sample_collector_set_get_ipfix(const struct ovsrec_flow_sample_collector_set *, enum ovsdb_atomic_type key_type);
1837
1838
void ovsrec_flow_sample_collector_set_set_bridge(const struct ovsrec_flow_sample_collector_set *, const struct ovsrec_bridge *bridge);
1839
void ovsrec_flow_sample_collector_set_set_external_ids(const struct ovsrec_flow_sample_collector_set *, const struct smap *);
1840
void ovsrec_flow_sample_collector_set_set_id(const struct ovsrec_flow_sample_collector_set *, int64_t id);
1841
void ovsrec_flow_sample_collector_set_set_ipfix(const struct ovsrec_flow_sample_collector_set *, const struct ovsrec_ipfix *ipfix);
1842
1843
void ovsrec_flow_sample_collector_set_add_clause_bridge(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *bridge);
1844
unsigned int ovsrec_flow_sample_collector_set_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1845
void ovsrec_flow_sample_collector_set_update_external_ids_setkey(const struct ovsrec_flow_sample_collector_set *,  const char *, const char *);
1846
void ovsrec_flow_sample_collector_set_update_external_ids_delkey(const struct ovsrec_flow_sample_collector_set *,  const char *);
1847
void ovsrec_flow_sample_collector_set_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
1848
unsigned int ovsrec_flow_sample_collector_set_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1849
void ovsrec_flow_sample_collector_set_add_clause_id(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t id);
1850
unsigned int ovsrec_flow_sample_collector_set_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1851
void ovsrec_flow_sample_collector_set_update_ipfix_addvalue(const struct ovsrec_flow_sample_collector_set *,  const struct ovsrec_ipfix *);
1852
void ovsrec_flow_sample_collector_set_update_ipfix_delvalue(const struct ovsrec_flow_sample_collector_set *,  const struct ovsrec_ipfix *);
1853
void ovsrec_flow_sample_collector_set_add_clause_ipfix(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *ipfix);
1854
unsigned int ovsrec_flow_sample_collector_set_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
1855
1856
struct ovsrec_flow_sample_collector_set *ovsrec_flow_sample_collector_set_index_init_row(struct ovsdb_idl_index *);
1857
void ovsrec_flow_sample_collector_set_index_set_bridge(const struct ovsrec_flow_sample_collector_set *,
1858
const struct ovsrec_bridge *bridge);
1859
void ovsrec_flow_sample_collector_set_index_set_external_ids(const struct ovsrec_flow_sample_collector_set *,
1860
const struct smap *);
1861
void ovsrec_flow_sample_collector_set_index_set_id(const struct ovsrec_flow_sample_collector_set *,
1862
int64_t id);
1863
void ovsrec_flow_sample_collector_set_index_set_ipfix(const struct ovsrec_flow_sample_collector_set *,
1864
const struct ovsrec_ipfix *ipfix);
1865

1866
/* Flow_Table table. */
1867
struct ovsrec_flow_table {
1868
  struct ovsdb_idl_row header_;
1869
1870
  /* external_ids column. */
1871
  struct smap external_ids;
1872
1873
  /* flow_limit column. */
1874
  int64_t *flow_limit;
1875
  size_t n_flow_limit;
1876
1877
  /* groups column. */
1878
  char **groups;
1879
  size_t n_groups;
1880
1881
  /* name column. */
1882
  char *name;
1883
1884
  /* overflow_policy column. */
1885
  char *overflow_policy;
1886
1887
  /* prefixes column. */
1888
  char **prefixes;
1889
  size_t n_prefixes;
1890
};
1891
1892
enum ovsrec_flow_table_column_id {
1893
    OVSREC_FLOW_TABLE_COL_EXTERNAL_IDS,
1894
    OVSREC_FLOW_TABLE_COL_FLOW_LIMIT,
1895
    OVSREC_FLOW_TABLE_COL_GROUPS,
1896
    OVSREC_FLOW_TABLE_COL_NAME,
1897
    OVSREC_FLOW_TABLE_COL_OVERFLOW_POLICY,
1898
    OVSREC_FLOW_TABLE_COL_PREFIXES,
1899
    OVSREC_FLOW_TABLE_N_COLUMNS
1900
};
1901
1902
0
#define ovsrec_flow_table_col_external_ids (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_EXTERNAL_IDS])
1903
0
#define ovsrec_flow_table_col_flow_limit (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_FLOW_LIMIT])
1904
0
#define ovsrec_flow_table_col_groups (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_GROUPS])
1905
0
#define ovsrec_flow_table_col_name (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_NAME])
1906
0
#define ovsrec_flow_table_col_overflow_policy (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_OVERFLOW_POLICY])
1907
0
#define ovsrec_flow_table_col_prefixes (ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_COL_PREFIXES])
1908
1909
extern struct ovsdb_idl_column ovsrec_flow_table_columns[OVSREC_FLOW_TABLE_N_COLUMNS];
1910
bool ovsrec_server_has_flow_table_table_col_external_ids(const struct ovsdb_idl *); 
1911
bool ovsrec_server_has_flow_table_table_col_flow_limit(const struct ovsdb_idl *); 
1912
bool ovsrec_server_has_flow_table_table_col_groups(const struct ovsdb_idl *); 
1913
bool ovsrec_server_has_flow_table_table_col_name(const struct ovsdb_idl *); 
1914
bool ovsrec_server_has_flow_table_table_col_overflow_policy(const struct ovsdb_idl *); 
1915
bool ovsrec_server_has_flow_table_table_col_prefixes(const struct ovsdb_idl *); 
1916
1917
bool ovsrec_server_has_flow_table_table(const struct ovsdb_idl *);
1918
const struct ovsrec_flow_table_table *ovsrec_flow_table_table_get(const struct ovsdb_idl *);
1919
const struct ovsrec_flow_table *ovsrec_flow_table_table_first(const struct ovsrec_flow_table_table *);
1920
1921
#define OVSREC_FLOW_TABLE_TABLE_FOR_EACH(ROW, TABLE) \
1922
        for ((ROW) = ovsrec_flow_table_table_first(TABLE); \
1923
             (ROW); \
1924
             (ROW) = ovsrec_flow_table_next(ROW))
1925
#define OVSREC_FLOW_TABLE_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
1926
        for ((ROW) = ovsrec_flow_table_table_first(TABLE); \
1927
             (ROW) ? ((NEXT) = ovsrec_flow_table_next(ROW), 1) : 0; \
1928
             (ROW) = (NEXT))
1929
#define OVSREC_FLOW_TABLE_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
1930
        for (const struct ovsrec_flow_table * ROW__next = ((ROW) = ovsrec_flow_table_table_first(TABLE), NULL); \
1931
             (ROW) ? (ROW__next = ovsrec_flow_table_next(ROW), 1) : (ROW__next = NULL, 0); \
1932
             (ROW) = ROW__next)
1933
#define OVSREC_FLOW_TABLE_TABLE_FOR_EACH_SAFE(...)                                        \
1934
        OVERLOAD_SAFE_MACRO(OVSREC_FLOW_TABLE_TABLE_FOR_EACH_SAFE_LONG,                   \
1935
                            OVSREC_FLOW_TABLE_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1936
1937
1938
const struct ovsrec_flow_table *ovsrec_flow_table_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
1939
const struct ovsrec_flow_table *ovsrec_flow_table_table_get_for_uuid(const struct ovsrec_flow_table_table *, const struct uuid *);
1940
const struct ovsrec_flow_table *ovsrec_flow_table_first(const struct ovsdb_idl *);
1941
const struct ovsrec_flow_table *ovsrec_flow_table_next(const struct ovsrec_flow_table *);
1942
#define OVSREC_FLOW_TABLE_FOR_EACH(ROW, IDL) \
1943
        for ((ROW) = ovsrec_flow_table_first(IDL); \
1944
             (ROW); \
1945
             (ROW) = ovsrec_flow_table_next(ROW))
1946
#define OVSREC_FLOW_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
1947
        for ((ROW) = ovsrec_flow_table_first(IDL); \
1948
             (ROW) ? ((NEXT) = ovsrec_flow_table_next(ROW), 1) : 0; \
1949
             (ROW) = (NEXT))
1950
#define OVSREC_FLOW_TABLE_FOR_EACH_SAFE_SHORT(ROW, IDL) \
1951
        for (const struct ovsrec_flow_table * ROW__next = ((ROW) = ovsrec_flow_table_first(IDL), NULL); \
1952
             (ROW) ? (ROW__next = ovsrec_flow_table_next(ROW), 1) : (ROW__next = NULL, 0); \
1953
             (ROW) = ROW__next)
1954
#define OVSREC_FLOW_TABLE_FOR_EACH_SAFE(...)                                         \
1955
        OVERLOAD_SAFE_MACRO(OVSREC_FLOW_TABLE_FOR_EACH_SAFE_LONG,                    \
1956
                            OVSREC_FLOW_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
1957
1958
unsigned int ovsrec_flow_table_get_seqno(const struct ovsdb_idl *);
1959
unsigned int ovsrec_flow_table_row_get_seqno(const struct ovsrec_flow_table *row, enum ovsdb_idl_change change);
1960
const struct ovsrec_flow_table *ovsrec_flow_table_track_get_first(const struct ovsdb_idl *);
1961
const struct ovsrec_flow_table *ovsrec_flow_table_track_get_next(const struct ovsrec_flow_table *);
1962
#define OVSREC_FLOW_TABLE_FOR_EACH_TRACKED(ROW, IDL) \
1963
        for ((ROW) = ovsrec_flow_table_track_get_first(IDL); \
1964
             (ROW); \
1965
             (ROW) = ovsrec_flow_table_track_get_next(ROW))
1966
1967
const struct ovsrec_flow_table *ovsrec_flow_table_table_track_get_first(const struct ovsrec_flow_table_table *);
1968
#define OVSREC_FLOW_TABLE_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
1969
        for ((ROW) = ovsrec_flow_table_table_track_get_first(TABLE); \
1970
             (ROW); \
1971
             (ROW) = ovsrec_flow_table_track_get_next(ROW))
1972
1973
1974
/* Returns true if 'row' was inserted since the last change tracking reset.
1975
 *
1976
 * Note: This can only be used to test rows of tracked changes. This cannot be
1977
 * used to test if an uncommitted row that has been added locally is new or it
1978
 * may given unexpected results. */
1979
static inline bool ovsrec_flow_table_is_new(const struct ovsrec_flow_table *row)
1980
0
{
1981
0
    return ovsrec_flow_table_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
1982
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_flow_table_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_flow_table_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_flow_table_is_new
1983
1984
/* Returns true if 'row' was deleted since the last change tracking reset.
1985
 *
1986
 * Note: This can only be used to test rows of tracked changes. This cannot be
1987
 * used to test if an uncommitted row that has been added locally has been
1988
 * deleted or it may given unexpected results. */
1989
static inline bool ovsrec_flow_table_is_deleted(const struct ovsrec_flow_table *row)
1990
0
{
1991
0
    return ovsrec_flow_table_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
1992
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_flow_table_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_flow_table_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_flow_table_is_deleted
1993
1994
void ovsrec_flow_table_index_destroy_row(const struct ovsrec_flow_table *);
1995
1996
struct ovsrec_flow_table *ovsrec_flow_table_index_find(struct ovsdb_idl_index *, const struct ovsrec_flow_table *);
1997
1998
int ovsrec_flow_table_index_compare(
1999
    struct ovsdb_idl_index *, 
2000
    const struct ovsrec_flow_table *, 
2001
    const struct ovsrec_flow_table *);
2002
struct ovsdb_idl_cursor ovsrec_flow_table_cursor_first(struct ovsdb_idl_index *);
2003
struct ovsdb_idl_cursor ovsrec_flow_table_cursor_first_eq(
2004
    struct ovsdb_idl_index *, const struct ovsrec_flow_table *);
2005
struct ovsdb_idl_cursor ovsrec_flow_table_cursor_first_ge(
2006
    struct ovsdb_idl_index *, const struct ovsrec_flow_table *);
2007
2008
struct ovsrec_flow_table *ovsrec_flow_table_cursor_data(struct ovsdb_idl_cursor *);
2009
2010
#define OVSREC_FLOW_TABLE_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
2011
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_table_cursor_first_ge(INDEX, FROM); \
2012
             (cursor__.position \
2013
              && ((ROW) = ovsrec_flow_table_cursor_data(&cursor__), \
2014
                  !(TO) || ovsrec_flow_table_index_compare(INDEX, ROW, TO) <= 0)); \
2015
             ovsdb_idl_cursor_next(&cursor__))
2016
#define OVSREC_FLOW_TABLE_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
2017
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_table_cursor_first_eq(INDEX, KEY); \
2018
             (cursor__.position \
2019
              ? ((ROW) = ovsrec_flow_table_cursor_data(&cursor__), \
2020
                 ovsdb_idl_cursor_next_eq(&cursor__), \
2021
                 true) \
2022
              : false); \
2023
            )
2024
#define OVSREC_FLOW_TABLE_FOR_EACH_BYINDEX(ROW, INDEX) \
2025
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_flow_table_cursor_first(INDEX); \
2026
             (cursor__.position \
2027
              ? ((ROW) = ovsrec_flow_table_cursor_data(&cursor__), \
2028
                 ovsdb_idl_cursor_next(&cursor__), \
2029
                 true) \
2030
              : false); \
2031
            )
2032
2033
void ovsrec_flow_table_init(struct ovsrec_flow_table *);
2034
void ovsrec_flow_table_delete(const struct ovsrec_flow_table *);
2035
struct ovsrec_flow_table *ovsrec_flow_table_insert(struct ovsdb_idl_txn *);
2036
struct ovsrec_flow_table *ovsrec_flow_table_insert_persist_uuid(
2037
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
2038
2039
/* Returns true if the tracked column referenced by 'enum ovsrec_flow_table_column_id' of
2040
 * the row referenced by 'struct ovsrec_flow_table *' was updated since the last change
2041
 * tracking reset.
2042
 *
2043
 * Note: This can only be used to test rows of tracked changes. This cannot be
2044
 * used to test if an uncommitted row that has been added locally has been
2045
 * updated or it may given unexpected results. */
2046
bool ovsrec_flow_table_is_updated(const struct ovsrec_flow_table *, enum ovsrec_flow_table_column_id);
2047
2048
void ovsrec_flow_table_verify_external_ids(const struct ovsrec_flow_table *);
2049
void ovsrec_flow_table_verify_flow_limit(const struct ovsrec_flow_table *);
2050
void ovsrec_flow_table_verify_groups(const struct ovsrec_flow_table *);
2051
void ovsrec_flow_table_verify_name(const struct ovsrec_flow_table *);
2052
void ovsrec_flow_table_verify_overflow_policy(const struct ovsrec_flow_table *);
2053
void ovsrec_flow_table_verify_prefixes(const struct ovsrec_flow_table *);
2054
2055
const struct ovsdb_datum *ovsrec_flow_table_get_external_ids(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2056
const struct ovsdb_datum *ovsrec_flow_table_get_flow_limit(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type);
2057
const struct ovsdb_datum *ovsrec_flow_table_get_groups(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type);
2058
const struct ovsdb_datum *ovsrec_flow_table_get_name(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type);
2059
const struct ovsdb_datum *ovsrec_flow_table_get_overflow_policy(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type);
2060
const struct ovsdb_datum *ovsrec_flow_table_get_prefixes(const struct ovsrec_flow_table *, enum ovsdb_atomic_type key_type);
2061
2062
void ovsrec_flow_table_set_external_ids(const struct ovsrec_flow_table *, const struct smap *);
2063
void ovsrec_flow_table_set_flow_limit(const struct ovsrec_flow_table *, const int64_t *flow_limit, size_t n_flow_limit);
2064
void ovsrec_flow_table_set_groups(const struct ovsrec_flow_table *, const char **groups, size_t n_groups);
2065
void ovsrec_flow_table_set_name(const struct ovsrec_flow_table *, const char *name);
2066
void ovsrec_flow_table_set_overflow_policy(const struct ovsrec_flow_table *, const char *overflow_policy);
2067
void ovsrec_flow_table_set_prefixes(const struct ovsrec_flow_table *, const char **prefixes, size_t n_prefixes);
2068
2069
void ovsrec_flow_table_update_external_ids_setkey(const struct ovsrec_flow_table *,  const char *, const char *);
2070
void ovsrec_flow_table_update_external_ids_delkey(const struct ovsrec_flow_table *,  const char *);
2071
void ovsrec_flow_table_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2072
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2073
void ovsrec_flow_table_update_flow_limit_addvalue(const struct ovsrec_flow_table *,  int64_t );
2074
void ovsrec_flow_table_update_flow_limit_delvalue(const struct ovsrec_flow_table *,  int64_t );
2075
void ovsrec_flow_table_add_clause_flow_limit(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *flow_limit, size_t n_flow_limit);
2076
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2077
void ovsrec_flow_table_update_groups_addvalue(const struct ovsrec_flow_table *,  const char *);
2078
void ovsrec_flow_table_update_groups_delvalue(const struct ovsrec_flow_table *,  const char *);
2079
void ovsrec_flow_table_add_clause_groups(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **groups, size_t n_groups);
2080
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2081
void ovsrec_flow_table_update_name_addvalue(const struct ovsrec_flow_table *,  const char *);
2082
void ovsrec_flow_table_update_name_delvalue(const struct ovsrec_flow_table *,  const char *);
2083
void ovsrec_flow_table_add_clause_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *name);
2084
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2085
void ovsrec_flow_table_update_overflow_policy_addvalue(const struct ovsrec_flow_table *,  const char *);
2086
void ovsrec_flow_table_update_overflow_policy_delvalue(const struct ovsrec_flow_table *,  const char *);
2087
void ovsrec_flow_table_add_clause_overflow_policy(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *overflow_policy);
2088
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2089
void ovsrec_flow_table_update_prefixes_addvalue(const struct ovsrec_flow_table *,  const char *);
2090
void ovsrec_flow_table_update_prefixes_delvalue(const struct ovsrec_flow_table *,  const char *);
2091
void ovsrec_flow_table_add_clause_prefixes(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **prefixes, size_t n_prefixes);
2092
unsigned int ovsrec_flow_table_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2093
2094
struct ovsrec_flow_table *ovsrec_flow_table_index_init_row(struct ovsdb_idl_index *);
2095
void ovsrec_flow_table_index_set_external_ids(const struct ovsrec_flow_table *,
2096
const struct smap *);
2097
void ovsrec_flow_table_index_set_flow_limit(const struct ovsrec_flow_table *,
2098
const int64_t *flow_limit, size_t n_flow_limit);
2099
void ovsrec_flow_table_index_set_groups(const struct ovsrec_flow_table *,
2100
const char **groups, size_t n_groups);
2101
void ovsrec_flow_table_index_set_name(const struct ovsrec_flow_table *,
2102
const char *name);
2103
void ovsrec_flow_table_index_set_overflow_policy(const struct ovsrec_flow_table *,
2104
const char *overflow_policy);
2105
void ovsrec_flow_table_index_set_prefixes(const struct ovsrec_flow_table *,
2106
const char **prefixes, size_t n_prefixes);
2107

2108
/* IPFIX table. */
2109
struct ovsrec_ipfix {
2110
  struct ovsdb_idl_row header_;
2111
2112
  /* cache_active_timeout column. */
2113
  int64_t *cache_active_timeout;
2114
  size_t n_cache_active_timeout;
2115
2116
  /* cache_max_flows column. */
2117
  int64_t *cache_max_flows;
2118
  size_t n_cache_max_flows;
2119
2120
  /* external_ids column. */
2121
  struct smap external_ids;
2122
2123
  /* obs_domain_id column. */
2124
  int64_t *obs_domain_id;
2125
  size_t n_obs_domain_id;
2126
2127
  /* obs_point_id column. */
2128
  int64_t *obs_point_id;
2129
  size_t n_obs_point_id;
2130
2131
  /* other_config column. */
2132
  struct smap other_config;
2133
2134
  /* sampling column. */
2135
  int64_t *sampling;
2136
  size_t n_sampling;
2137
2138
  /* stats_interval column. */
2139
  int64_t *stats_interval;
2140
  size_t n_stats_interval;
2141
2142
  /* targets column. */
2143
  char **targets;
2144
  size_t n_targets;
2145
2146
  /* template_interval column. */
2147
  int64_t *template_interval;
2148
  size_t n_template_interval;
2149
};
2150
2151
enum ovsrec_ipfix_column_id {
2152
    OVSREC_IPFIX_COL_CACHE_ACTIVE_TIMEOUT,
2153
    OVSREC_IPFIX_COL_CACHE_MAX_FLOWS,
2154
    OVSREC_IPFIX_COL_EXTERNAL_IDS,
2155
    OVSREC_IPFIX_COL_OBS_DOMAIN_ID,
2156
    OVSREC_IPFIX_COL_OBS_POINT_ID,
2157
    OVSREC_IPFIX_COL_OTHER_CONFIG,
2158
    OVSREC_IPFIX_COL_SAMPLING,
2159
    OVSREC_IPFIX_COL_STATS_INTERVAL,
2160
    OVSREC_IPFIX_COL_TARGETS,
2161
    OVSREC_IPFIX_COL_TEMPLATE_INTERVAL,
2162
    OVSREC_IPFIX_N_COLUMNS
2163
};
2164
2165
0
#define ovsrec_ipfix_col_cache_active_timeout (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_CACHE_ACTIVE_TIMEOUT])
2166
0
#define ovsrec_ipfix_col_cache_max_flows (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_CACHE_MAX_FLOWS])
2167
0
#define ovsrec_ipfix_col_external_ids (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_EXTERNAL_IDS])
2168
0
#define ovsrec_ipfix_col_obs_domain_id (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_OBS_DOMAIN_ID])
2169
0
#define ovsrec_ipfix_col_obs_point_id (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_OBS_POINT_ID])
2170
0
#define ovsrec_ipfix_col_other_config (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_OTHER_CONFIG])
2171
0
#define ovsrec_ipfix_col_sampling (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_SAMPLING])
2172
0
#define ovsrec_ipfix_col_stats_interval (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_STATS_INTERVAL])
2173
0
#define ovsrec_ipfix_col_targets (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_TARGETS])
2174
0
#define ovsrec_ipfix_col_template_interval (ovsrec_ipfix_columns[OVSREC_IPFIX_COL_TEMPLATE_INTERVAL])
2175
2176
extern struct ovsdb_idl_column ovsrec_ipfix_columns[OVSREC_IPFIX_N_COLUMNS];
2177
bool ovsrec_server_has_ipfix_table_col_cache_active_timeout(const struct ovsdb_idl *); 
2178
bool ovsrec_server_has_ipfix_table_col_cache_max_flows(const struct ovsdb_idl *); 
2179
bool ovsrec_server_has_ipfix_table_col_external_ids(const struct ovsdb_idl *); 
2180
bool ovsrec_server_has_ipfix_table_col_obs_domain_id(const struct ovsdb_idl *); 
2181
bool ovsrec_server_has_ipfix_table_col_obs_point_id(const struct ovsdb_idl *); 
2182
bool ovsrec_server_has_ipfix_table_col_other_config(const struct ovsdb_idl *); 
2183
bool ovsrec_server_has_ipfix_table_col_sampling(const struct ovsdb_idl *); 
2184
bool ovsrec_server_has_ipfix_table_col_stats_interval(const struct ovsdb_idl *); 
2185
bool ovsrec_server_has_ipfix_table_col_targets(const struct ovsdb_idl *); 
2186
bool ovsrec_server_has_ipfix_table_col_template_interval(const struct ovsdb_idl *); 
2187
2188
bool ovsrec_server_has_ipfix_table(const struct ovsdb_idl *);
2189
const struct ovsrec_ipfix_table *ovsrec_ipfix_table_get(const struct ovsdb_idl *);
2190
const struct ovsrec_ipfix *ovsrec_ipfix_table_first(const struct ovsrec_ipfix_table *);
2191
2192
#define OVSREC_IPFIX_TABLE_FOR_EACH(ROW, TABLE) \
2193
        for ((ROW) = ovsrec_ipfix_table_first(TABLE); \
2194
             (ROW); \
2195
             (ROW) = ovsrec_ipfix_next(ROW))
2196
#define OVSREC_IPFIX_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
2197
        for ((ROW) = ovsrec_ipfix_table_first(TABLE); \
2198
             (ROW) ? ((NEXT) = ovsrec_ipfix_next(ROW), 1) : 0; \
2199
             (ROW) = (NEXT))
2200
#define OVSREC_IPFIX_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
2201
        for (const struct ovsrec_ipfix * ROW__next = ((ROW) = ovsrec_ipfix_table_first(TABLE), NULL); \
2202
             (ROW) ? (ROW__next = ovsrec_ipfix_next(ROW), 1) : (ROW__next = NULL, 0); \
2203
             (ROW) = ROW__next)
2204
#define OVSREC_IPFIX_TABLE_FOR_EACH_SAFE(...)                                        \
2205
        OVERLOAD_SAFE_MACRO(OVSREC_IPFIX_TABLE_FOR_EACH_SAFE_LONG,                   \
2206
                            OVSREC_IPFIX_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
2207
2208
2209
const struct ovsrec_ipfix *ovsrec_ipfix_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
2210
const struct ovsrec_ipfix *ovsrec_ipfix_table_get_for_uuid(const struct ovsrec_ipfix_table *, const struct uuid *);
2211
const struct ovsrec_ipfix *ovsrec_ipfix_first(const struct ovsdb_idl *);
2212
const struct ovsrec_ipfix *ovsrec_ipfix_next(const struct ovsrec_ipfix *);
2213
#define OVSREC_IPFIX_FOR_EACH(ROW, IDL) \
2214
        for ((ROW) = ovsrec_ipfix_first(IDL); \
2215
             (ROW); \
2216
             (ROW) = ovsrec_ipfix_next(ROW))
2217
#define OVSREC_IPFIX_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
2218
        for ((ROW) = ovsrec_ipfix_first(IDL); \
2219
             (ROW) ? ((NEXT) = ovsrec_ipfix_next(ROW), 1) : 0; \
2220
             (ROW) = (NEXT))
2221
#define OVSREC_IPFIX_FOR_EACH_SAFE_SHORT(ROW, IDL) \
2222
        for (const struct ovsrec_ipfix * ROW__next = ((ROW) = ovsrec_ipfix_first(IDL), NULL); \
2223
             (ROW) ? (ROW__next = ovsrec_ipfix_next(ROW), 1) : (ROW__next = NULL, 0); \
2224
             (ROW) = ROW__next)
2225
#define OVSREC_IPFIX_FOR_EACH_SAFE(...)                                         \
2226
        OVERLOAD_SAFE_MACRO(OVSREC_IPFIX_FOR_EACH_SAFE_LONG,                    \
2227
                            OVSREC_IPFIX_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
2228
2229
unsigned int ovsrec_ipfix_get_seqno(const struct ovsdb_idl *);
2230
unsigned int ovsrec_ipfix_row_get_seqno(const struct ovsrec_ipfix *row, enum ovsdb_idl_change change);
2231
const struct ovsrec_ipfix *ovsrec_ipfix_track_get_first(const struct ovsdb_idl *);
2232
const struct ovsrec_ipfix *ovsrec_ipfix_track_get_next(const struct ovsrec_ipfix *);
2233
#define OVSREC_IPFIX_FOR_EACH_TRACKED(ROW, IDL) \
2234
        for ((ROW) = ovsrec_ipfix_track_get_first(IDL); \
2235
             (ROW); \
2236
             (ROW) = ovsrec_ipfix_track_get_next(ROW))
2237
2238
const struct ovsrec_ipfix *ovsrec_ipfix_table_track_get_first(const struct ovsrec_ipfix_table *);
2239
#define OVSREC_IPFIX_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
2240
        for ((ROW) = ovsrec_ipfix_table_track_get_first(TABLE); \
2241
             (ROW); \
2242
             (ROW) = ovsrec_ipfix_track_get_next(ROW))
2243
2244
2245
/* Returns true if 'row' was inserted since the last change tracking reset.
2246
 *
2247
 * Note: This can only be used to test rows of tracked changes. This cannot be
2248
 * used to test if an uncommitted row that has been added locally is new or it
2249
 * may given unexpected results. */
2250
static inline bool ovsrec_ipfix_is_new(const struct ovsrec_ipfix *row)
2251
0
{
2252
0
    return ovsrec_ipfix_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
2253
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ipfix_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_ipfix_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_ipfix_is_new
2254
2255
/* Returns true if 'row' was deleted since the last change tracking reset.
2256
 *
2257
 * Note: This can only be used to test rows of tracked changes. This cannot be
2258
 * used to test if an uncommitted row that has been added locally has been
2259
 * deleted or it may given unexpected results. */
2260
static inline bool ovsrec_ipfix_is_deleted(const struct ovsrec_ipfix *row)
2261
0
{
2262
0
    return ovsrec_ipfix_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
2263
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ipfix_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_ipfix_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_ipfix_is_deleted
2264
2265
void ovsrec_ipfix_index_destroy_row(const struct ovsrec_ipfix *);
2266
2267
struct ovsrec_ipfix *ovsrec_ipfix_index_find(struct ovsdb_idl_index *, const struct ovsrec_ipfix *);
2268
2269
int ovsrec_ipfix_index_compare(
2270
    struct ovsdb_idl_index *, 
2271
    const struct ovsrec_ipfix *, 
2272
    const struct ovsrec_ipfix *);
2273
struct ovsdb_idl_cursor ovsrec_ipfix_cursor_first(struct ovsdb_idl_index *);
2274
struct ovsdb_idl_cursor ovsrec_ipfix_cursor_first_eq(
2275
    struct ovsdb_idl_index *, const struct ovsrec_ipfix *);
2276
struct ovsdb_idl_cursor ovsrec_ipfix_cursor_first_ge(
2277
    struct ovsdb_idl_index *, const struct ovsrec_ipfix *);
2278
2279
struct ovsrec_ipfix *ovsrec_ipfix_cursor_data(struct ovsdb_idl_cursor *);
2280
2281
#define OVSREC_IPFIX_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
2282
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ipfix_cursor_first_ge(INDEX, FROM); \
2283
             (cursor__.position \
2284
              && ((ROW) = ovsrec_ipfix_cursor_data(&cursor__), \
2285
                  !(TO) || ovsrec_ipfix_index_compare(INDEX, ROW, TO) <= 0)); \
2286
             ovsdb_idl_cursor_next(&cursor__))
2287
#define OVSREC_IPFIX_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
2288
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ipfix_cursor_first_eq(INDEX, KEY); \
2289
             (cursor__.position \
2290
              ? ((ROW) = ovsrec_ipfix_cursor_data(&cursor__), \
2291
                 ovsdb_idl_cursor_next_eq(&cursor__), \
2292
                 true) \
2293
              : false); \
2294
            )
2295
#define OVSREC_IPFIX_FOR_EACH_BYINDEX(ROW, INDEX) \
2296
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ipfix_cursor_first(INDEX); \
2297
             (cursor__.position \
2298
              ? ((ROW) = ovsrec_ipfix_cursor_data(&cursor__), \
2299
                 ovsdb_idl_cursor_next(&cursor__), \
2300
                 true) \
2301
              : false); \
2302
            )
2303
2304
void ovsrec_ipfix_init(struct ovsrec_ipfix *);
2305
void ovsrec_ipfix_delete(const struct ovsrec_ipfix *);
2306
struct ovsrec_ipfix *ovsrec_ipfix_insert(struct ovsdb_idl_txn *);
2307
struct ovsrec_ipfix *ovsrec_ipfix_insert_persist_uuid(
2308
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
2309
2310
/* Returns true if the tracked column referenced by 'enum ovsrec_ipfix_column_id' of
2311
 * the row referenced by 'struct ovsrec_ipfix *' was updated since the last change
2312
 * tracking reset.
2313
 *
2314
 * Note: This can only be used to test rows of tracked changes. This cannot be
2315
 * used to test if an uncommitted row that has been added locally has been
2316
 * updated or it may given unexpected results. */
2317
bool ovsrec_ipfix_is_updated(const struct ovsrec_ipfix *, enum ovsrec_ipfix_column_id);
2318
2319
void ovsrec_ipfix_verify_cache_active_timeout(const struct ovsrec_ipfix *);
2320
void ovsrec_ipfix_verify_cache_max_flows(const struct ovsrec_ipfix *);
2321
void ovsrec_ipfix_verify_external_ids(const struct ovsrec_ipfix *);
2322
void ovsrec_ipfix_verify_obs_domain_id(const struct ovsrec_ipfix *);
2323
void ovsrec_ipfix_verify_obs_point_id(const struct ovsrec_ipfix *);
2324
void ovsrec_ipfix_verify_other_config(const struct ovsrec_ipfix *);
2325
void ovsrec_ipfix_verify_sampling(const struct ovsrec_ipfix *);
2326
void ovsrec_ipfix_verify_stats_interval(const struct ovsrec_ipfix *);
2327
void ovsrec_ipfix_verify_targets(const struct ovsrec_ipfix *);
2328
void ovsrec_ipfix_verify_template_interval(const struct ovsrec_ipfix *);
2329
2330
const struct ovsdb_datum *ovsrec_ipfix_get_cache_active_timeout(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2331
const struct ovsdb_datum *ovsrec_ipfix_get_cache_max_flows(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2332
const struct ovsdb_datum *ovsrec_ipfix_get_external_ids(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2333
const struct ovsdb_datum *ovsrec_ipfix_get_obs_domain_id(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2334
const struct ovsdb_datum *ovsrec_ipfix_get_obs_point_id(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2335
const struct ovsdb_datum *ovsrec_ipfix_get_other_config(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2336
const struct ovsdb_datum *ovsrec_ipfix_get_sampling(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2337
const struct ovsdb_datum *ovsrec_ipfix_get_stats_interval(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2338
const struct ovsdb_datum *ovsrec_ipfix_get_targets(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2339
const struct ovsdb_datum *ovsrec_ipfix_get_template_interval(const struct ovsrec_ipfix *, enum ovsdb_atomic_type key_type);
2340
2341
void ovsrec_ipfix_set_cache_active_timeout(const struct ovsrec_ipfix *, const int64_t *cache_active_timeout, size_t n_cache_active_timeout);
2342
void ovsrec_ipfix_set_cache_max_flows(const struct ovsrec_ipfix *, const int64_t *cache_max_flows, size_t n_cache_max_flows);
2343
void ovsrec_ipfix_set_external_ids(const struct ovsrec_ipfix *, const struct smap *);
2344
void ovsrec_ipfix_set_obs_domain_id(const struct ovsrec_ipfix *, const int64_t *obs_domain_id, size_t n_obs_domain_id);
2345
void ovsrec_ipfix_set_obs_point_id(const struct ovsrec_ipfix *, const int64_t *obs_point_id, size_t n_obs_point_id);
2346
void ovsrec_ipfix_set_other_config(const struct ovsrec_ipfix *, const struct smap *);
2347
void ovsrec_ipfix_set_sampling(const struct ovsrec_ipfix *, const int64_t *sampling, size_t n_sampling);
2348
void ovsrec_ipfix_set_stats_interval(const struct ovsrec_ipfix *, const int64_t *stats_interval, size_t n_stats_interval);
2349
void ovsrec_ipfix_set_targets(const struct ovsrec_ipfix *, const char **targets, size_t n_targets);
2350
void ovsrec_ipfix_set_template_interval(const struct ovsrec_ipfix *, const int64_t *template_interval, size_t n_template_interval);
2351
2352
void ovsrec_ipfix_update_cache_active_timeout_addvalue(const struct ovsrec_ipfix *,  int64_t );
2353
void ovsrec_ipfix_update_cache_active_timeout_delvalue(const struct ovsrec_ipfix *,  int64_t );
2354
void ovsrec_ipfix_add_clause_cache_active_timeout(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cache_active_timeout, size_t n_cache_active_timeout);
2355
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2356
void ovsrec_ipfix_update_cache_max_flows_addvalue(const struct ovsrec_ipfix *,  int64_t );
2357
void ovsrec_ipfix_update_cache_max_flows_delvalue(const struct ovsrec_ipfix *,  int64_t );
2358
void ovsrec_ipfix_add_clause_cache_max_flows(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cache_max_flows, size_t n_cache_max_flows);
2359
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2360
void ovsrec_ipfix_update_external_ids_setkey(const struct ovsrec_ipfix *,  const char *, const char *);
2361
void ovsrec_ipfix_update_external_ids_delkey(const struct ovsrec_ipfix *,  const char *);
2362
void ovsrec_ipfix_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2363
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2364
void ovsrec_ipfix_update_obs_domain_id_addvalue(const struct ovsrec_ipfix *,  int64_t );
2365
void ovsrec_ipfix_update_obs_domain_id_delvalue(const struct ovsrec_ipfix *,  int64_t );
2366
void ovsrec_ipfix_add_clause_obs_domain_id(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *obs_domain_id, size_t n_obs_domain_id);
2367
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2368
void ovsrec_ipfix_update_obs_point_id_addvalue(const struct ovsrec_ipfix *,  int64_t );
2369
void ovsrec_ipfix_update_obs_point_id_delvalue(const struct ovsrec_ipfix *,  int64_t );
2370
void ovsrec_ipfix_add_clause_obs_point_id(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *obs_point_id, size_t n_obs_point_id);
2371
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2372
void ovsrec_ipfix_update_other_config_setkey(const struct ovsrec_ipfix *,  const char *, const char *);
2373
void ovsrec_ipfix_update_other_config_delkey(const struct ovsrec_ipfix *,  const char *);
2374
void ovsrec_ipfix_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2375
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2376
void ovsrec_ipfix_update_sampling_addvalue(const struct ovsrec_ipfix *,  int64_t );
2377
void ovsrec_ipfix_update_sampling_delvalue(const struct ovsrec_ipfix *,  int64_t );
2378
void ovsrec_ipfix_add_clause_sampling(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *sampling, size_t n_sampling);
2379
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2380
void ovsrec_ipfix_update_stats_interval_addvalue(const struct ovsrec_ipfix *,  int64_t );
2381
void ovsrec_ipfix_update_stats_interval_delvalue(const struct ovsrec_ipfix *,  int64_t );
2382
void ovsrec_ipfix_add_clause_stats_interval(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *stats_interval, size_t n_stats_interval);
2383
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2384
void ovsrec_ipfix_update_targets_addvalue(const struct ovsrec_ipfix *,  const char *);
2385
void ovsrec_ipfix_update_targets_delvalue(const struct ovsrec_ipfix *,  const char *);
2386
void ovsrec_ipfix_add_clause_targets(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **targets, size_t n_targets);
2387
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2388
void ovsrec_ipfix_update_template_interval_addvalue(const struct ovsrec_ipfix *,  int64_t );
2389
void ovsrec_ipfix_update_template_interval_delvalue(const struct ovsrec_ipfix *,  int64_t );
2390
void ovsrec_ipfix_add_clause_template_interval(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *template_interval, size_t n_template_interval);
2391
unsigned int ovsrec_ipfix_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2392
2393
struct ovsrec_ipfix *ovsrec_ipfix_index_init_row(struct ovsdb_idl_index *);
2394
void ovsrec_ipfix_index_set_cache_active_timeout(const struct ovsrec_ipfix *,
2395
const int64_t *cache_active_timeout, size_t n_cache_active_timeout);
2396
void ovsrec_ipfix_index_set_cache_max_flows(const struct ovsrec_ipfix *,
2397
const int64_t *cache_max_flows, size_t n_cache_max_flows);
2398
void ovsrec_ipfix_index_set_external_ids(const struct ovsrec_ipfix *,
2399
const struct smap *);
2400
void ovsrec_ipfix_index_set_obs_domain_id(const struct ovsrec_ipfix *,
2401
const int64_t *obs_domain_id, size_t n_obs_domain_id);
2402
void ovsrec_ipfix_index_set_obs_point_id(const struct ovsrec_ipfix *,
2403
const int64_t *obs_point_id, size_t n_obs_point_id);
2404
void ovsrec_ipfix_index_set_other_config(const struct ovsrec_ipfix *,
2405
const struct smap *);
2406
void ovsrec_ipfix_index_set_sampling(const struct ovsrec_ipfix *,
2407
const int64_t *sampling, size_t n_sampling);
2408
void ovsrec_ipfix_index_set_stats_interval(const struct ovsrec_ipfix *,
2409
const int64_t *stats_interval, size_t n_stats_interval);
2410
void ovsrec_ipfix_index_set_targets(const struct ovsrec_ipfix *,
2411
const char **targets, size_t n_targets);
2412
void ovsrec_ipfix_index_set_template_interval(const struct ovsrec_ipfix *,
2413
const int64_t *template_interval, size_t n_template_interval);
2414

2415
/* Interface table. */
2416
struct ovsrec_interface {
2417
  struct ovsdb_idl_row header_;
2418
2419
  /* admin_state column. */
2420
  char *admin_state;
2421
2422
  /* bfd column. */
2423
  struct smap bfd;
2424
2425
  /* bfd_status column. */
2426
  struct smap bfd_status;
2427
2428
  /* cfm_fault column. */
2429
  bool *cfm_fault;
2430
  size_t n_cfm_fault;
2431
2432
  /* cfm_fault_status column. */
2433
  char **cfm_fault_status;
2434
  size_t n_cfm_fault_status;
2435
2436
  /* cfm_flap_count column. */
2437
  int64_t *cfm_flap_count;
2438
  size_t n_cfm_flap_count;
2439
2440
  /* cfm_health column. */
2441
  int64_t *cfm_health;
2442
  size_t n_cfm_health;
2443
2444
  /* cfm_mpid column. */
2445
  int64_t *cfm_mpid;
2446
  size_t n_cfm_mpid;
2447
2448
  /* cfm_remote_mpids column. */
2449
  int64_t *cfm_remote_mpids;
2450
  size_t n_cfm_remote_mpids;
2451
2452
  /* cfm_remote_opstate column. */
2453
  char *cfm_remote_opstate;
2454
2455
  /* duplex column. */
2456
  char *duplex;
2457
2458
  /* error column. */
2459
  char *error;
2460
2461
  /* external_ids column. */
2462
  struct smap external_ids;
2463
2464
  /* ifindex column. */
2465
  int64_t *ifindex;
2466
  size_t n_ifindex;
2467
2468
  /* ingress_policing_burst column. */
2469
  int64_t ingress_policing_burst;
2470
2471
  /* ingress_policing_kpkts_burst column. */
2472
  int64_t ingress_policing_kpkts_burst;
2473
2474
  /* ingress_policing_kpkts_rate column. */
2475
  int64_t ingress_policing_kpkts_rate;
2476
2477
  /* ingress_policing_rate column. */
2478
  int64_t ingress_policing_rate;
2479
2480
  /* lacp_current column. */
2481
  bool *lacp_current;
2482
  size_t n_lacp_current;
2483
2484
  /* link_resets column. */
2485
  int64_t *link_resets;
2486
  size_t n_link_resets;
2487
2488
  /* link_speed column. */
2489
  int64_t *link_speed;
2490
  size_t n_link_speed;
2491
2492
  /* link_state column. */
2493
  char *link_state;
2494
2495
  /* lldp column. */
2496
  struct smap lldp;
2497
2498
  /* mac column. */
2499
  char *mac;
2500
2501
  /* mac_in_use column. */
2502
  char *mac_in_use;
2503
2504
  /* mtu column. */
2505
  int64_t *mtu;
2506
  size_t n_mtu;
2507
2508
  /* mtu_request column. */
2509
  int64_t *mtu_request;
2510
  size_t n_mtu_request;
2511
2512
  /* name column. */
2513
  char *name; /* Always nonnull. */
2514
2515
  /* ofport column. */
2516
  int64_t *ofport;
2517
  size_t n_ofport;
2518
2519
  /* ofport_request column. */
2520
  int64_t *ofport_request;
2521
  size_t n_ofport_request;
2522
2523
  /* options column. */
2524
  struct smap options;
2525
2526
  /* other_config column. */
2527
  struct smap other_config;
2528
2529
  /* statistics column. */
2530
  char **key_statistics;
2531
  int64_t *value_statistics;
2532
  size_t n_statistics;
2533
2534
  /* status column. */
2535
  struct smap status;
2536
2537
  /* type column. */
2538
  char *type; /* Always nonnull. */
2539
};
2540
2541
enum ovsrec_interface_column_id {
2542
    OVSREC_INTERFACE_COL_ADMIN_STATE,
2543
    OVSREC_INTERFACE_COL_BFD,
2544
    OVSREC_INTERFACE_COL_BFD_STATUS,
2545
    OVSREC_INTERFACE_COL_CFM_FAULT,
2546
    OVSREC_INTERFACE_COL_CFM_FAULT_STATUS,
2547
    OVSREC_INTERFACE_COL_CFM_FLAP_COUNT,
2548
    OVSREC_INTERFACE_COL_CFM_HEALTH,
2549
    OVSREC_INTERFACE_COL_CFM_MPID,
2550
    OVSREC_INTERFACE_COL_CFM_REMOTE_MPIDS,
2551
    OVSREC_INTERFACE_COL_CFM_REMOTE_OPSTATE,
2552
    OVSREC_INTERFACE_COL_DUPLEX,
2553
    OVSREC_INTERFACE_COL_ERROR,
2554
    OVSREC_INTERFACE_COL_EXTERNAL_IDS,
2555
    OVSREC_INTERFACE_COL_IFINDEX,
2556
    OVSREC_INTERFACE_COL_INGRESS_POLICING_BURST,
2557
    OVSREC_INTERFACE_COL_INGRESS_POLICING_KPKTS_BURST,
2558
    OVSREC_INTERFACE_COL_INGRESS_POLICING_KPKTS_RATE,
2559
    OVSREC_INTERFACE_COL_INGRESS_POLICING_RATE,
2560
    OVSREC_INTERFACE_COL_LACP_CURRENT,
2561
    OVSREC_INTERFACE_COL_LINK_RESETS,
2562
    OVSREC_INTERFACE_COL_LINK_SPEED,
2563
    OVSREC_INTERFACE_COL_LINK_STATE,
2564
    OVSREC_INTERFACE_COL_LLDP,
2565
    OVSREC_INTERFACE_COL_MAC,
2566
    OVSREC_INTERFACE_COL_MAC_IN_USE,
2567
    OVSREC_INTERFACE_COL_MTU,
2568
    OVSREC_INTERFACE_COL_MTU_REQUEST,
2569
    OVSREC_INTERFACE_COL_NAME,
2570
    OVSREC_INTERFACE_COL_OFPORT,
2571
    OVSREC_INTERFACE_COL_OFPORT_REQUEST,
2572
    OVSREC_INTERFACE_COL_OPTIONS,
2573
    OVSREC_INTERFACE_COL_OTHER_CONFIG,
2574
    OVSREC_INTERFACE_COL_STATISTICS,
2575
    OVSREC_INTERFACE_COL_STATUS,
2576
    OVSREC_INTERFACE_COL_TYPE,
2577
    OVSREC_INTERFACE_N_COLUMNS
2578
};
2579
2580
0
#define ovsrec_interface_col_admin_state (ovsrec_interface_columns[OVSREC_INTERFACE_COL_ADMIN_STATE])
2581
0
#define ovsrec_interface_col_bfd (ovsrec_interface_columns[OVSREC_INTERFACE_COL_BFD])
2582
0
#define ovsrec_interface_col_bfd_status (ovsrec_interface_columns[OVSREC_INTERFACE_COL_BFD_STATUS])
2583
0
#define ovsrec_interface_col_cfm_fault (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_FAULT])
2584
0
#define ovsrec_interface_col_cfm_fault_status (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_FAULT_STATUS])
2585
0
#define ovsrec_interface_col_cfm_flap_count (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_FLAP_COUNT])
2586
0
#define ovsrec_interface_col_cfm_health (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_HEALTH])
2587
0
#define ovsrec_interface_col_cfm_mpid (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_MPID])
2588
0
#define ovsrec_interface_col_cfm_remote_mpids (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_REMOTE_MPIDS])
2589
0
#define ovsrec_interface_col_cfm_remote_opstate (ovsrec_interface_columns[OVSREC_INTERFACE_COL_CFM_REMOTE_OPSTATE])
2590
0
#define ovsrec_interface_col_duplex (ovsrec_interface_columns[OVSREC_INTERFACE_COL_DUPLEX])
2591
0
#define ovsrec_interface_col_error (ovsrec_interface_columns[OVSREC_INTERFACE_COL_ERROR])
2592
0
#define ovsrec_interface_col_external_ids (ovsrec_interface_columns[OVSREC_INTERFACE_COL_EXTERNAL_IDS])
2593
0
#define ovsrec_interface_col_ifindex (ovsrec_interface_columns[OVSREC_INTERFACE_COL_IFINDEX])
2594
0
#define ovsrec_interface_col_ingress_policing_burst (ovsrec_interface_columns[OVSREC_INTERFACE_COL_INGRESS_POLICING_BURST])
2595
0
#define ovsrec_interface_col_ingress_policing_kpkts_burst (ovsrec_interface_columns[OVSREC_INTERFACE_COL_INGRESS_POLICING_KPKTS_BURST])
2596
0
#define ovsrec_interface_col_ingress_policing_kpkts_rate (ovsrec_interface_columns[OVSREC_INTERFACE_COL_INGRESS_POLICING_KPKTS_RATE])
2597
0
#define ovsrec_interface_col_ingress_policing_rate (ovsrec_interface_columns[OVSREC_INTERFACE_COL_INGRESS_POLICING_RATE])
2598
0
#define ovsrec_interface_col_lacp_current (ovsrec_interface_columns[OVSREC_INTERFACE_COL_LACP_CURRENT])
2599
0
#define ovsrec_interface_col_link_resets (ovsrec_interface_columns[OVSREC_INTERFACE_COL_LINK_RESETS])
2600
0
#define ovsrec_interface_col_link_speed (ovsrec_interface_columns[OVSREC_INTERFACE_COL_LINK_SPEED])
2601
0
#define ovsrec_interface_col_link_state (ovsrec_interface_columns[OVSREC_INTERFACE_COL_LINK_STATE])
2602
0
#define ovsrec_interface_col_lldp (ovsrec_interface_columns[OVSREC_INTERFACE_COL_LLDP])
2603
0
#define ovsrec_interface_col_mac (ovsrec_interface_columns[OVSREC_INTERFACE_COL_MAC])
2604
0
#define ovsrec_interface_col_mac_in_use (ovsrec_interface_columns[OVSREC_INTERFACE_COL_MAC_IN_USE])
2605
0
#define ovsrec_interface_col_mtu (ovsrec_interface_columns[OVSREC_INTERFACE_COL_MTU])
2606
0
#define ovsrec_interface_col_mtu_request (ovsrec_interface_columns[OVSREC_INTERFACE_COL_MTU_REQUEST])
2607
0
#define ovsrec_interface_col_name (ovsrec_interface_columns[OVSREC_INTERFACE_COL_NAME])
2608
0
#define ovsrec_interface_col_ofport (ovsrec_interface_columns[OVSREC_INTERFACE_COL_OFPORT])
2609
0
#define ovsrec_interface_col_ofport_request (ovsrec_interface_columns[OVSREC_INTERFACE_COL_OFPORT_REQUEST])
2610
0
#define ovsrec_interface_col_options (ovsrec_interface_columns[OVSREC_INTERFACE_COL_OPTIONS])
2611
0
#define ovsrec_interface_col_other_config (ovsrec_interface_columns[OVSREC_INTERFACE_COL_OTHER_CONFIG])
2612
0
#define ovsrec_interface_col_statistics (ovsrec_interface_columns[OVSREC_INTERFACE_COL_STATISTICS])
2613
0
#define ovsrec_interface_col_status (ovsrec_interface_columns[OVSREC_INTERFACE_COL_STATUS])
2614
0
#define ovsrec_interface_col_type (ovsrec_interface_columns[OVSREC_INTERFACE_COL_TYPE])
2615
2616
extern struct ovsdb_idl_column ovsrec_interface_columns[OVSREC_INTERFACE_N_COLUMNS];
2617
bool ovsrec_server_has_interface_table_col_admin_state(const struct ovsdb_idl *); 
2618
bool ovsrec_server_has_interface_table_col_bfd(const struct ovsdb_idl *); 
2619
bool ovsrec_server_has_interface_table_col_bfd_status(const struct ovsdb_idl *); 
2620
bool ovsrec_server_has_interface_table_col_cfm_fault(const struct ovsdb_idl *); 
2621
bool ovsrec_server_has_interface_table_col_cfm_fault_status(const struct ovsdb_idl *); 
2622
bool ovsrec_server_has_interface_table_col_cfm_flap_count(const struct ovsdb_idl *); 
2623
bool ovsrec_server_has_interface_table_col_cfm_health(const struct ovsdb_idl *); 
2624
bool ovsrec_server_has_interface_table_col_cfm_mpid(const struct ovsdb_idl *); 
2625
bool ovsrec_server_has_interface_table_col_cfm_remote_mpids(const struct ovsdb_idl *); 
2626
bool ovsrec_server_has_interface_table_col_cfm_remote_opstate(const struct ovsdb_idl *); 
2627
bool ovsrec_server_has_interface_table_col_duplex(const struct ovsdb_idl *); 
2628
bool ovsrec_server_has_interface_table_col_error(const struct ovsdb_idl *); 
2629
bool ovsrec_server_has_interface_table_col_external_ids(const struct ovsdb_idl *); 
2630
bool ovsrec_server_has_interface_table_col_ifindex(const struct ovsdb_idl *); 
2631
bool ovsrec_server_has_interface_table_col_ingress_policing_burst(const struct ovsdb_idl *); 
2632
bool ovsrec_server_has_interface_table_col_ingress_policing_kpkts_burst(const struct ovsdb_idl *); 
2633
bool ovsrec_server_has_interface_table_col_ingress_policing_kpkts_rate(const struct ovsdb_idl *); 
2634
bool ovsrec_server_has_interface_table_col_ingress_policing_rate(const struct ovsdb_idl *); 
2635
bool ovsrec_server_has_interface_table_col_lacp_current(const struct ovsdb_idl *); 
2636
bool ovsrec_server_has_interface_table_col_link_resets(const struct ovsdb_idl *); 
2637
bool ovsrec_server_has_interface_table_col_link_speed(const struct ovsdb_idl *); 
2638
bool ovsrec_server_has_interface_table_col_link_state(const struct ovsdb_idl *); 
2639
bool ovsrec_server_has_interface_table_col_lldp(const struct ovsdb_idl *); 
2640
bool ovsrec_server_has_interface_table_col_mac(const struct ovsdb_idl *); 
2641
bool ovsrec_server_has_interface_table_col_mac_in_use(const struct ovsdb_idl *); 
2642
bool ovsrec_server_has_interface_table_col_mtu(const struct ovsdb_idl *); 
2643
bool ovsrec_server_has_interface_table_col_mtu_request(const struct ovsdb_idl *); 
2644
bool ovsrec_server_has_interface_table_col_name(const struct ovsdb_idl *); 
2645
bool ovsrec_server_has_interface_table_col_ofport(const struct ovsdb_idl *); 
2646
bool ovsrec_server_has_interface_table_col_ofport_request(const struct ovsdb_idl *); 
2647
bool ovsrec_server_has_interface_table_col_options(const struct ovsdb_idl *); 
2648
bool ovsrec_server_has_interface_table_col_other_config(const struct ovsdb_idl *); 
2649
bool ovsrec_server_has_interface_table_col_statistics(const struct ovsdb_idl *); 
2650
bool ovsrec_server_has_interface_table_col_status(const struct ovsdb_idl *); 
2651
bool ovsrec_server_has_interface_table_col_type(const struct ovsdb_idl *); 
2652
2653
bool ovsrec_server_has_interface_table(const struct ovsdb_idl *);
2654
const struct ovsrec_interface_table *ovsrec_interface_table_get(const struct ovsdb_idl *);
2655
const struct ovsrec_interface *ovsrec_interface_table_first(const struct ovsrec_interface_table *);
2656
2657
#define OVSREC_INTERFACE_TABLE_FOR_EACH(ROW, TABLE) \
2658
        for ((ROW) = ovsrec_interface_table_first(TABLE); \
2659
             (ROW); \
2660
             (ROW) = ovsrec_interface_next(ROW))
2661
#define OVSREC_INTERFACE_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
2662
        for ((ROW) = ovsrec_interface_table_first(TABLE); \
2663
             (ROW) ? ((NEXT) = ovsrec_interface_next(ROW), 1) : 0; \
2664
             (ROW) = (NEXT))
2665
#define OVSREC_INTERFACE_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
2666
        for (const struct ovsrec_interface * ROW__next = ((ROW) = ovsrec_interface_table_first(TABLE), NULL); \
2667
             (ROW) ? (ROW__next = ovsrec_interface_next(ROW), 1) : (ROW__next = NULL, 0); \
2668
             (ROW) = ROW__next)
2669
#define OVSREC_INTERFACE_TABLE_FOR_EACH_SAFE(...)                                        \
2670
        OVERLOAD_SAFE_MACRO(OVSREC_INTERFACE_TABLE_FOR_EACH_SAFE_LONG,                   \
2671
                            OVSREC_INTERFACE_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
2672
2673
2674
const struct ovsrec_interface *ovsrec_interface_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
2675
const struct ovsrec_interface *ovsrec_interface_table_get_for_uuid(const struct ovsrec_interface_table *, const struct uuid *);
2676
const struct ovsrec_interface *ovsrec_interface_first(const struct ovsdb_idl *);
2677
const struct ovsrec_interface *ovsrec_interface_next(const struct ovsrec_interface *);
2678
#define OVSREC_INTERFACE_FOR_EACH(ROW, IDL) \
2679
        for ((ROW) = ovsrec_interface_first(IDL); \
2680
             (ROW); \
2681
             (ROW) = ovsrec_interface_next(ROW))
2682
#define OVSREC_INTERFACE_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
2683
        for ((ROW) = ovsrec_interface_first(IDL); \
2684
             (ROW) ? ((NEXT) = ovsrec_interface_next(ROW), 1) : 0; \
2685
             (ROW) = (NEXT))
2686
#define OVSREC_INTERFACE_FOR_EACH_SAFE_SHORT(ROW, IDL) \
2687
        for (const struct ovsrec_interface * ROW__next = ((ROW) = ovsrec_interface_first(IDL), NULL); \
2688
             (ROW) ? (ROW__next = ovsrec_interface_next(ROW), 1) : (ROW__next = NULL, 0); \
2689
             (ROW) = ROW__next)
2690
#define OVSREC_INTERFACE_FOR_EACH_SAFE(...)                                         \
2691
        OVERLOAD_SAFE_MACRO(OVSREC_INTERFACE_FOR_EACH_SAFE_LONG,                    \
2692
                            OVSREC_INTERFACE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
2693
2694
unsigned int ovsrec_interface_get_seqno(const struct ovsdb_idl *);
2695
unsigned int ovsrec_interface_row_get_seqno(const struct ovsrec_interface *row, enum ovsdb_idl_change change);
2696
const struct ovsrec_interface *ovsrec_interface_track_get_first(const struct ovsdb_idl *);
2697
const struct ovsrec_interface *ovsrec_interface_track_get_next(const struct ovsrec_interface *);
2698
#define OVSREC_INTERFACE_FOR_EACH_TRACKED(ROW, IDL) \
2699
        for ((ROW) = ovsrec_interface_track_get_first(IDL); \
2700
             (ROW); \
2701
             (ROW) = ovsrec_interface_track_get_next(ROW))
2702
2703
const struct ovsrec_interface *ovsrec_interface_table_track_get_first(const struct ovsrec_interface_table *);
2704
#define OVSREC_INTERFACE_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
2705
        for ((ROW) = ovsrec_interface_table_track_get_first(TABLE); \
2706
             (ROW); \
2707
             (ROW) = ovsrec_interface_track_get_next(ROW))
2708
2709
2710
/* Returns true if 'row' was inserted since the last change tracking reset.
2711
 *
2712
 * Note: This can only be used to test rows of tracked changes. This cannot be
2713
 * used to test if an uncommitted row that has been added locally is new or it
2714
 * may given unexpected results. */
2715
static inline bool ovsrec_interface_is_new(const struct ovsrec_interface *row)
2716
0
{
2717
0
    return ovsrec_interface_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
2718
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_interface_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_interface_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_interface_is_new
2719
2720
/* Returns true if 'row' was deleted since the last change tracking reset.
2721
 *
2722
 * Note: This can only be used to test rows of tracked changes. This cannot be
2723
 * used to test if an uncommitted row that has been added locally has been
2724
 * deleted or it may given unexpected results. */
2725
static inline bool ovsrec_interface_is_deleted(const struct ovsrec_interface *row)
2726
0
{
2727
0
    return ovsrec_interface_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
2728
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_interface_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_interface_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_interface_is_deleted
2729
2730
void ovsrec_interface_index_destroy_row(const struct ovsrec_interface *);
2731
2732
struct ovsrec_interface *ovsrec_interface_index_find(struct ovsdb_idl_index *, const struct ovsrec_interface *);
2733
2734
int ovsrec_interface_index_compare(
2735
    struct ovsdb_idl_index *, 
2736
    const struct ovsrec_interface *, 
2737
    const struct ovsrec_interface *);
2738
struct ovsdb_idl_cursor ovsrec_interface_cursor_first(struct ovsdb_idl_index *);
2739
struct ovsdb_idl_cursor ovsrec_interface_cursor_first_eq(
2740
    struct ovsdb_idl_index *, const struct ovsrec_interface *);
2741
struct ovsdb_idl_cursor ovsrec_interface_cursor_first_ge(
2742
    struct ovsdb_idl_index *, const struct ovsrec_interface *);
2743
2744
struct ovsrec_interface *ovsrec_interface_cursor_data(struct ovsdb_idl_cursor *);
2745
2746
#define OVSREC_INTERFACE_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
2747
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_interface_cursor_first_ge(INDEX, FROM); \
2748
             (cursor__.position \
2749
              && ((ROW) = ovsrec_interface_cursor_data(&cursor__), \
2750
                  !(TO) || ovsrec_interface_index_compare(INDEX, ROW, TO) <= 0)); \
2751
             ovsdb_idl_cursor_next(&cursor__))
2752
#define OVSREC_INTERFACE_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
2753
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_interface_cursor_first_eq(INDEX, KEY); \
2754
             (cursor__.position \
2755
              ? ((ROW) = ovsrec_interface_cursor_data(&cursor__), \
2756
                 ovsdb_idl_cursor_next_eq(&cursor__), \
2757
                 true) \
2758
              : false); \
2759
            )
2760
#define OVSREC_INTERFACE_FOR_EACH_BYINDEX(ROW, INDEX) \
2761
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_interface_cursor_first(INDEX); \
2762
             (cursor__.position \
2763
              ? ((ROW) = ovsrec_interface_cursor_data(&cursor__), \
2764
                 ovsdb_idl_cursor_next(&cursor__), \
2765
                 true) \
2766
              : false); \
2767
            )
2768
2769
void ovsrec_interface_init(struct ovsrec_interface *);
2770
void ovsrec_interface_delete(const struct ovsrec_interface *);
2771
struct ovsrec_interface *ovsrec_interface_insert(struct ovsdb_idl_txn *);
2772
struct ovsrec_interface *ovsrec_interface_insert_persist_uuid(
2773
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
2774
2775
/* Returns true if the tracked column referenced by 'enum ovsrec_interface_column_id' of
2776
 * the row referenced by 'struct ovsrec_interface *' was updated since the last change
2777
 * tracking reset.
2778
 *
2779
 * Note: This can only be used to test rows of tracked changes. This cannot be
2780
 * used to test if an uncommitted row that has been added locally has been
2781
 * updated or it may given unexpected results. */
2782
bool ovsrec_interface_is_updated(const struct ovsrec_interface *, enum ovsrec_interface_column_id);
2783
2784
void ovsrec_interface_verify_admin_state(const struct ovsrec_interface *);
2785
void ovsrec_interface_verify_bfd(const struct ovsrec_interface *);
2786
void ovsrec_interface_verify_bfd_status(const struct ovsrec_interface *);
2787
void ovsrec_interface_verify_cfm_fault(const struct ovsrec_interface *);
2788
void ovsrec_interface_verify_cfm_fault_status(const struct ovsrec_interface *);
2789
void ovsrec_interface_verify_cfm_flap_count(const struct ovsrec_interface *);
2790
void ovsrec_interface_verify_cfm_health(const struct ovsrec_interface *);
2791
void ovsrec_interface_verify_cfm_mpid(const struct ovsrec_interface *);
2792
void ovsrec_interface_verify_cfm_remote_mpids(const struct ovsrec_interface *);
2793
void ovsrec_interface_verify_cfm_remote_opstate(const struct ovsrec_interface *);
2794
void ovsrec_interface_verify_duplex(const struct ovsrec_interface *);
2795
void ovsrec_interface_verify_error(const struct ovsrec_interface *);
2796
void ovsrec_interface_verify_external_ids(const struct ovsrec_interface *);
2797
void ovsrec_interface_verify_ifindex(const struct ovsrec_interface *);
2798
void ovsrec_interface_verify_ingress_policing_burst(const struct ovsrec_interface *);
2799
void ovsrec_interface_verify_ingress_policing_kpkts_burst(const struct ovsrec_interface *);
2800
void ovsrec_interface_verify_ingress_policing_kpkts_rate(const struct ovsrec_interface *);
2801
void ovsrec_interface_verify_ingress_policing_rate(const struct ovsrec_interface *);
2802
void ovsrec_interface_verify_lacp_current(const struct ovsrec_interface *);
2803
void ovsrec_interface_verify_link_resets(const struct ovsrec_interface *);
2804
void ovsrec_interface_verify_link_speed(const struct ovsrec_interface *);
2805
void ovsrec_interface_verify_link_state(const struct ovsrec_interface *);
2806
void ovsrec_interface_verify_lldp(const struct ovsrec_interface *);
2807
void ovsrec_interface_verify_mac(const struct ovsrec_interface *);
2808
void ovsrec_interface_verify_mac_in_use(const struct ovsrec_interface *);
2809
void ovsrec_interface_verify_mtu(const struct ovsrec_interface *);
2810
void ovsrec_interface_verify_mtu_request(const struct ovsrec_interface *);
2811
void ovsrec_interface_verify_name(const struct ovsrec_interface *);
2812
void ovsrec_interface_verify_ofport(const struct ovsrec_interface *);
2813
void ovsrec_interface_verify_ofport_request(const struct ovsrec_interface *);
2814
void ovsrec_interface_verify_options(const struct ovsrec_interface *);
2815
void ovsrec_interface_verify_other_config(const struct ovsrec_interface *);
2816
void ovsrec_interface_verify_statistics(const struct ovsrec_interface *);
2817
void ovsrec_interface_verify_status(const struct ovsrec_interface *);
2818
void ovsrec_interface_verify_type(const struct ovsrec_interface *);
2819
2820
const struct ovsdb_datum *ovsrec_interface_get_admin_state(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2821
const struct ovsdb_datum *ovsrec_interface_get_bfd(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2822
const struct ovsdb_datum *ovsrec_interface_get_bfd_status(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2823
const struct ovsdb_datum *ovsrec_interface_get_cfm_fault(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2824
const struct ovsdb_datum *ovsrec_interface_get_cfm_fault_status(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2825
const struct ovsdb_datum *ovsrec_interface_get_cfm_flap_count(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2826
const struct ovsdb_datum *ovsrec_interface_get_cfm_health(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2827
const struct ovsdb_datum *ovsrec_interface_get_cfm_mpid(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2828
const struct ovsdb_datum *ovsrec_interface_get_cfm_remote_mpids(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2829
const struct ovsdb_datum *ovsrec_interface_get_cfm_remote_opstate(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2830
const struct ovsdb_datum *ovsrec_interface_get_duplex(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2831
const struct ovsdb_datum *ovsrec_interface_get_error(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2832
const struct ovsdb_datum *ovsrec_interface_get_external_ids(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2833
const struct ovsdb_datum *ovsrec_interface_get_ifindex(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2834
const struct ovsdb_datum *ovsrec_interface_get_ingress_policing_burst(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2835
const struct ovsdb_datum *ovsrec_interface_get_ingress_policing_kpkts_burst(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2836
const struct ovsdb_datum *ovsrec_interface_get_ingress_policing_kpkts_rate(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2837
const struct ovsdb_datum *ovsrec_interface_get_ingress_policing_rate(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2838
const struct ovsdb_datum *ovsrec_interface_get_lacp_current(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2839
const struct ovsdb_datum *ovsrec_interface_get_link_resets(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2840
const struct ovsdb_datum *ovsrec_interface_get_link_speed(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2841
const struct ovsdb_datum *ovsrec_interface_get_link_state(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2842
const struct ovsdb_datum *ovsrec_interface_get_lldp(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2843
const struct ovsdb_datum *ovsrec_interface_get_mac(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2844
const struct ovsdb_datum *ovsrec_interface_get_mac_in_use(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2845
const struct ovsdb_datum *ovsrec_interface_get_mtu(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2846
const struct ovsdb_datum *ovsrec_interface_get_mtu_request(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2847
const struct ovsdb_datum *ovsrec_interface_get_name(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2848
const struct ovsdb_datum *ovsrec_interface_get_ofport(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2849
const struct ovsdb_datum *ovsrec_interface_get_ofport_request(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2850
const struct ovsdb_datum *ovsrec_interface_get_options(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2851
const struct ovsdb_datum *ovsrec_interface_get_other_config(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2852
const struct ovsdb_datum *ovsrec_interface_get_statistics(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2853
const struct ovsdb_datum *ovsrec_interface_get_status(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
2854
const struct ovsdb_datum *ovsrec_interface_get_type(const struct ovsrec_interface *, enum ovsdb_atomic_type key_type);
2855
2856
void ovsrec_interface_set_admin_state(const struct ovsrec_interface *, const char *admin_state);
2857
void ovsrec_interface_set_bfd(const struct ovsrec_interface *, const struct smap *);
2858
void ovsrec_interface_set_bfd_status(const struct ovsrec_interface *, const struct smap *);
2859
void ovsrec_interface_set_cfm_fault(const struct ovsrec_interface *, const bool *cfm_fault, size_t n_cfm_fault);
2860
void ovsrec_interface_set_cfm_fault_status(const struct ovsrec_interface *, const char **cfm_fault_status, size_t n_cfm_fault_status);
2861
void ovsrec_interface_set_cfm_flap_count(const struct ovsrec_interface *, const int64_t *cfm_flap_count, size_t n_cfm_flap_count);
2862
void ovsrec_interface_set_cfm_health(const struct ovsrec_interface *, const int64_t *cfm_health, size_t n_cfm_health);
2863
void ovsrec_interface_set_cfm_mpid(const struct ovsrec_interface *, const int64_t *cfm_mpid, size_t n_cfm_mpid);
2864
void ovsrec_interface_set_cfm_remote_mpids(const struct ovsrec_interface *, const int64_t *cfm_remote_mpids, size_t n_cfm_remote_mpids);
2865
void ovsrec_interface_set_cfm_remote_opstate(const struct ovsrec_interface *, const char *cfm_remote_opstate);
2866
void ovsrec_interface_set_duplex(const struct ovsrec_interface *, const char *duplex);
2867
void ovsrec_interface_set_error(const struct ovsrec_interface *, const char *error);
2868
void ovsrec_interface_set_external_ids(const struct ovsrec_interface *, const struct smap *);
2869
void ovsrec_interface_set_ifindex(const struct ovsrec_interface *, const int64_t *ifindex, size_t n_ifindex);
2870
void ovsrec_interface_set_ingress_policing_burst(const struct ovsrec_interface *, int64_t ingress_policing_burst);
2871
void ovsrec_interface_set_ingress_policing_kpkts_burst(const struct ovsrec_interface *, int64_t ingress_policing_kpkts_burst);
2872
void ovsrec_interface_set_ingress_policing_kpkts_rate(const struct ovsrec_interface *, int64_t ingress_policing_kpkts_rate);
2873
void ovsrec_interface_set_ingress_policing_rate(const struct ovsrec_interface *, int64_t ingress_policing_rate);
2874
void ovsrec_interface_set_lacp_current(const struct ovsrec_interface *, const bool *lacp_current, size_t n_lacp_current);
2875
void ovsrec_interface_set_link_resets(const struct ovsrec_interface *, const int64_t *link_resets, size_t n_link_resets);
2876
void ovsrec_interface_set_link_speed(const struct ovsrec_interface *, const int64_t *link_speed, size_t n_link_speed);
2877
void ovsrec_interface_set_link_state(const struct ovsrec_interface *, const char *link_state);
2878
void ovsrec_interface_set_lldp(const struct ovsrec_interface *, const struct smap *);
2879
void ovsrec_interface_set_mac(const struct ovsrec_interface *, const char *mac);
2880
void ovsrec_interface_set_mac_in_use(const struct ovsrec_interface *, const char *mac_in_use);
2881
void ovsrec_interface_set_mtu(const struct ovsrec_interface *, const int64_t *mtu, size_t n_mtu);
2882
void ovsrec_interface_set_mtu_request(const struct ovsrec_interface *, const int64_t *mtu_request, size_t n_mtu_request);
2883
void ovsrec_interface_set_name(const struct ovsrec_interface *, const char *name);
2884
void ovsrec_interface_set_ofport(const struct ovsrec_interface *, const int64_t *ofport, size_t n_ofport);
2885
void ovsrec_interface_set_ofport_request(const struct ovsrec_interface *, const int64_t *ofport_request, size_t n_ofport_request);
2886
void ovsrec_interface_set_options(const struct ovsrec_interface *, const struct smap *);
2887
void ovsrec_interface_set_other_config(const struct ovsrec_interface *, const struct smap *);
2888
void ovsrec_interface_set_statistics(const struct ovsrec_interface *, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
2889
void ovsrec_interface_set_status(const struct ovsrec_interface *, const struct smap *);
2890
void ovsrec_interface_set_type(const struct ovsrec_interface *, const char *type);
2891
2892
void ovsrec_interface_update_admin_state_addvalue(const struct ovsrec_interface *,  const char *);
2893
void ovsrec_interface_update_admin_state_delvalue(const struct ovsrec_interface *,  const char *);
2894
void ovsrec_interface_add_clause_admin_state(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *admin_state);
2895
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2896
void ovsrec_interface_update_bfd_setkey(const struct ovsrec_interface *,  const char *, const char *);
2897
void ovsrec_interface_update_bfd_delkey(const struct ovsrec_interface *,  const char *);
2898
void ovsrec_interface_add_clause_bfd(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2899
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2900
void ovsrec_interface_update_bfd_status_setkey(const struct ovsrec_interface *,  const char *, const char *);
2901
void ovsrec_interface_update_bfd_status_delkey(const struct ovsrec_interface *,  const char *);
2902
void ovsrec_interface_add_clause_bfd_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2903
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2904
void ovsrec_interface_update_cfm_fault_addvalue(const struct ovsrec_interface *,  bool );
2905
void ovsrec_interface_update_cfm_fault_delvalue(const struct ovsrec_interface *,  bool );
2906
void ovsrec_interface_add_clause_cfm_fault(struct ovsdb_idl_condition *, enum ovsdb_function function, const bool *cfm_fault, size_t n_cfm_fault);
2907
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2908
void ovsrec_interface_update_cfm_fault_status_addvalue(const struct ovsrec_interface *,  const char *);
2909
void ovsrec_interface_update_cfm_fault_status_delvalue(const struct ovsrec_interface *,  const char *);
2910
void ovsrec_interface_add_clause_cfm_fault_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **cfm_fault_status, size_t n_cfm_fault_status);
2911
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2912
void ovsrec_interface_update_cfm_flap_count_addvalue(const struct ovsrec_interface *,  int64_t );
2913
void ovsrec_interface_update_cfm_flap_count_delvalue(const struct ovsrec_interface *,  int64_t );
2914
void ovsrec_interface_add_clause_cfm_flap_count(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cfm_flap_count, size_t n_cfm_flap_count);
2915
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2916
void ovsrec_interface_update_cfm_health_addvalue(const struct ovsrec_interface *,  int64_t );
2917
void ovsrec_interface_update_cfm_health_delvalue(const struct ovsrec_interface *,  int64_t );
2918
void ovsrec_interface_add_clause_cfm_health(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cfm_health, size_t n_cfm_health);
2919
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2920
void ovsrec_interface_update_cfm_mpid_addvalue(const struct ovsrec_interface *,  int64_t );
2921
void ovsrec_interface_update_cfm_mpid_delvalue(const struct ovsrec_interface *,  int64_t );
2922
void ovsrec_interface_add_clause_cfm_mpid(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cfm_mpid, size_t n_cfm_mpid);
2923
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2924
void ovsrec_interface_update_cfm_remote_mpids_addvalue(const struct ovsrec_interface *,  int64_t );
2925
void ovsrec_interface_update_cfm_remote_mpids_delvalue(const struct ovsrec_interface *,  int64_t );
2926
void ovsrec_interface_add_clause_cfm_remote_mpids(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cfm_remote_mpids, size_t n_cfm_remote_mpids);
2927
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2928
void ovsrec_interface_update_cfm_remote_opstate_addvalue(const struct ovsrec_interface *,  const char *);
2929
void ovsrec_interface_update_cfm_remote_opstate_delvalue(const struct ovsrec_interface *,  const char *);
2930
void ovsrec_interface_add_clause_cfm_remote_opstate(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *cfm_remote_opstate);
2931
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2932
void ovsrec_interface_update_duplex_addvalue(const struct ovsrec_interface *,  const char *);
2933
void ovsrec_interface_update_duplex_delvalue(const struct ovsrec_interface *,  const char *);
2934
void ovsrec_interface_add_clause_duplex(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *duplex);
2935
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2936
void ovsrec_interface_update_error_addvalue(const struct ovsrec_interface *,  const char *);
2937
void ovsrec_interface_update_error_delvalue(const struct ovsrec_interface *,  const char *);
2938
void ovsrec_interface_add_clause_error(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *error);
2939
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2940
void ovsrec_interface_update_external_ids_setkey(const struct ovsrec_interface *,  const char *, const char *);
2941
void ovsrec_interface_update_external_ids_delkey(const struct ovsrec_interface *,  const char *);
2942
void ovsrec_interface_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2943
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2944
void ovsrec_interface_update_ifindex_addvalue(const struct ovsrec_interface *,  int64_t );
2945
void ovsrec_interface_update_ifindex_delvalue(const struct ovsrec_interface *,  int64_t );
2946
void ovsrec_interface_add_clause_ifindex(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *ifindex, size_t n_ifindex);
2947
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2948
void ovsrec_interface_add_clause_ingress_policing_burst(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t ingress_policing_burst);
2949
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2950
void ovsrec_interface_add_clause_ingress_policing_kpkts_burst(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t ingress_policing_kpkts_burst);
2951
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2952
void ovsrec_interface_add_clause_ingress_policing_kpkts_rate(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t ingress_policing_kpkts_rate);
2953
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2954
void ovsrec_interface_add_clause_ingress_policing_rate(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t ingress_policing_rate);
2955
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2956
void ovsrec_interface_update_lacp_current_addvalue(const struct ovsrec_interface *,  bool );
2957
void ovsrec_interface_update_lacp_current_delvalue(const struct ovsrec_interface *,  bool );
2958
void ovsrec_interface_add_clause_lacp_current(struct ovsdb_idl_condition *, enum ovsdb_function function, const bool *lacp_current, size_t n_lacp_current);
2959
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2960
void ovsrec_interface_update_link_resets_addvalue(const struct ovsrec_interface *,  int64_t );
2961
void ovsrec_interface_update_link_resets_delvalue(const struct ovsrec_interface *,  int64_t );
2962
void ovsrec_interface_add_clause_link_resets(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *link_resets, size_t n_link_resets);
2963
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2964
void ovsrec_interface_update_link_speed_addvalue(const struct ovsrec_interface *,  int64_t );
2965
void ovsrec_interface_update_link_speed_delvalue(const struct ovsrec_interface *,  int64_t );
2966
void ovsrec_interface_add_clause_link_speed(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *link_speed, size_t n_link_speed);
2967
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2968
void ovsrec_interface_update_link_state_addvalue(const struct ovsrec_interface *,  const char *);
2969
void ovsrec_interface_update_link_state_delvalue(const struct ovsrec_interface *,  const char *);
2970
void ovsrec_interface_add_clause_link_state(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *link_state);
2971
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2972
void ovsrec_interface_update_lldp_setkey(const struct ovsrec_interface *,  const char *, const char *);
2973
void ovsrec_interface_update_lldp_delkey(const struct ovsrec_interface *,  const char *);
2974
void ovsrec_interface_add_clause_lldp(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
2975
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2976
void ovsrec_interface_update_mac_addvalue(const struct ovsrec_interface *,  const char *);
2977
void ovsrec_interface_update_mac_delvalue(const struct ovsrec_interface *,  const char *);
2978
void ovsrec_interface_add_clause_mac(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *mac);
2979
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2980
void ovsrec_interface_update_mac_in_use_addvalue(const struct ovsrec_interface *,  const char *);
2981
void ovsrec_interface_update_mac_in_use_delvalue(const struct ovsrec_interface *,  const char *);
2982
void ovsrec_interface_add_clause_mac_in_use(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *mac_in_use);
2983
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2984
void ovsrec_interface_update_mtu_addvalue(const struct ovsrec_interface *,  int64_t );
2985
void ovsrec_interface_update_mtu_delvalue(const struct ovsrec_interface *,  int64_t );
2986
void ovsrec_interface_add_clause_mtu(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *mtu, size_t n_mtu);
2987
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2988
void ovsrec_interface_update_mtu_request_addvalue(const struct ovsrec_interface *,  int64_t );
2989
void ovsrec_interface_update_mtu_request_delvalue(const struct ovsrec_interface *,  int64_t );
2990
void ovsrec_interface_add_clause_mtu_request(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *mtu_request, size_t n_mtu_request);
2991
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2992
void ovsrec_interface_add_clause_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *name);
2993
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2994
void ovsrec_interface_update_ofport_addvalue(const struct ovsrec_interface *,  int64_t );
2995
void ovsrec_interface_update_ofport_delvalue(const struct ovsrec_interface *,  int64_t );
2996
void ovsrec_interface_add_clause_ofport(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *ofport, size_t n_ofport);
2997
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
2998
void ovsrec_interface_update_ofport_request_addvalue(const struct ovsrec_interface *,  int64_t );
2999
void ovsrec_interface_update_ofport_request_delvalue(const struct ovsrec_interface *,  int64_t );
3000
void ovsrec_interface_add_clause_ofport_request(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *ofport_request, size_t n_ofport_request);
3001
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3002
void ovsrec_interface_update_options_setkey(const struct ovsrec_interface *,  const char *, const char *);
3003
void ovsrec_interface_update_options_delkey(const struct ovsrec_interface *,  const char *);
3004
void ovsrec_interface_add_clause_options(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3005
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3006
void ovsrec_interface_update_other_config_setkey(const struct ovsrec_interface *,  const char *, const char *);
3007
void ovsrec_interface_update_other_config_delkey(const struct ovsrec_interface *,  const char *);
3008
void ovsrec_interface_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3009
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3010
void ovsrec_interface_update_statistics_setkey(const struct ovsrec_interface *,  const char *, int64_t );
3011
void ovsrec_interface_update_statistics_delkey(const struct ovsrec_interface *,  const char *);
3012
void ovsrec_interface_add_clause_statistics(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
3013
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3014
void ovsrec_interface_update_status_setkey(const struct ovsrec_interface *,  const char *, const char *);
3015
void ovsrec_interface_update_status_delkey(const struct ovsrec_interface *,  const char *);
3016
void ovsrec_interface_add_clause_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3017
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3018
void ovsrec_interface_add_clause_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *type);
3019
unsigned int ovsrec_interface_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3020
3021
struct ovsrec_interface *ovsrec_interface_index_init_row(struct ovsdb_idl_index *);
3022
void ovsrec_interface_index_set_admin_state(const struct ovsrec_interface *,
3023
const char *admin_state);
3024
void ovsrec_interface_index_set_bfd(const struct ovsrec_interface *,
3025
const struct smap *);
3026
void ovsrec_interface_index_set_bfd_status(const struct ovsrec_interface *,
3027
const struct smap *);
3028
void ovsrec_interface_index_set_cfm_fault(const struct ovsrec_interface *,
3029
const bool *cfm_fault, size_t n_cfm_fault);
3030
void ovsrec_interface_index_set_cfm_fault_status(const struct ovsrec_interface *,
3031
const char **cfm_fault_status, size_t n_cfm_fault_status);
3032
void ovsrec_interface_index_set_cfm_flap_count(const struct ovsrec_interface *,
3033
const int64_t *cfm_flap_count, size_t n_cfm_flap_count);
3034
void ovsrec_interface_index_set_cfm_health(const struct ovsrec_interface *,
3035
const int64_t *cfm_health, size_t n_cfm_health);
3036
void ovsrec_interface_index_set_cfm_mpid(const struct ovsrec_interface *,
3037
const int64_t *cfm_mpid, size_t n_cfm_mpid);
3038
void ovsrec_interface_index_set_cfm_remote_mpids(const struct ovsrec_interface *,
3039
const int64_t *cfm_remote_mpids, size_t n_cfm_remote_mpids);
3040
void ovsrec_interface_index_set_cfm_remote_opstate(const struct ovsrec_interface *,
3041
const char *cfm_remote_opstate);
3042
void ovsrec_interface_index_set_duplex(const struct ovsrec_interface *,
3043
const char *duplex);
3044
void ovsrec_interface_index_set_error(const struct ovsrec_interface *,
3045
const char *error);
3046
void ovsrec_interface_index_set_external_ids(const struct ovsrec_interface *,
3047
const struct smap *);
3048
void ovsrec_interface_index_set_ifindex(const struct ovsrec_interface *,
3049
const int64_t *ifindex, size_t n_ifindex);
3050
void ovsrec_interface_index_set_ingress_policing_burst(const struct ovsrec_interface *,
3051
int64_t ingress_policing_burst);
3052
void ovsrec_interface_index_set_ingress_policing_kpkts_burst(const struct ovsrec_interface *,
3053
int64_t ingress_policing_kpkts_burst);
3054
void ovsrec_interface_index_set_ingress_policing_kpkts_rate(const struct ovsrec_interface *,
3055
int64_t ingress_policing_kpkts_rate);
3056
void ovsrec_interface_index_set_ingress_policing_rate(const struct ovsrec_interface *,
3057
int64_t ingress_policing_rate);
3058
void ovsrec_interface_index_set_lacp_current(const struct ovsrec_interface *,
3059
const bool *lacp_current, size_t n_lacp_current);
3060
void ovsrec_interface_index_set_link_resets(const struct ovsrec_interface *,
3061
const int64_t *link_resets, size_t n_link_resets);
3062
void ovsrec_interface_index_set_link_speed(const struct ovsrec_interface *,
3063
const int64_t *link_speed, size_t n_link_speed);
3064
void ovsrec_interface_index_set_link_state(const struct ovsrec_interface *,
3065
const char *link_state);
3066
void ovsrec_interface_index_set_lldp(const struct ovsrec_interface *,
3067
const struct smap *);
3068
void ovsrec_interface_index_set_mac(const struct ovsrec_interface *,
3069
const char *mac);
3070
void ovsrec_interface_index_set_mac_in_use(const struct ovsrec_interface *,
3071
const char *mac_in_use);
3072
void ovsrec_interface_index_set_mtu(const struct ovsrec_interface *,
3073
const int64_t *mtu, size_t n_mtu);
3074
void ovsrec_interface_index_set_mtu_request(const struct ovsrec_interface *,
3075
const int64_t *mtu_request, size_t n_mtu_request);
3076
void ovsrec_interface_index_set_name(const struct ovsrec_interface *,
3077
const char *name);
3078
void ovsrec_interface_index_set_ofport(const struct ovsrec_interface *,
3079
const int64_t *ofport, size_t n_ofport);
3080
void ovsrec_interface_index_set_ofport_request(const struct ovsrec_interface *,
3081
const int64_t *ofport_request, size_t n_ofport_request);
3082
void ovsrec_interface_index_set_options(const struct ovsrec_interface *,
3083
const struct smap *);
3084
void ovsrec_interface_index_set_other_config(const struct ovsrec_interface *,
3085
const struct smap *);
3086
void ovsrec_interface_index_set_statistics(const struct ovsrec_interface *,
3087
const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
3088
void ovsrec_interface_index_set_status(const struct ovsrec_interface *,
3089
const struct smap *);
3090
void ovsrec_interface_index_set_type(const struct ovsrec_interface *,
3091
const char *type);
3092

3093
/* Manager table. */
3094
struct ovsrec_manager {
3095
  struct ovsdb_idl_row header_;
3096
3097
  /* connection_mode column. */
3098
  char *connection_mode;
3099
3100
  /* external_ids column. */
3101
  struct smap external_ids;
3102
3103
  /* inactivity_probe column. */
3104
  int64_t *inactivity_probe;
3105
  size_t n_inactivity_probe;
3106
3107
  /* is_connected column. */
3108
  bool is_connected;
3109
3110
  /* max_backoff column. */
3111
  int64_t *max_backoff;
3112
  size_t n_max_backoff;
3113
3114
  /* other_config column. */
3115
  struct smap other_config;
3116
3117
  /* status column. */
3118
  struct smap status;
3119
3120
  /* target column. */
3121
  char *target; /* Always nonnull. */
3122
};
3123
3124
enum ovsrec_manager_column_id {
3125
    OVSREC_MANAGER_COL_CONNECTION_MODE,
3126
    OVSREC_MANAGER_COL_EXTERNAL_IDS,
3127
    OVSREC_MANAGER_COL_INACTIVITY_PROBE,
3128
    OVSREC_MANAGER_COL_IS_CONNECTED,
3129
    OVSREC_MANAGER_COL_MAX_BACKOFF,
3130
    OVSREC_MANAGER_COL_OTHER_CONFIG,
3131
    OVSREC_MANAGER_COL_STATUS,
3132
    OVSREC_MANAGER_COL_TARGET,
3133
    OVSREC_MANAGER_N_COLUMNS
3134
};
3135
3136
0
#define ovsrec_manager_col_connection_mode (ovsrec_manager_columns[OVSREC_MANAGER_COL_CONNECTION_MODE])
3137
0
#define ovsrec_manager_col_external_ids (ovsrec_manager_columns[OVSREC_MANAGER_COL_EXTERNAL_IDS])
3138
0
#define ovsrec_manager_col_inactivity_probe (ovsrec_manager_columns[OVSREC_MANAGER_COL_INACTIVITY_PROBE])
3139
0
#define ovsrec_manager_col_is_connected (ovsrec_manager_columns[OVSREC_MANAGER_COL_IS_CONNECTED])
3140
0
#define ovsrec_manager_col_max_backoff (ovsrec_manager_columns[OVSREC_MANAGER_COL_MAX_BACKOFF])
3141
0
#define ovsrec_manager_col_other_config (ovsrec_manager_columns[OVSREC_MANAGER_COL_OTHER_CONFIG])
3142
0
#define ovsrec_manager_col_status (ovsrec_manager_columns[OVSREC_MANAGER_COL_STATUS])
3143
0
#define ovsrec_manager_col_target (ovsrec_manager_columns[OVSREC_MANAGER_COL_TARGET])
3144
3145
extern struct ovsdb_idl_column ovsrec_manager_columns[OVSREC_MANAGER_N_COLUMNS];
3146
bool ovsrec_server_has_manager_table_col_connection_mode(const struct ovsdb_idl *); 
3147
bool ovsrec_server_has_manager_table_col_external_ids(const struct ovsdb_idl *); 
3148
bool ovsrec_server_has_manager_table_col_inactivity_probe(const struct ovsdb_idl *); 
3149
bool ovsrec_server_has_manager_table_col_is_connected(const struct ovsdb_idl *); 
3150
bool ovsrec_server_has_manager_table_col_max_backoff(const struct ovsdb_idl *); 
3151
bool ovsrec_server_has_manager_table_col_other_config(const struct ovsdb_idl *); 
3152
bool ovsrec_server_has_manager_table_col_status(const struct ovsdb_idl *); 
3153
bool ovsrec_server_has_manager_table_col_target(const struct ovsdb_idl *); 
3154
3155
bool ovsrec_server_has_manager_table(const struct ovsdb_idl *);
3156
const struct ovsrec_manager_table *ovsrec_manager_table_get(const struct ovsdb_idl *);
3157
const struct ovsrec_manager *ovsrec_manager_table_first(const struct ovsrec_manager_table *);
3158
3159
#define OVSREC_MANAGER_TABLE_FOR_EACH(ROW, TABLE) \
3160
        for ((ROW) = ovsrec_manager_table_first(TABLE); \
3161
             (ROW); \
3162
             (ROW) = ovsrec_manager_next(ROW))
3163
#define OVSREC_MANAGER_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
3164
        for ((ROW) = ovsrec_manager_table_first(TABLE); \
3165
             (ROW) ? ((NEXT) = ovsrec_manager_next(ROW), 1) : 0; \
3166
             (ROW) = (NEXT))
3167
#define OVSREC_MANAGER_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
3168
        for (const struct ovsrec_manager * ROW__next = ((ROW) = ovsrec_manager_table_first(TABLE), NULL); \
3169
             (ROW) ? (ROW__next = ovsrec_manager_next(ROW), 1) : (ROW__next = NULL, 0); \
3170
             (ROW) = ROW__next)
3171
#define OVSREC_MANAGER_TABLE_FOR_EACH_SAFE(...)                                        \
3172
        OVERLOAD_SAFE_MACRO(OVSREC_MANAGER_TABLE_FOR_EACH_SAFE_LONG,                   \
3173
                            OVSREC_MANAGER_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3174
3175
3176
const struct ovsrec_manager *ovsrec_manager_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
3177
const struct ovsrec_manager *ovsrec_manager_table_get_for_uuid(const struct ovsrec_manager_table *, const struct uuid *);
3178
const struct ovsrec_manager *ovsrec_manager_first(const struct ovsdb_idl *);
3179
const struct ovsrec_manager *ovsrec_manager_next(const struct ovsrec_manager *);
3180
#define OVSREC_MANAGER_FOR_EACH(ROW, IDL) \
3181
        for ((ROW) = ovsrec_manager_first(IDL); \
3182
             (ROW); \
3183
             (ROW) = ovsrec_manager_next(ROW))
3184
#define OVSREC_MANAGER_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
3185
        for ((ROW) = ovsrec_manager_first(IDL); \
3186
             (ROW) ? ((NEXT) = ovsrec_manager_next(ROW), 1) : 0; \
3187
             (ROW) = (NEXT))
3188
#define OVSREC_MANAGER_FOR_EACH_SAFE_SHORT(ROW, IDL) \
3189
        for (const struct ovsrec_manager * ROW__next = ((ROW) = ovsrec_manager_first(IDL), NULL); \
3190
             (ROW) ? (ROW__next = ovsrec_manager_next(ROW), 1) : (ROW__next = NULL, 0); \
3191
             (ROW) = ROW__next)
3192
#define OVSREC_MANAGER_FOR_EACH_SAFE(...)                                         \
3193
        OVERLOAD_SAFE_MACRO(OVSREC_MANAGER_FOR_EACH_SAFE_LONG,                    \
3194
                            OVSREC_MANAGER_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3195
3196
unsigned int ovsrec_manager_get_seqno(const struct ovsdb_idl *);
3197
unsigned int ovsrec_manager_row_get_seqno(const struct ovsrec_manager *row, enum ovsdb_idl_change change);
3198
const struct ovsrec_manager *ovsrec_manager_track_get_first(const struct ovsdb_idl *);
3199
const struct ovsrec_manager *ovsrec_manager_track_get_next(const struct ovsrec_manager *);
3200
#define OVSREC_MANAGER_FOR_EACH_TRACKED(ROW, IDL) \
3201
        for ((ROW) = ovsrec_manager_track_get_first(IDL); \
3202
             (ROW); \
3203
             (ROW) = ovsrec_manager_track_get_next(ROW))
3204
3205
const struct ovsrec_manager *ovsrec_manager_table_track_get_first(const struct ovsrec_manager_table *);
3206
#define OVSREC_MANAGER_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
3207
        for ((ROW) = ovsrec_manager_table_track_get_first(TABLE); \
3208
             (ROW); \
3209
             (ROW) = ovsrec_manager_track_get_next(ROW))
3210
3211
3212
/* Returns true if 'row' was inserted since the last change tracking reset.
3213
 *
3214
 * Note: This can only be used to test rows of tracked changes. This cannot be
3215
 * used to test if an uncommitted row that has been added locally is new or it
3216
 * may given unexpected results. */
3217
static inline bool ovsrec_manager_is_new(const struct ovsrec_manager *row)
3218
0
{
3219
0
    return ovsrec_manager_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
3220
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_manager_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_manager_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_manager_is_new
3221
3222
/* Returns true if 'row' was deleted since the last change tracking reset.
3223
 *
3224
 * Note: This can only be used to test rows of tracked changes. This cannot be
3225
 * used to test if an uncommitted row that has been added locally has been
3226
 * deleted or it may given unexpected results. */
3227
static inline bool ovsrec_manager_is_deleted(const struct ovsrec_manager *row)
3228
0
{
3229
0
    return ovsrec_manager_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
3230
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_manager_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_manager_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_manager_is_deleted
3231
3232
void ovsrec_manager_index_destroy_row(const struct ovsrec_manager *);
3233
3234
struct ovsrec_manager *ovsrec_manager_index_find(struct ovsdb_idl_index *, const struct ovsrec_manager *);
3235
3236
int ovsrec_manager_index_compare(
3237
    struct ovsdb_idl_index *, 
3238
    const struct ovsrec_manager *, 
3239
    const struct ovsrec_manager *);
3240
struct ovsdb_idl_cursor ovsrec_manager_cursor_first(struct ovsdb_idl_index *);
3241
struct ovsdb_idl_cursor ovsrec_manager_cursor_first_eq(
3242
    struct ovsdb_idl_index *, const struct ovsrec_manager *);
3243
struct ovsdb_idl_cursor ovsrec_manager_cursor_first_ge(
3244
    struct ovsdb_idl_index *, const struct ovsrec_manager *);
3245
3246
struct ovsrec_manager *ovsrec_manager_cursor_data(struct ovsdb_idl_cursor *);
3247
3248
#define OVSREC_MANAGER_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
3249
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_manager_cursor_first_ge(INDEX, FROM); \
3250
             (cursor__.position \
3251
              && ((ROW) = ovsrec_manager_cursor_data(&cursor__), \
3252
                  !(TO) || ovsrec_manager_index_compare(INDEX, ROW, TO) <= 0)); \
3253
             ovsdb_idl_cursor_next(&cursor__))
3254
#define OVSREC_MANAGER_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
3255
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_manager_cursor_first_eq(INDEX, KEY); \
3256
             (cursor__.position \
3257
              ? ((ROW) = ovsrec_manager_cursor_data(&cursor__), \
3258
                 ovsdb_idl_cursor_next_eq(&cursor__), \
3259
                 true) \
3260
              : false); \
3261
            )
3262
#define OVSREC_MANAGER_FOR_EACH_BYINDEX(ROW, INDEX) \
3263
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_manager_cursor_first(INDEX); \
3264
             (cursor__.position \
3265
              ? ((ROW) = ovsrec_manager_cursor_data(&cursor__), \
3266
                 ovsdb_idl_cursor_next(&cursor__), \
3267
                 true) \
3268
              : false); \
3269
            )
3270
3271
void ovsrec_manager_init(struct ovsrec_manager *);
3272
void ovsrec_manager_delete(const struct ovsrec_manager *);
3273
struct ovsrec_manager *ovsrec_manager_insert(struct ovsdb_idl_txn *);
3274
struct ovsrec_manager *ovsrec_manager_insert_persist_uuid(
3275
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
3276
3277
/* Returns true if the tracked column referenced by 'enum ovsrec_manager_column_id' of
3278
 * the row referenced by 'struct ovsrec_manager *' was updated since the last change
3279
 * tracking reset.
3280
 *
3281
 * Note: This can only be used to test rows of tracked changes. This cannot be
3282
 * used to test if an uncommitted row that has been added locally has been
3283
 * updated or it may given unexpected results. */
3284
bool ovsrec_manager_is_updated(const struct ovsrec_manager *, enum ovsrec_manager_column_id);
3285
3286
void ovsrec_manager_verify_connection_mode(const struct ovsrec_manager *);
3287
void ovsrec_manager_verify_external_ids(const struct ovsrec_manager *);
3288
void ovsrec_manager_verify_inactivity_probe(const struct ovsrec_manager *);
3289
void ovsrec_manager_verify_is_connected(const struct ovsrec_manager *);
3290
void ovsrec_manager_verify_max_backoff(const struct ovsrec_manager *);
3291
void ovsrec_manager_verify_other_config(const struct ovsrec_manager *);
3292
void ovsrec_manager_verify_status(const struct ovsrec_manager *);
3293
void ovsrec_manager_verify_target(const struct ovsrec_manager *);
3294
3295
const struct ovsdb_datum *ovsrec_manager_get_connection_mode(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type);
3296
const struct ovsdb_datum *ovsrec_manager_get_external_ids(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3297
const struct ovsdb_datum *ovsrec_manager_get_inactivity_probe(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type);
3298
const struct ovsdb_datum *ovsrec_manager_get_is_connected(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type);
3299
const struct ovsdb_datum *ovsrec_manager_get_max_backoff(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type);
3300
const struct ovsdb_datum *ovsrec_manager_get_other_config(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3301
const struct ovsdb_datum *ovsrec_manager_get_status(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3302
const struct ovsdb_datum *ovsrec_manager_get_target(const struct ovsrec_manager *, enum ovsdb_atomic_type key_type);
3303
3304
void ovsrec_manager_set_connection_mode(const struct ovsrec_manager *, const char *connection_mode);
3305
void ovsrec_manager_set_external_ids(const struct ovsrec_manager *, const struct smap *);
3306
void ovsrec_manager_set_inactivity_probe(const struct ovsrec_manager *, const int64_t *inactivity_probe, size_t n_inactivity_probe);
3307
void ovsrec_manager_set_is_connected(const struct ovsrec_manager *, bool is_connected);
3308
void ovsrec_manager_set_max_backoff(const struct ovsrec_manager *, const int64_t *max_backoff, size_t n_max_backoff);
3309
void ovsrec_manager_set_other_config(const struct ovsrec_manager *, const struct smap *);
3310
void ovsrec_manager_set_status(const struct ovsrec_manager *, const struct smap *);
3311
void ovsrec_manager_set_target(const struct ovsrec_manager *, const char *target);
3312
3313
void ovsrec_manager_update_connection_mode_addvalue(const struct ovsrec_manager *,  const char *);
3314
void ovsrec_manager_update_connection_mode_delvalue(const struct ovsrec_manager *,  const char *);
3315
void ovsrec_manager_add_clause_connection_mode(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *connection_mode);
3316
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3317
void ovsrec_manager_update_external_ids_setkey(const struct ovsrec_manager *,  const char *, const char *);
3318
void ovsrec_manager_update_external_ids_delkey(const struct ovsrec_manager *,  const char *);
3319
void ovsrec_manager_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3320
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3321
void ovsrec_manager_update_inactivity_probe_addvalue(const struct ovsrec_manager *,  int64_t );
3322
void ovsrec_manager_update_inactivity_probe_delvalue(const struct ovsrec_manager *,  int64_t );
3323
void ovsrec_manager_add_clause_inactivity_probe(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *inactivity_probe, size_t n_inactivity_probe);
3324
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3325
void ovsrec_manager_add_clause_is_connected(struct ovsdb_idl_condition *, enum ovsdb_function function, bool is_connected);
3326
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3327
void ovsrec_manager_update_max_backoff_addvalue(const struct ovsrec_manager *,  int64_t );
3328
void ovsrec_manager_update_max_backoff_delvalue(const struct ovsrec_manager *,  int64_t );
3329
void ovsrec_manager_add_clause_max_backoff(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *max_backoff, size_t n_max_backoff);
3330
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3331
void ovsrec_manager_update_other_config_setkey(const struct ovsrec_manager *,  const char *, const char *);
3332
void ovsrec_manager_update_other_config_delkey(const struct ovsrec_manager *,  const char *);
3333
void ovsrec_manager_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3334
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3335
void ovsrec_manager_update_status_setkey(const struct ovsrec_manager *,  const char *, const char *);
3336
void ovsrec_manager_update_status_delkey(const struct ovsrec_manager *,  const char *);
3337
void ovsrec_manager_add_clause_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3338
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3339
void ovsrec_manager_add_clause_target(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *target);
3340
unsigned int ovsrec_manager_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3341
3342
struct ovsrec_manager *ovsrec_manager_index_init_row(struct ovsdb_idl_index *);
3343
void ovsrec_manager_index_set_connection_mode(const struct ovsrec_manager *,
3344
const char *connection_mode);
3345
void ovsrec_manager_index_set_external_ids(const struct ovsrec_manager *,
3346
const struct smap *);
3347
void ovsrec_manager_index_set_inactivity_probe(const struct ovsrec_manager *,
3348
const int64_t *inactivity_probe, size_t n_inactivity_probe);
3349
void ovsrec_manager_index_set_is_connected(const struct ovsrec_manager *,
3350
bool is_connected);
3351
void ovsrec_manager_index_set_max_backoff(const struct ovsrec_manager *,
3352
const int64_t *max_backoff, size_t n_max_backoff);
3353
void ovsrec_manager_index_set_other_config(const struct ovsrec_manager *,
3354
const struct smap *);
3355
void ovsrec_manager_index_set_status(const struct ovsrec_manager *,
3356
const struct smap *);
3357
void ovsrec_manager_index_set_target(const struct ovsrec_manager *,
3358
const char *target);
3359

3360
/* Mirror table. */
3361
struct ovsrec_mirror {
3362
  struct ovsdb_idl_row header_;
3363
3364
  /* external_ids column. */
3365
  struct smap external_ids;
3366
3367
  /* name column. */
3368
  char *name; /* Always nonnull. */
3369
3370
  /* output_port column. */
3371
  struct ovsrec_port *output_port;
3372
3373
  /* output_vlan column. */
3374
  int64_t *output_vlan;
3375
  size_t n_output_vlan;
3376
3377
  /* select_all column. */
3378
  bool select_all;
3379
3380
  /* select_dst_port column. */
3381
  struct ovsrec_port **select_dst_port;
3382
  size_t n_select_dst_port;
3383
3384
  /* select_src_port column. */
3385
  struct ovsrec_port **select_src_port;
3386
  size_t n_select_src_port;
3387
3388
  /* select_vlan column. */
3389
  int64_t *select_vlan;
3390
  size_t n_select_vlan;
3391
3392
  /* snaplen column. */
3393
  int64_t *snaplen;
3394
  size_t n_snaplen;
3395
3396
  /* statistics column. */
3397
  char **key_statistics;
3398
  int64_t *value_statistics;
3399
  size_t n_statistics;
3400
};
3401
3402
enum ovsrec_mirror_column_id {
3403
    OVSREC_MIRROR_COL_EXTERNAL_IDS,
3404
    OVSREC_MIRROR_COL_NAME,
3405
    OVSREC_MIRROR_COL_OUTPUT_PORT,
3406
    OVSREC_MIRROR_COL_OUTPUT_VLAN,
3407
    OVSREC_MIRROR_COL_SELECT_ALL,
3408
    OVSREC_MIRROR_COL_SELECT_DST_PORT,
3409
    OVSREC_MIRROR_COL_SELECT_SRC_PORT,
3410
    OVSREC_MIRROR_COL_SELECT_VLAN,
3411
    OVSREC_MIRROR_COL_SNAPLEN,
3412
    OVSREC_MIRROR_COL_STATISTICS,
3413
    OVSREC_MIRROR_N_COLUMNS
3414
};
3415
3416
0
#define ovsrec_mirror_col_external_ids (ovsrec_mirror_columns[OVSREC_MIRROR_COL_EXTERNAL_IDS])
3417
0
#define ovsrec_mirror_col_name (ovsrec_mirror_columns[OVSREC_MIRROR_COL_NAME])
3418
0
#define ovsrec_mirror_col_output_port (ovsrec_mirror_columns[OVSREC_MIRROR_COL_OUTPUT_PORT])
3419
0
#define ovsrec_mirror_col_output_vlan (ovsrec_mirror_columns[OVSREC_MIRROR_COL_OUTPUT_VLAN])
3420
0
#define ovsrec_mirror_col_select_all (ovsrec_mirror_columns[OVSREC_MIRROR_COL_SELECT_ALL])
3421
0
#define ovsrec_mirror_col_select_dst_port (ovsrec_mirror_columns[OVSREC_MIRROR_COL_SELECT_DST_PORT])
3422
0
#define ovsrec_mirror_col_select_src_port (ovsrec_mirror_columns[OVSREC_MIRROR_COL_SELECT_SRC_PORT])
3423
0
#define ovsrec_mirror_col_select_vlan (ovsrec_mirror_columns[OVSREC_MIRROR_COL_SELECT_VLAN])
3424
0
#define ovsrec_mirror_col_snaplen (ovsrec_mirror_columns[OVSREC_MIRROR_COL_SNAPLEN])
3425
0
#define ovsrec_mirror_col_statistics (ovsrec_mirror_columns[OVSREC_MIRROR_COL_STATISTICS])
3426
3427
extern struct ovsdb_idl_column ovsrec_mirror_columns[OVSREC_MIRROR_N_COLUMNS];
3428
bool ovsrec_server_has_mirror_table_col_external_ids(const struct ovsdb_idl *); 
3429
bool ovsrec_server_has_mirror_table_col_name(const struct ovsdb_idl *); 
3430
bool ovsrec_server_has_mirror_table_col_output_port(const struct ovsdb_idl *); 
3431
bool ovsrec_server_has_mirror_table_col_output_vlan(const struct ovsdb_idl *); 
3432
bool ovsrec_server_has_mirror_table_col_select_all(const struct ovsdb_idl *); 
3433
bool ovsrec_server_has_mirror_table_col_select_dst_port(const struct ovsdb_idl *); 
3434
bool ovsrec_server_has_mirror_table_col_select_src_port(const struct ovsdb_idl *); 
3435
bool ovsrec_server_has_mirror_table_col_select_vlan(const struct ovsdb_idl *); 
3436
bool ovsrec_server_has_mirror_table_col_snaplen(const struct ovsdb_idl *); 
3437
bool ovsrec_server_has_mirror_table_col_statistics(const struct ovsdb_idl *); 
3438
3439
bool ovsrec_server_has_mirror_table(const struct ovsdb_idl *);
3440
const struct ovsrec_mirror_table *ovsrec_mirror_table_get(const struct ovsdb_idl *);
3441
const struct ovsrec_mirror *ovsrec_mirror_table_first(const struct ovsrec_mirror_table *);
3442
3443
#define OVSREC_MIRROR_TABLE_FOR_EACH(ROW, TABLE) \
3444
        for ((ROW) = ovsrec_mirror_table_first(TABLE); \
3445
             (ROW); \
3446
             (ROW) = ovsrec_mirror_next(ROW))
3447
#define OVSREC_MIRROR_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
3448
        for ((ROW) = ovsrec_mirror_table_first(TABLE); \
3449
             (ROW) ? ((NEXT) = ovsrec_mirror_next(ROW), 1) : 0; \
3450
             (ROW) = (NEXT))
3451
#define OVSREC_MIRROR_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
3452
        for (const struct ovsrec_mirror * ROW__next = ((ROW) = ovsrec_mirror_table_first(TABLE), NULL); \
3453
             (ROW) ? (ROW__next = ovsrec_mirror_next(ROW), 1) : (ROW__next = NULL, 0); \
3454
             (ROW) = ROW__next)
3455
#define OVSREC_MIRROR_TABLE_FOR_EACH_SAFE(...)                                        \
3456
        OVERLOAD_SAFE_MACRO(OVSREC_MIRROR_TABLE_FOR_EACH_SAFE_LONG,                   \
3457
                            OVSREC_MIRROR_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3458
3459
3460
const struct ovsrec_mirror *ovsrec_mirror_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
3461
const struct ovsrec_mirror *ovsrec_mirror_table_get_for_uuid(const struct ovsrec_mirror_table *, const struct uuid *);
3462
const struct ovsrec_mirror *ovsrec_mirror_first(const struct ovsdb_idl *);
3463
const struct ovsrec_mirror *ovsrec_mirror_next(const struct ovsrec_mirror *);
3464
#define OVSREC_MIRROR_FOR_EACH(ROW, IDL) \
3465
        for ((ROW) = ovsrec_mirror_first(IDL); \
3466
             (ROW); \
3467
             (ROW) = ovsrec_mirror_next(ROW))
3468
#define OVSREC_MIRROR_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
3469
        for ((ROW) = ovsrec_mirror_first(IDL); \
3470
             (ROW) ? ((NEXT) = ovsrec_mirror_next(ROW), 1) : 0; \
3471
             (ROW) = (NEXT))
3472
#define OVSREC_MIRROR_FOR_EACH_SAFE_SHORT(ROW, IDL) \
3473
        for (const struct ovsrec_mirror * ROW__next = ((ROW) = ovsrec_mirror_first(IDL), NULL); \
3474
             (ROW) ? (ROW__next = ovsrec_mirror_next(ROW), 1) : (ROW__next = NULL, 0); \
3475
             (ROW) = ROW__next)
3476
#define OVSREC_MIRROR_FOR_EACH_SAFE(...)                                         \
3477
        OVERLOAD_SAFE_MACRO(OVSREC_MIRROR_FOR_EACH_SAFE_LONG,                    \
3478
                            OVSREC_MIRROR_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3479
3480
unsigned int ovsrec_mirror_get_seqno(const struct ovsdb_idl *);
3481
unsigned int ovsrec_mirror_row_get_seqno(const struct ovsrec_mirror *row, enum ovsdb_idl_change change);
3482
const struct ovsrec_mirror *ovsrec_mirror_track_get_first(const struct ovsdb_idl *);
3483
const struct ovsrec_mirror *ovsrec_mirror_track_get_next(const struct ovsrec_mirror *);
3484
#define OVSREC_MIRROR_FOR_EACH_TRACKED(ROW, IDL) \
3485
        for ((ROW) = ovsrec_mirror_track_get_first(IDL); \
3486
             (ROW); \
3487
             (ROW) = ovsrec_mirror_track_get_next(ROW))
3488
3489
const struct ovsrec_mirror *ovsrec_mirror_table_track_get_first(const struct ovsrec_mirror_table *);
3490
#define OVSREC_MIRROR_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
3491
        for ((ROW) = ovsrec_mirror_table_track_get_first(TABLE); \
3492
             (ROW); \
3493
             (ROW) = ovsrec_mirror_track_get_next(ROW))
3494
3495
3496
/* Returns true if 'row' was inserted since the last change tracking reset.
3497
 *
3498
 * Note: This can only be used to test rows of tracked changes. This cannot be
3499
 * used to test if an uncommitted row that has been added locally is new or it
3500
 * may given unexpected results. */
3501
static inline bool ovsrec_mirror_is_new(const struct ovsrec_mirror *row)
3502
0
{
3503
0
    return ovsrec_mirror_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
3504
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_mirror_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_mirror_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_mirror_is_new
3505
3506
/* Returns true if 'row' was deleted since the last change tracking reset.
3507
 *
3508
 * Note: This can only be used to test rows of tracked changes. This cannot be
3509
 * used to test if an uncommitted row that has been added locally has been
3510
 * deleted or it may given unexpected results. */
3511
static inline bool ovsrec_mirror_is_deleted(const struct ovsrec_mirror *row)
3512
0
{
3513
0
    return ovsrec_mirror_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
3514
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_mirror_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_mirror_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_mirror_is_deleted
3515
3516
void ovsrec_mirror_index_destroy_row(const struct ovsrec_mirror *);
3517
3518
struct ovsrec_mirror *ovsrec_mirror_index_find(struct ovsdb_idl_index *, const struct ovsrec_mirror *);
3519
3520
int ovsrec_mirror_index_compare(
3521
    struct ovsdb_idl_index *, 
3522
    const struct ovsrec_mirror *, 
3523
    const struct ovsrec_mirror *);
3524
struct ovsdb_idl_cursor ovsrec_mirror_cursor_first(struct ovsdb_idl_index *);
3525
struct ovsdb_idl_cursor ovsrec_mirror_cursor_first_eq(
3526
    struct ovsdb_idl_index *, const struct ovsrec_mirror *);
3527
struct ovsdb_idl_cursor ovsrec_mirror_cursor_first_ge(
3528
    struct ovsdb_idl_index *, const struct ovsrec_mirror *);
3529
3530
struct ovsrec_mirror *ovsrec_mirror_cursor_data(struct ovsdb_idl_cursor *);
3531
3532
#define OVSREC_MIRROR_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
3533
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_mirror_cursor_first_ge(INDEX, FROM); \
3534
             (cursor__.position \
3535
              && ((ROW) = ovsrec_mirror_cursor_data(&cursor__), \
3536
                  !(TO) || ovsrec_mirror_index_compare(INDEX, ROW, TO) <= 0)); \
3537
             ovsdb_idl_cursor_next(&cursor__))
3538
#define OVSREC_MIRROR_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
3539
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_mirror_cursor_first_eq(INDEX, KEY); \
3540
             (cursor__.position \
3541
              ? ((ROW) = ovsrec_mirror_cursor_data(&cursor__), \
3542
                 ovsdb_idl_cursor_next_eq(&cursor__), \
3543
                 true) \
3544
              : false); \
3545
            )
3546
#define OVSREC_MIRROR_FOR_EACH_BYINDEX(ROW, INDEX) \
3547
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_mirror_cursor_first(INDEX); \
3548
             (cursor__.position \
3549
              ? ((ROW) = ovsrec_mirror_cursor_data(&cursor__), \
3550
                 ovsdb_idl_cursor_next(&cursor__), \
3551
                 true) \
3552
              : false); \
3553
            )
3554
3555
void ovsrec_mirror_init(struct ovsrec_mirror *);
3556
void ovsrec_mirror_delete(const struct ovsrec_mirror *);
3557
struct ovsrec_mirror *ovsrec_mirror_insert(struct ovsdb_idl_txn *);
3558
struct ovsrec_mirror *ovsrec_mirror_insert_persist_uuid(
3559
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
3560
3561
/* Returns true if the tracked column referenced by 'enum ovsrec_mirror_column_id' of
3562
 * the row referenced by 'struct ovsrec_mirror *' was updated since the last change
3563
 * tracking reset.
3564
 *
3565
 * Note: This can only be used to test rows of tracked changes. This cannot be
3566
 * used to test if an uncommitted row that has been added locally has been
3567
 * updated or it may given unexpected results. */
3568
bool ovsrec_mirror_is_updated(const struct ovsrec_mirror *, enum ovsrec_mirror_column_id);
3569
3570
void ovsrec_mirror_verify_external_ids(const struct ovsrec_mirror *);
3571
void ovsrec_mirror_verify_name(const struct ovsrec_mirror *);
3572
void ovsrec_mirror_verify_output_port(const struct ovsrec_mirror *);
3573
void ovsrec_mirror_verify_output_vlan(const struct ovsrec_mirror *);
3574
void ovsrec_mirror_verify_select_all(const struct ovsrec_mirror *);
3575
void ovsrec_mirror_verify_select_dst_port(const struct ovsrec_mirror *);
3576
void ovsrec_mirror_verify_select_src_port(const struct ovsrec_mirror *);
3577
void ovsrec_mirror_verify_select_vlan(const struct ovsrec_mirror *);
3578
void ovsrec_mirror_verify_snaplen(const struct ovsrec_mirror *);
3579
void ovsrec_mirror_verify_statistics(const struct ovsrec_mirror *);
3580
3581
const struct ovsdb_datum *ovsrec_mirror_get_external_ids(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3582
const struct ovsdb_datum *ovsrec_mirror_get_name(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3583
const struct ovsdb_datum *ovsrec_mirror_get_output_port(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3584
const struct ovsdb_datum *ovsrec_mirror_get_output_vlan(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3585
const struct ovsdb_datum *ovsrec_mirror_get_select_all(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3586
const struct ovsdb_datum *ovsrec_mirror_get_select_dst_port(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3587
const struct ovsdb_datum *ovsrec_mirror_get_select_src_port(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3588
const struct ovsdb_datum *ovsrec_mirror_get_select_vlan(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3589
const struct ovsdb_datum *ovsrec_mirror_get_snaplen(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type);
3590
const struct ovsdb_datum *ovsrec_mirror_get_statistics(const struct ovsrec_mirror *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3591
3592
void ovsrec_mirror_set_external_ids(const struct ovsrec_mirror *, const struct smap *);
3593
void ovsrec_mirror_set_name(const struct ovsrec_mirror *, const char *name);
3594
void ovsrec_mirror_set_output_port(const struct ovsrec_mirror *, const struct ovsrec_port *output_port);
3595
void ovsrec_mirror_set_output_vlan(const struct ovsrec_mirror *, const int64_t *output_vlan, size_t n_output_vlan);
3596
void ovsrec_mirror_set_select_all(const struct ovsrec_mirror *, bool select_all);
3597
void ovsrec_mirror_set_select_dst_port(const struct ovsrec_mirror *, struct ovsrec_port **select_dst_port, size_t n_select_dst_port);
3598
void ovsrec_mirror_set_select_src_port(const struct ovsrec_mirror *, struct ovsrec_port **select_src_port, size_t n_select_src_port);
3599
void ovsrec_mirror_set_select_vlan(const struct ovsrec_mirror *, const int64_t *select_vlan, size_t n_select_vlan);
3600
void ovsrec_mirror_set_snaplen(const struct ovsrec_mirror *, const int64_t *snaplen, size_t n_snaplen);
3601
void ovsrec_mirror_set_statistics(const struct ovsrec_mirror *, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
3602
3603
void ovsrec_mirror_update_external_ids_setkey(const struct ovsrec_mirror *,  const char *, const char *);
3604
void ovsrec_mirror_update_external_ids_delkey(const struct ovsrec_mirror *,  const char *);
3605
void ovsrec_mirror_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3606
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3607
void ovsrec_mirror_add_clause_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *name);
3608
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3609
void ovsrec_mirror_update_output_port_addvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3610
void ovsrec_mirror_update_output_port_delvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3611
void ovsrec_mirror_add_clause_output_port(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *output_port);
3612
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3613
void ovsrec_mirror_update_output_vlan_addvalue(const struct ovsrec_mirror *,  int64_t );
3614
void ovsrec_mirror_update_output_vlan_delvalue(const struct ovsrec_mirror *,  int64_t );
3615
void ovsrec_mirror_add_clause_output_vlan(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *output_vlan, size_t n_output_vlan);
3616
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3617
void ovsrec_mirror_add_clause_select_all(struct ovsdb_idl_condition *, enum ovsdb_function function, bool select_all);
3618
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3619
void ovsrec_mirror_update_select_dst_port_addvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3620
void ovsrec_mirror_update_select_dst_port_delvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3621
void ovsrec_mirror_add_clause_select_dst_port(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **select_dst_port, size_t n_select_dst_port);
3622
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3623
void ovsrec_mirror_update_select_src_port_addvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3624
void ovsrec_mirror_update_select_src_port_delvalue(const struct ovsrec_mirror *,  const struct ovsrec_port *);
3625
void ovsrec_mirror_add_clause_select_src_port(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **select_src_port, size_t n_select_src_port);
3626
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3627
void ovsrec_mirror_update_select_vlan_addvalue(const struct ovsrec_mirror *,  int64_t );
3628
void ovsrec_mirror_update_select_vlan_delvalue(const struct ovsrec_mirror *,  int64_t );
3629
void ovsrec_mirror_add_clause_select_vlan(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *select_vlan, size_t n_select_vlan);
3630
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3631
void ovsrec_mirror_update_snaplen_addvalue(const struct ovsrec_mirror *,  int64_t );
3632
void ovsrec_mirror_update_snaplen_delvalue(const struct ovsrec_mirror *,  int64_t );
3633
void ovsrec_mirror_add_clause_snaplen(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *snaplen, size_t n_snaplen);
3634
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3635
void ovsrec_mirror_update_statistics_setkey(const struct ovsrec_mirror *,  const char *, int64_t );
3636
void ovsrec_mirror_update_statistics_delkey(const struct ovsrec_mirror *,  const char *);
3637
void ovsrec_mirror_add_clause_statistics(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
3638
unsigned int ovsrec_mirror_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3639
3640
struct ovsrec_mirror *ovsrec_mirror_index_init_row(struct ovsdb_idl_index *);
3641
void ovsrec_mirror_index_set_external_ids(const struct ovsrec_mirror *,
3642
const struct smap *);
3643
void ovsrec_mirror_index_set_name(const struct ovsrec_mirror *,
3644
const char *name);
3645
void ovsrec_mirror_index_set_output_port(const struct ovsrec_mirror *,
3646
const struct ovsrec_port *output_port);
3647
void ovsrec_mirror_index_set_output_vlan(const struct ovsrec_mirror *,
3648
const int64_t *output_vlan, size_t n_output_vlan);
3649
void ovsrec_mirror_index_set_select_all(const struct ovsrec_mirror *,
3650
bool select_all);
3651
void ovsrec_mirror_index_set_select_dst_port(const struct ovsrec_mirror *,
3652
struct ovsrec_port **select_dst_port, size_t n_select_dst_port);
3653
void ovsrec_mirror_index_set_select_src_port(const struct ovsrec_mirror *,
3654
struct ovsrec_port **select_src_port, size_t n_select_src_port);
3655
void ovsrec_mirror_index_set_select_vlan(const struct ovsrec_mirror *,
3656
const int64_t *select_vlan, size_t n_select_vlan);
3657
void ovsrec_mirror_index_set_snaplen(const struct ovsrec_mirror *,
3658
const int64_t *snaplen, size_t n_snaplen);
3659
void ovsrec_mirror_index_set_statistics(const struct ovsrec_mirror *,
3660
const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
3661

3662
/* NetFlow table. */
3663
struct ovsrec_netflow {
3664
  struct ovsdb_idl_row header_;
3665
3666
  /* active_timeout column. */
3667
  int64_t active_timeout;
3668
3669
  /* add_id_to_interface column. */
3670
  bool add_id_to_interface;
3671
3672
  /* engine_id column. */
3673
  int64_t *engine_id;
3674
  size_t n_engine_id;
3675
3676
  /* engine_type column. */
3677
  int64_t *engine_type;
3678
  size_t n_engine_type;
3679
3680
  /* external_ids column. */
3681
  struct smap external_ids;
3682
3683
  /* targets column. */
3684
  char **targets;
3685
  size_t n_targets;
3686
};
3687
3688
enum ovsrec_netflow_column_id {
3689
    OVSREC_NETFLOW_COL_ACTIVE_TIMEOUT,
3690
    OVSREC_NETFLOW_COL_ADD_ID_TO_INTERFACE,
3691
    OVSREC_NETFLOW_COL_ENGINE_ID,
3692
    OVSREC_NETFLOW_COL_ENGINE_TYPE,
3693
    OVSREC_NETFLOW_COL_EXTERNAL_IDS,
3694
    OVSREC_NETFLOW_COL_TARGETS,
3695
    OVSREC_NETFLOW_N_COLUMNS
3696
};
3697
3698
0
#define ovsrec_netflow_col_active_timeout (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_ACTIVE_TIMEOUT])
3699
0
#define ovsrec_netflow_col_add_id_to_interface (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_ADD_ID_TO_INTERFACE])
3700
0
#define ovsrec_netflow_col_engine_id (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_ENGINE_ID])
3701
0
#define ovsrec_netflow_col_engine_type (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_ENGINE_TYPE])
3702
0
#define ovsrec_netflow_col_external_ids (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_EXTERNAL_IDS])
3703
0
#define ovsrec_netflow_col_targets (ovsrec_netflow_columns[OVSREC_NETFLOW_COL_TARGETS])
3704
3705
extern struct ovsdb_idl_column ovsrec_netflow_columns[OVSREC_NETFLOW_N_COLUMNS];
3706
bool ovsrec_server_has_netflow_table_col_active_timeout(const struct ovsdb_idl *); 
3707
bool ovsrec_server_has_netflow_table_col_add_id_to_interface(const struct ovsdb_idl *); 
3708
bool ovsrec_server_has_netflow_table_col_engine_id(const struct ovsdb_idl *); 
3709
bool ovsrec_server_has_netflow_table_col_engine_type(const struct ovsdb_idl *); 
3710
bool ovsrec_server_has_netflow_table_col_external_ids(const struct ovsdb_idl *); 
3711
bool ovsrec_server_has_netflow_table_col_targets(const struct ovsdb_idl *); 
3712
3713
bool ovsrec_server_has_netflow_table(const struct ovsdb_idl *);
3714
const struct ovsrec_netflow_table *ovsrec_netflow_table_get(const struct ovsdb_idl *);
3715
const struct ovsrec_netflow *ovsrec_netflow_table_first(const struct ovsrec_netflow_table *);
3716
3717
#define OVSREC_NETFLOW_TABLE_FOR_EACH(ROW, TABLE) \
3718
        for ((ROW) = ovsrec_netflow_table_first(TABLE); \
3719
             (ROW); \
3720
             (ROW) = ovsrec_netflow_next(ROW))
3721
#define OVSREC_NETFLOW_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
3722
        for ((ROW) = ovsrec_netflow_table_first(TABLE); \
3723
             (ROW) ? ((NEXT) = ovsrec_netflow_next(ROW), 1) : 0; \
3724
             (ROW) = (NEXT))
3725
#define OVSREC_NETFLOW_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
3726
        for (const struct ovsrec_netflow * ROW__next = ((ROW) = ovsrec_netflow_table_first(TABLE), NULL); \
3727
             (ROW) ? (ROW__next = ovsrec_netflow_next(ROW), 1) : (ROW__next = NULL, 0); \
3728
             (ROW) = ROW__next)
3729
#define OVSREC_NETFLOW_TABLE_FOR_EACH_SAFE(...)                                        \
3730
        OVERLOAD_SAFE_MACRO(OVSREC_NETFLOW_TABLE_FOR_EACH_SAFE_LONG,                   \
3731
                            OVSREC_NETFLOW_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3732
3733
3734
const struct ovsrec_netflow *ovsrec_netflow_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
3735
const struct ovsrec_netflow *ovsrec_netflow_table_get_for_uuid(const struct ovsrec_netflow_table *, const struct uuid *);
3736
const struct ovsrec_netflow *ovsrec_netflow_first(const struct ovsdb_idl *);
3737
const struct ovsrec_netflow *ovsrec_netflow_next(const struct ovsrec_netflow *);
3738
#define OVSREC_NETFLOW_FOR_EACH(ROW, IDL) \
3739
        for ((ROW) = ovsrec_netflow_first(IDL); \
3740
             (ROW); \
3741
             (ROW) = ovsrec_netflow_next(ROW))
3742
#define OVSREC_NETFLOW_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
3743
        for ((ROW) = ovsrec_netflow_first(IDL); \
3744
             (ROW) ? ((NEXT) = ovsrec_netflow_next(ROW), 1) : 0; \
3745
             (ROW) = (NEXT))
3746
#define OVSREC_NETFLOW_FOR_EACH_SAFE_SHORT(ROW, IDL) \
3747
        for (const struct ovsrec_netflow * ROW__next = ((ROW) = ovsrec_netflow_first(IDL), NULL); \
3748
             (ROW) ? (ROW__next = ovsrec_netflow_next(ROW), 1) : (ROW__next = NULL, 0); \
3749
             (ROW) = ROW__next)
3750
#define OVSREC_NETFLOW_FOR_EACH_SAFE(...)                                         \
3751
        OVERLOAD_SAFE_MACRO(OVSREC_NETFLOW_FOR_EACH_SAFE_LONG,                    \
3752
                            OVSREC_NETFLOW_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
3753
3754
unsigned int ovsrec_netflow_get_seqno(const struct ovsdb_idl *);
3755
unsigned int ovsrec_netflow_row_get_seqno(const struct ovsrec_netflow *row, enum ovsdb_idl_change change);
3756
const struct ovsrec_netflow *ovsrec_netflow_track_get_first(const struct ovsdb_idl *);
3757
const struct ovsrec_netflow *ovsrec_netflow_track_get_next(const struct ovsrec_netflow *);
3758
#define OVSREC_NETFLOW_FOR_EACH_TRACKED(ROW, IDL) \
3759
        for ((ROW) = ovsrec_netflow_track_get_first(IDL); \
3760
             (ROW); \
3761
             (ROW) = ovsrec_netflow_track_get_next(ROW))
3762
3763
const struct ovsrec_netflow *ovsrec_netflow_table_track_get_first(const struct ovsrec_netflow_table *);
3764
#define OVSREC_NETFLOW_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
3765
        for ((ROW) = ovsrec_netflow_table_track_get_first(TABLE); \
3766
             (ROW); \
3767
             (ROW) = ovsrec_netflow_track_get_next(ROW))
3768
3769
3770
/* Returns true if 'row' was inserted since the last change tracking reset.
3771
 *
3772
 * Note: This can only be used to test rows of tracked changes. This cannot be
3773
 * used to test if an uncommitted row that has been added locally is new or it
3774
 * may given unexpected results. */
3775
static inline bool ovsrec_netflow_is_new(const struct ovsrec_netflow *row)
3776
0
{
3777
0
    return ovsrec_netflow_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
3778
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_netflow_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_netflow_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_netflow_is_new
3779
3780
/* Returns true if 'row' was deleted since the last change tracking reset.
3781
 *
3782
 * Note: This can only be used to test rows of tracked changes. This cannot be
3783
 * used to test if an uncommitted row that has been added locally has been
3784
 * deleted or it may given unexpected results. */
3785
static inline bool ovsrec_netflow_is_deleted(const struct ovsrec_netflow *row)
3786
0
{
3787
0
    return ovsrec_netflow_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
3788
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_netflow_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_netflow_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_netflow_is_deleted
3789
3790
void ovsrec_netflow_index_destroy_row(const struct ovsrec_netflow *);
3791
3792
struct ovsrec_netflow *ovsrec_netflow_index_find(struct ovsdb_idl_index *, const struct ovsrec_netflow *);
3793
3794
int ovsrec_netflow_index_compare(
3795
    struct ovsdb_idl_index *, 
3796
    const struct ovsrec_netflow *, 
3797
    const struct ovsrec_netflow *);
3798
struct ovsdb_idl_cursor ovsrec_netflow_cursor_first(struct ovsdb_idl_index *);
3799
struct ovsdb_idl_cursor ovsrec_netflow_cursor_first_eq(
3800
    struct ovsdb_idl_index *, const struct ovsrec_netflow *);
3801
struct ovsdb_idl_cursor ovsrec_netflow_cursor_first_ge(
3802
    struct ovsdb_idl_index *, const struct ovsrec_netflow *);
3803
3804
struct ovsrec_netflow *ovsrec_netflow_cursor_data(struct ovsdb_idl_cursor *);
3805
3806
#define OVSREC_NETFLOW_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
3807
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_netflow_cursor_first_ge(INDEX, FROM); \
3808
             (cursor__.position \
3809
              && ((ROW) = ovsrec_netflow_cursor_data(&cursor__), \
3810
                  !(TO) || ovsrec_netflow_index_compare(INDEX, ROW, TO) <= 0)); \
3811
             ovsdb_idl_cursor_next(&cursor__))
3812
#define OVSREC_NETFLOW_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
3813
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_netflow_cursor_first_eq(INDEX, KEY); \
3814
             (cursor__.position \
3815
              ? ((ROW) = ovsrec_netflow_cursor_data(&cursor__), \
3816
                 ovsdb_idl_cursor_next_eq(&cursor__), \
3817
                 true) \
3818
              : false); \
3819
            )
3820
#define OVSREC_NETFLOW_FOR_EACH_BYINDEX(ROW, INDEX) \
3821
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_netflow_cursor_first(INDEX); \
3822
             (cursor__.position \
3823
              ? ((ROW) = ovsrec_netflow_cursor_data(&cursor__), \
3824
                 ovsdb_idl_cursor_next(&cursor__), \
3825
                 true) \
3826
              : false); \
3827
            )
3828
3829
void ovsrec_netflow_init(struct ovsrec_netflow *);
3830
void ovsrec_netflow_delete(const struct ovsrec_netflow *);
3831
struct ovsrec_netflow *ovsrec_netflow_insert(struct ovsdb_idl_txn *);
3832
struct ovsrec_netflow *ovsrec_netflow_insert_persist_uuid(
3833
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
3834
3835
/* Returns true if the tracked column referenced by 'enum ovsrec_netflow_column_id' of
3836
 * the row referenced by 'struct ovsrec_netflow *' was updated since the last change
3837
 * tracking reset.
3838
 *
3839
 * Note: This can only be used to test rows of tracked changes. This cannot be
3840
 * used to test if an uncommitted row that has been added locally has been
3841
 * updated or it may given unexpected results. */
3842
bool ovsrec_netflow_is_updated(const struct ovsrec_netflow *, enum ovsrec_netflow_column_id);
3843
3844
void ovsrec_netflow_verify_active_timeout(const struct ovsrec_netflow *);
3845
void ovsrec_netflow_verify_add_id_to_interface(const struct ovsrec_netflow *);
3846
void ovsrec_netflow_verify_engine_id(const struct ovsrec_netflow *);
3847
void ovsrec_netflow_verify_engine_type(const struct ovsrec_netflow *);
3848
void ovsrec_netflow_verify_external_ids(const struct ovsrec_netflow *);
3849
void ovsrec_netflow_verify_targets(const struct ovsrec_netflow *);
3850
3851
const struct ovsdb_datum *ovsrec_netflow_get_active_timeout(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type);
3852
const struct ovsdb_datum *ovsrec_netflow_get_add_id_to_interface(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type);
3853
const struct ovsdb_datum *ovsrec_netflow_get_engine_id(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type);
3854
const struct ovsdb_datum *ovsrec_netflow_get_engine_type(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type);
3855
const struct ovsdb_datum *ovsrec_netflow_get_external_ids(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
3856
const struct ovsdb_datum *ovsrec_netflow_get_targets(const struct ovsrec_netflow *, enum ovsdb_atomic_type key_type);
3857
3858
void ovsrec_netflow_set_active_timeout(const struct ovsrec_netflow *, int64_t active_timeout);
3859
void ovsrec_netflow_set_add_id_to_interface(const struct ovsrec_netflow *, bool add_id_to_interface);
3860
void ovsrec_netflow_set_engine_id(const struct ovsrec_netflow *, const int64_t *engine_id, size_t n_engine_id);
3861
void ovsrec_netflow_set_engine_type(const struct ovsrec_netflow *, const int64_t *engine_type, size_t n_engine_type);
3862
void ovsrec_netflow_set_external_ids(const struct ovsrec_netflow *, const struct smap *);
3863
void ovsrec_netflow_set_targets(const struct ovsrec_netflow *, const char **targets, size_t n_targets);
3864
3865
void ovsrec_netflow_add_clause_active_timeout(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t active_timeout);
3866
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3867
void ovsrec_netflow_add_clause_add_id_to_interface(struct ovsdb_idl_condition *, enum ovsdb_function function, bool add_id_to_interface);
3868
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3869
void ovsrec_netflow_update_engine_id_addvalue(const struct ovsrec_netflow *,  int64_t );
3870
void ovsrec_netflow_update_engine_id_delvalue(const struct ovsrec_netflow *,  int64_t );
3871
void ovsrec_netflow_add_clause_engine_id(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *engine_id, size_t n_engine_id);
3872
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3873
void ovsrec_netflow_update_engine_type_addvalue(const struct ovsrec_netflow *,  int64_t );
3874
void ovsrec_netflow_update_engine_type_delvalue(const struct ovsrec_netflow *,  int64_t );
3875
void ovsrec_netflow_add_clause_engine_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *engine_type, size_t n_engine_type);
3876
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3877
void ovsrec_netflow_update_external_ids_setkey(const struct ovsrec_netflow *,  const char *, const char *);
3878
void ovsrec_netflow_update_external_ids_delkey(const struct ovsrec_netflow *,  const char *);
3879
void ovsrec_netflow_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
3880
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3881
void ovsrec_netflow_update_targets_addvalue(const struct ovsrec_netflow *,  const char *);
3882
void ovsrec_netflow_update_targets_delvalue(const struct ovsrec_netflow *,  const char *);
3883
void ovsrec_netflow_add_clause_targets(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **targets, size_t n_targets);
3884
unsigned int ovsrec_netflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
3885
3886
struct ovsrec_netflow *ovsrec_netflow_index_init_row(struct ovsdb_idl_index *);
3887
void ovsrec_netflow_index_set_active_timeout(const struct ovsrec_netflow *,
3888
int64_t active_timeout);
3889
void ovsrec_netflow_index_set_add_id_to_interface(const struct ovsrec_netflow *,
3890
bool add_id_to_interface);
3891
void ovsrec_netflow_index_set_engine_id(const struct ovsrec_netflow *,
3892
const int64_t *engine_id, size_t n_engine_id);
3893
void ovsrec_netflow_index_set_engine_type(const struct ovsrec_netflow *,
3894
const int64_t *engine_type, size_t n_engine_type);
3895
void ovsrec_netflow_index_set_external_ids(const struct ovsrec_netflow *,
3896
const struct smap *);
3897
void ovsrec_netflow_index_set_targets(const struct ovsrec_netflow *,
3898
const char **targets, size_t n_targets);
3899

3900
/* Open_vSwitch table. */
3901
struct ovsrec_open_vswitch {
3902
  struct ovsdb_idl_row header_;
3903
3904
  /* bridges column. */
3905
  struct ovsrec_bridge **bridges;
3906
  size_t n_bridges;
3907
3908
  /* cur_cfg column. */
3909
  int64_t cur_cfg;
3910
3911
  /* datapath_types column. */
3912
  char **datapath_types;
3913
  size_t n_datapath_types;
3914
3915
  /* datapaths column. */
3916
  char **key_datapaths;
3917
  struct ovsrec_datapath **value_datapaths;
3918
  size_t n_datapaths;
3919
3920
  /* db_version column. */
3921
  char *db_version;
3922
3923
  /* dpdk_initialized column. */
3924
  bool dpdk_initialized;
3925
3926
  /* dpdk_version column. */
3927
  char *dpdk_version;
3928
3929
  /* external_ids column. */
3930
  struct smap external_ids;
3931
3932
  /* iface_types column. */
3933
  char **iface_types;
3934
  size_t n_iface_types;
3935
3936
  /* manager_options column. */
3937
  struct ovsrec_manager **manager_options;
3938
  size_t n_manager_options;
3939
3940
  /* next_cfg column. */
3941
  int64_t next_cfg;
3942
3943
  /* other_config column. */
3944
  struct smap other_config;
3945
3946
  /* ovs_version column. */
3947
  char *ovs_version;
3948
3949
  /* ssl column. */
3950
  struct ovsrec_ssl *ssl;
3951
3952
  /* statistics column. */
3953
  struct smap statistics;
3954
3955
  /* system_type column. */
3956
  char *system_type;
3957
3958
  /* system_version column. */
3959
  char *system_version;
3960
};
3961
3962
enum ovsrec_open_vswitch_column_id {
3963
    OVSREC_OPEN_VSWITCH_COL_BRIDGES,
3964
    OVSREC_OPEN_VSWITCH_COL_CUR_CFG,
3965
    OVSREC_OPEN_VSWITCH_COL_DATAPATH_TYPES,
3966
    OVSREC_OPEN_VSWITCH_COL_DATAPATHS,
3967
    OVSREC_OPEN_VSWITCH_COL_DB_VERSION,
3968
    OVSREC_OPEN_VSWITCH_COL_DPDK_INITIALIZED,
3969
    OVSREC_OPEN_VSWITCH_COL_DPDK_VERSION,
3970
    OVSREC_OPEN_VSWITCH_COL_EXTERNAL_IDS,
3971
    OVSREC_OPEN_VSWITCH_COL_IFACE_TYPES,
3972
    OVSREC_OPEN_VSWITCH_COL_MANAGER_OPTIONS,
3973
    OVSREC_OPEN_VSWITCH_COL_NEXT_CFG,
3974
    OVSREC_OPEN_VSWITCH_COL_OTHER_CONFIG,
3975
    OVSREC_OPEN_VSWITCH_COL_OVS_VERSION,
3976
    OVSREC_OPEN_VSWITCH_COL_SSL,
3977
    OVSREC_OPEN_VSWITCH_COL_STATISTICS,
3978
    OVSREC_OPEN_VSWITCH_COL_SYSTEM_TYPE,
3979
    OVSREC_OPEN_VSWITCH_COL_SYSTEM_VERSION,
3980
    OVSREC_OPEN_VSWITCH_N_COLUMNS
3981
};
3982
3983
0
#define ovsrec_open_vswitch_col_bridges (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_BRIDGES])
3984
0
#define ovsrec_open_vswitch_col_cur_cfg (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_CUR_CFG])
3985
0
#define ovsrec_open_vswitch_col_datapath_types (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_DATAPATH_TYPES])
3986
0
#define ovsrec_open_vswitch_col_datapaths (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_DATAPATHS])
3987
0
#define ovsrec_open_vswitch_col_db_version (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_DB_VERSION])
3988
0
#define ovsrec_open_vswitch_col_dpdk_initialized (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_DPDK_INITIALIZED])
3989
0
#define ovsrec_open_vswitch_col_dpdk_version (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_DPDK_VERSION])
3990
0
#define ovsrec_open_vswitch_col_external_ids (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_EXTERNAL_IDS])
3991
0
#define ovsrec_open_vswitch_col_iface_types (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_IFACE_TYPES])
3992
0
#define ovsrec_open_vswitch_col_manager_options (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_MANAGER_OPTIONS])
3993
0
#define ovsrec_open_vswitch_col_next_cfg (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_NEXT_CFG])
3994
0
#define ovsrec_open_vswitch_col_other_config (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_OTHER_CONFIG])
3995
0
#define ovsrec_open_vswitch_col_ovs_version (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_OVS_VERSION])
3996
0
#define ovsrec_open_vswitch_col_ssl (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_SSL])
3997
0
#define ovsrec_open_vswitch_col_statistics (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_STATISTICS])
3998
0
#define ovsrec_open_vswitch_col_system_type (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_SYSTEM_TYPE])
3999
0
#define ovsrec_open_vswitch_col_system_version (ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_COL_SYSTEM_VERSION])
4000
4001
extern struct ovsdb_idl_column ovsrec_open_vswitch_columns[OVSREC_OPEN_VSWITCH_N_COLUMNS];
4002
bool ovsrec_server_has_open_vswitch_table_col_bridges(const struct ovsdb_idl *); 
4003
bool ovsrec_server_has_open_vswitch_table_col_cur_cfg(const struct ovsdb_idl *); 
4004
bool ovsrec_server_has_open_vswitch_table_col_datapath_types(const struct ovsdb_idl *); 
4005
bool ovsrec_server_has_open_vswitch_table_col_datapaths(const struct ovsdb_idl *); 
4006
bool ovsrec_server_has_open_vswitch_table_col_db_version(const struct ovsdb_idl *); 
4007
bool ovsrec_server_has_open_vswitch_table_col_dpdk_initialized(const struct ovsdb_idl *); 
4008
bool ovsrec_server_has_open_vswitch_table_col_dpdk_version(const struct ovsdb_idl *); 
4009
bool ovsrec_server_has_open_vswitch_table_col_external_ids(const struct ovsdb_idl *); 
4010
bool ovsrec_server_has_open_vswitch_table_col_iface_types(const struct ovsdb_idl *); 
4011
bool ovsrec_server_has_open_vswitch_table_col_manager_options(const struct ovsdb_idl *); 
4012
bool ovsrec_server_has_open_vswitch_table_col_next_cfg(const struct ovsdb_idl *); 
4013
bool ovsrec_server_has_open_vswitch_table_col_other_config(const struct ovsdb_idl *); 
4014
bool ovsrec_server_has_open_vswitch_table_col_ovs_version(const struct ovsdb_idl *); 
4015
bool ovsrec_server_has_open_vswitch_table_col_ssl(const struct ovsdb_idl *); 
4016
bool ovsrec_server_has_open_vswitch_table_col_statistics(const struct ovsdb_idl *); 
4017
bool ovsrec_server_has_open_vswitch_table_col_system_type(const struct ovsdb_idl *); 
4018
bool ovsrec_server_has_open_vswitch_table_col_system_version(const struct ovsdb_idl *); 
4019
4020
bool ovsrec_server_has_open_vswitch_table(const struct ovsdb_idl *);
4021
const struct ovsrec_open_vswitch_table *ovsrec_open_vswitch_table_get(const struct ovsdb_idl *);
4022
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_table_first(const struct ovsrec_open_vswitch_table *);
4023
4024
#define OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH(ROW, TABLE) \
4025
        for ((ROW) = ovsrec_open_vswitch_table_first(TABLE); \
4026
             (ROW); \
4027
             (ROW) = ovsrec_open_vswitch_next(ROW))
4028
#define OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
4029
        for ((ROW) = ovsrec_open_vswitch_table_first(TABLE); \
4030
             (ROW) ? ((NEXT) = ovsrec_open_vswitch_next(ROW), 1) : 0; \
4031
             (ROW) = (NEXT))
4032
#define OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
4033
        for (const struct ovsrec_open_vswitch * ROW__next = ((ROW) = ovsrec_open_vswitch_table_first(TABLE), NULL); \
4034
             (ROW) ? (ROW__next = ovsrec_open_vswitch_next(ROW), 1) : (ROW__next = NULL, 0); \
4035
             (ROW) = ROW__next)
4036
#define OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_SAFE(...)                                        \
4037
        OVERLOAD_SAFE_MACRO(OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_SAFE_LONG,                   \
4038
                            OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4039
4040
4041
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
4042
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_table_get_for_uuid(const struct ovsrec_open_vswitch_table *, const struct uuid *);
4043
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_first(const struct ovsdb_idl *);
4044
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_next(const struct ovsrec_open_vswitch *);
4045
#define OVSREC_OPEN_VSWITCH_FOR_EACH(ROW, IDL) \
4046
        for ((ROW) = ovsrec_open_vswitch_first(IDL); \
4047
             (ROW); \
4048
             (ROW) = ovsrec_open_vswitch_next(ROW))
4049
#define OVSREC_OPEN_VSWITCH_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
4050
        for ((ROW) = ovsrec_open_vswitch_first(IDL); \
4051
             (ROW) ? ((NEXT) = ovsrec_open_vswitch_next(ROW), 1) : 0; \
4052
             (ROW) = (NEXT))
4053
#define OVSREC_OPEN_VSWITCH_FOR_EACH_SAFE_SHORT(ROW, IDL) \
4054
        for (const struct ovsrec_open_vswitch * ROW__next = ((ROW) = ovsrec_open_vswitch_first(IDL), NULL); \
4055
             (ROW) ? (ROW__next = ovsrec_open_vswitch_next(ROW), 1) : (ROW__next = NULL, 0); \
4056
             (ROW) = ROW__next)
4057
#define OVSREC_OPEN_VSWITCH_FOR_EACH_SAFE(...)                                         \
4058
        OVERLOAD_SAFE_MACRO(OVSREC_OPEN_VSWITCH_FOR_EACH_SAFE_LONG,                    \
4059
                            OVSREC_OPEN_VSWITCH_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4060
4061
unsigned int ovsrec_open_vswitch_get_seqno(const struct ovsdb_idl *);
4062
unsigned int ovsrec_open_vswitch_row_get_seqno(const struct ovsrec_open_vswitch *row, enum ovsdb_idl_change change);
4063
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_track_get_first(const struct ovsdb_idl *);
4064
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_track_get_next(const struct ovsrec_open_vswitch *);
4065
#define OVSREC_OPEN_VSWITCH_FOR_EACH_TRACKED(ROW, IDL) \
4066
        for ((ROW) = ovsrec_open_vswitch_track_get_first(IDL); \
4067
             (ROW); \
4068
             (ROW) = ovsrec_open_vswitch_track_get_next(ROW))
4069
4070
const struct ovsrec_open_vswitch *ovsrec_open_vswitch_table_track_get_first(const struct ovsrec_open_vswitch_table *);
4071
#define OVSREC_OPEN_VSWITCH_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
4072
        for ((ROW) = ovsrec_open_vswitch_table_track_get_first(TABLE); \
4073
             (ROW); \
4074
             (ROW) = ovsrec_open_vswitch_track_get_next(ROW))
4075
4076
4077
/* Returns true if 'row' was inserted since the last change tracking reset.
4078
 *
4079
 * Note: This can only be used to test rows of tracked changes. This cannot be
4080
 * used to test if an uncommitted row that has been added locally is new or it
4081
 * may given unexpected results. */
4082
static inline bool ovsrec_open_vswitch_is_new(const struct ovsrec_open_vswitch *row)
4083
0
{
4084
0
    return ovsrec_open_vswitch_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
4085
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_open_vswitch_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_open_vswitch_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_open_vswitch_is_new
4086
4087
/* Returns true if 'row' was deleted since the last change tracking reset.
4088
 *
4089
 * Note: This can only be used to test rows of tracked changes. This cannot be
4090
 * used to test if an uncommitted row that has been added locally has been
4091
 * deleted or it may given unexpected results. */
4092
static inline bool ovsrec_open_vswitch_is_deleted(const struct ovsrec_open_vswitch *row)
4093
0
{
4094
0
    return ovsrec_open_vswitch_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
4095
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_open_vswitch_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_open_vswitch_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_open_vswitch_is_deleted
4096
4097
void ovsrec_open_vswitch_index_destroy_row(const struct ovsrec_open_vswitch *);
4098
4099
struct ovsrec_open_vswitch *ovsrec_open_vswitch_index_find(struct ovsdb_idl_index *, const struct ovsrec_open_vswitch *);
4100
4101
int ovsrec_open_vswitch_index_compare(
4102
    struct ovsdb_idl_index *, 
4103
    const struct ovsrec_open_vswitch *, 
4104
    const struct ovsrec_open_vswitch *);
4105
struct ovsdb_idl_cursor ovsrec_open_vswitch_cursor_first(struct ovsdb_idl_index *);
4106
struct ovsdb_idl_cursor ovsrec_open_vswitch_cursor_first_eq(
4107
    struct ovsdb_idl_index *, const struct ovsrec_open_vswitch *);
4108
struct ovsdb_idl_cursor ovsrec_open_vswitch_cursor_first_ge(
4109
    struct ovsdb_idl_index *, const struct ovsrec_open_vswitch *);
4110
4111
struct ovsrec_open_vswitch *ovsrec_open_vswitch_cursor_data(struct ovsdb_idl_cursor *);
4112
4113
#define OVSREC_OPEN_VSWITCH_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
4114
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_open_vswitch_cursor_first_ge(INDEX, FROM); \
4115
             (cursor__.position \
4116
              && ((ROW) = ovsrec_open_vswitch_cursor_data(&cursor__), \
4117
                  !(TO) || ovsrec_open_vswitch_index_compare(INDEX, ROW, TO) <= 0)); \
4118
             ovsdb_idl_cursor_next(&cursor__))
4119
#define OVSREC_OPEN_VSWITCH_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
4120
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_open_vswitch_cursor_first_eq(INDEX, KEY); \
4121
             (cursor__.position \
4122
              ? ((ROW) = ovsrec_open_vswitch_cursor_data(&cursor__), \
4123
                 ovsdb_idl_cursor_next_eq(&cursor__), \
4124
                 true) \
4125
              : false); \
4126
            )
4127
#define OVSREC_OPEN_VSWITCH_FOR_EACH_BYINDEX(ROW, INDEX) \
4128
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_open_vswitch_cursor_first(INDEX); \
4129
             (cursor__.position \
4130
              ? ((ROW) = ovsrec_open_vswitch_cursor_data(&cursor__), \
4131
                 ovsdb_idl_cursor_next(&cursor__), \
4132
                 true) \
4133
              : false); \
4134
            )
4135
4136
void ovsrec_open_vswitch_init(struct ovsrec_open_vswitch *);
4137
void ovsrec_open_vswitch_delete(const struct ovsrec_open_vswitch *);
4138
struct ovsrec_open_vswitch *ovsrec_open_vswitch_insert(struct ovsdb_idl_txn *);
4139
struct ovsrec_open_vswitch *ovsrec_open_vswitch_insert_persist_uuid(
4140
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
4141
4142
/* Returns true if the tracked column referenced by 'enum ovsrec_open_vswitch_column_id' of
4143
 * the row referenced by 'struct ovsrec_open_vswitch *' was updated since the last change
4144
 * tracking reset.
4145
 *
4146
 * Note: This can only be used to test rows of tracked changes. This cannot be
4147
 * used to test if an uncommitted row that has been added locally has been
4148
 * updated or it may given unexpected results. */
4149
bool ovsrec_open_vswitch_is_updated(const struct ovsrec_open_vswitch *, enum ovsrec_open_vswitch_column_id);
4150
4151
void ovsrec_open_vswitch_verify_bridges(const struct ovsrec_open_vswitch *);
4152
void ovsrec_open_vswitch_verify_cur_cfg(const struct ovsrec_open_vswitch *);
4153
void ovsrec_open_vswitch_verify_datapath_types(const struct ovsrec_open_vswitch *);
4154
void ovsrec_open_vswitch_verify_datapaths(const struct ovsrec_open_vswitch *);
4155
void ovsrec_open_vswitch_verify_db_version(const struct ovsrec_open_vswitch *);
4156
void ovsrec_open_vswitch_verify_dpdk_initialized(const struct ovsrec_open_vswitch *);
4157
void ovsrec_open_vswitch_verify_dpdk_version(const struct ovsrec_open_vswitch *);
4158
void ovsrec_open_vswitch_verify_external_ids(const struct ovsrec_open_vswitch *);
4159
void ovsrec_open_vswitch_verify_iface_types(const struct ovsrec_open_vswitch *);
4160
void ovsrec_open_vswitch_verify_manager_options(const struct ovsrec_open_vswitch *);
4161
void ovsrec_open_vswitch_verify_next_cfg(const struct ovsrec_open_vswitch *);
4162
void ovsrec_open_vswitch_verify_other_config(const struct ovsrec_open_vswitch *);
4163
void ovsrec_open_vswitch_verify_ovs_version(const struct ovsrec_open_vswitch *);
4164
void ovsrec_open_vswitch_verify_ssl(const struct ovsrec_open_vswitch *);
4165
void ovsrec_open_vswitch_verify_statistics(const struct ovsrec_open_vswitch *);
4166
void ovsrec_open_vswitch_verify_system_type(const struct ovsrec_open_vswitch *);
4167
void ovsrec_open_vswitch_verify_system_version(const struct ovsrec_open_vswitch *);
4168
4169
const struct ovsdb_datum *ovsrec_open_vswitch_get_bridges(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4170
const struct ovsdb_datum *ovsrec_open_vswitch_get_cur_cfg(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4171
const struct ovsdb_datum *ovsrec_open_vswitch_get_datapath_types(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4172
const struct ovsdb_datum *ovsrec_open_vswitch_get_datapaths(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4173
const struct ovsdb_datum *ovsrec_open_vswitch_get_db_version(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4174
const struct ovsdb_datum *ovsrec_open_vswitch_get_dpdk_initialized(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4175
const struct ovsdb_datum *ovsrec_open_vswitch_get_dpdk_version(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4176
const struct ovsdb_datum *ovsrec_open_vswitch_get_external_ids(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4177
const struct ovsdb_datum *ovsrec_open_vswitch_get_iface_types(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4178
const struct ovsdb_datum *ovsrec_open_vswitch_get_manager_options(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4179
const struct ovsdb_datum *ovsrec_open_vswitch_get_next_cfg(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4180
const struct ovsdb_datum *ovsrec_open_vswitch_get_other_config(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4181
const struct ovsdb_datum *ovsrec_open_vswitch_get_ovs_version(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4182
const struct ovsdb_datum *ovsrec_open_vswitch_get_ssl(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4183
const struct ovsdb_datum *ovsrec_open_vswitch_get_statistics(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4184
const struct ovsdb_datum *ovsrec_open_vswitch_get_system_type(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4185
const struct ovsdb_datum *ovsrec_open_vswitch_get_system_version(const struct ovsrec_open_vswitch *, enum ovsdb_atomic_type key_type);
4186
4187
void ovsrec_open_vswitch_set_bridges(const struct ovsrec_open_vswitch *, struct ovsrec_bridge **bridges, size_t n_bridges);
4188
void ovsrec_open_vswitch_set_cur_cfg(const struct ovsrec_open_vswitch *, int64_t cur_cfg);
4189
void ovsrec_open_vswitch_set_datapath_types(const struct ovsrec_open_vswitch *, const char **datapath_types, size_t n_datapath_types);
4190
void ovsrec_open_vswitch_set_datapaths(const struct ovsrec_open_vswitch *, const char **key_datapaths, struct ovsrec_datapath **value_datapaths, size_t n_datapaths);
4191
void ovsrec_open_vswitch_set_db_version(const struct ovsrec_open_vswitch *, const char *db_version);
4192
void ovsrec_open_vswitch_set_dpdk_initialized(const struct ovsrec_open_vswitch *, bool dpdk_initialized);
4193
void ovsrec_open_vswitch_set_dpdk_version(const struct ovsrec_open_vswitch *, const char *dpdk_version);
4194
void ovsrec_open_vswitch_set_external_ids(const struct ovsrec_open_vswitch *, const struct smap *);
4195
void ovsrec_open_vswitch_set_iface_types(const struct ovsrec_open_vswitch *, const char **iface_types, size_t n_iface_types);
4196
void ovsrec_open_vswitch_set_manager_options(const struct ovsrec_open_vswitch *, struct ovsrec_manager **manager_options, size_t n_manager_options);
4197
void ovsrec_open_vswitch_set_next_cfg(const struct ovsrec_open_vswitch *, int64_t next_cfg);
4198
void ovsrec_open_vswitch_set_other_config(const struct ovsrec_open_vswitch *, const struct smap *);
4199
void ovsrec_open_vswitch_set_ovs_version(const struct ovsrec_open_vswitch *, const char *ovs_version);
4200
void ovsrec_open_vswitch_set_ssl(const struct ovsrec_open_vswitch *, const struct ovsrec_ssl *ssl);
4201
void ovsrec_open_vswitch_set_statistics(const struct ovsrec_open_vswitch *, const struct smap *);
4202
void ovsrec_open_vswitch_set_system_type(const struct ovsrec_open_vswitch *, const char *system_type);
4203
void ovsrec_open_vswitch_set_system_version(const struct ovsrec_open_vswitch *, const char *system_version);
4204
4205
void ovsrec_open_vswitch_update_bridges_addvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_bridge *);
4206
void ovsrec_open_vswitch_update_bridges_delvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_bridge *);
4207
void ovsrec_open_vswitch_add_clause_bridges(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **bridges, size_t n_bridges);
4208
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4209
void ovsrec_open_vswitch_add_clause_cur_cfg(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t cur_cfg);
4210
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4211
void ovsrec_open_vswitch_update_datapath_types_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4212
void ovsrec_open_vswitch_update_datapath_types_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4213
void ovsrec_open_vswitch_add_clause_datapath_types(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **datapath_types, size_t n_datapath_types);
4214
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4215
void ovsrec_open_vswitch_update_datapaths_setkey(const struct ovsrec_open_vswitch *,  const char *, const struct ovsrec_datapath *);
4216
void ovsrec_open_vswitch_update_datapaths_delkey(const struct ovsrec_open_vswitch *,  const char *);
4217
void ovsrec_open_vswitch_add_clause_datapaths(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_datapaths, struct uuid **value_datapaths, size_t n_datapaths);
4218
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4219
void ovsrec_open_vswitch_update_db_version_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4220
void ovsrec_open_vswitch_update_db_version_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4221
void ovsrec_open_vswitch_add_clause_db_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *db_version);
4222
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4223
void ovsrec_open_vswitch_add_clause_dpdk_initialized(struct ovsdb_idl_condition *, enum ovsdb_function function, bool dpdk_initialized);
4224
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4225
void ovsrec_open_vswitch_update_dpdk_version_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4226
void ovsrec_open_vswitch_update_dpdk_version_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4227
void ovsrec_open_vswitch_add_clause_dpdk_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *dpdk_version);
4228
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4229
void ovsrec_open_vswitch_update_external_ids_setkey(const struct ovsrec_open_vswitch *,  const char *, const char *);
4230
void ovsrec_open_vswitch_update_external_ids_delkey(const struct ovsrec_open_vswitch *,  const char *);
4231
void ovsrec_open_vswitch_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4232
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4233
void ovsrec_open_vswitch_update_iface_types_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4234
void ovsrec_open_vswitch_update_iface_types_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4235
void ovsrec_open_vswitch_add_clause_iface_types(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **iface_types, size_t n_iface_types);
4236
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4237
void ovsrec_open_vswitch_update_manager_options_addvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_manager *);
4238
void ovsrec_open_vswitch_update_manager_options_delvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_manager *);
4239
void ovsrec_open_vswitch_add_clause_manager_options(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **manager_options, size_t n_manager_options);
4240
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4241
void ovsrec_open_vswitch_add_clause_next_cfg(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t next_cfg);
4242
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4243
void ovsrec_open_vswitch_update_other_config_setkey(const struct ovsrec_open_vswitch *,  const char *, const char *);
4244
void ovsrec_open_vswitch_update_other_config_delkey(const struct ovsrec_open_vswitch *,  const char *);
4245
void ovsrec_open_vswitch_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4246
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4247
void ovsrec_open_vswitch_update_ovs_version_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4248
void ovsrec_open_vswitch_update_ovs_version_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4249
void ovsrec_open_vswitch_add_clause_ovs_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *ovs_version);
4250
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4251
void ovsrec_open_vswitch_update_ssl_addvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_ssl *);
4252
void ovsrec_open_vswitch_update_ssl_delvalue(const struct ovsrec_open_vswitch *,  const struct ovsrec_ssl *);
4253
void ovsrec_open_vswitch_add_clause_ssl(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *ssl);
4254
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4255
void ovsrec_open_vswitch_update_statistics_setkey(const struct ovsrec_open_vswitch *,  const char *, const char *);
4256
void ovsrec_open_vswitch_update_statistics_delkey(const struct ovsrec_open_vswitch *,  const char *);
4257
void ovsrec_open_vswitch_add_clause_statistics(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4258
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4259
void ovsrec_open_vswitch_update_system_type_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4260
void ovsrec_open_vswitch_update_system_type_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4261
void ovsrec_open_vswitch_add_clause_system_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *system_type);
4262
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4263
void ovsrec_open_vswitch_update_system_version_addvalue(const struct ovsrec_open_vswitch *,  const char *);
4264
void ovsrec_open_vswitch_update_system_version_delvalue(const struct ovsrec_open_vswitch *,  const char *);
4265
void ovsrec_open_vswitch_add_clause_system_version(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *system_version);
4266
unsigned int ovsrec_open_vswitch_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4267
4268
struct ovsrec_open_vswitch *ovsrec_open_vswitch_index_init_row(struct ovsdb_idl_index *);
4269
void ovsrec_open_vswitch_index_set_bridges(const struct ovsrec_open_vswitch *,
4270
struct ovsrec_bridge **bridges, size_t n_bridges);
4271
void ovsrec_open_vswitch_index_set_cur_cfg(const struct ovsrec_open_vswitch *,
4272
int64_t cur_cfg);
4273
void ovsrec_open_vswitch_index_set_datapath_types(const struct ovsrec_open_vswitch *,
4274
const char **datapath_types, size_t n_datapath_types);
4275
void ovsrec_open_vswitch_index_set_datapaths(const struct ovsrec_open_vswitch *,
4276
const char **key_datapaths, struct ovsrec_datapath **value_datapaths, size_t n_datapaths);
4277
void ovsrec_open_vswitch_index_set_db_version(const struct ovsrec_open_vswitch *,
4278
const char *db_version);
4279
void ovsrec_open_vswitch_index_set_dpdk_initialized(const struct ovsrec_open_vswitch *,
4280
bool dpdk_initialized);
4281
void ovsrec_open_vswitch_index_set_dpdk_version(const struct ovsrec_open_vswitch *,
4282
const char *dpdk_version);
4283
void ovsrec_open_vswitch_index_set_external_ids(const struct ovsrec_open_vswitch *,
4284
const struct smap *);
4285
void ovsrec_open_vswitch_index_set_iface_types(const struct ovsrec_open_vswitch *,
4286
const char **iface_types, size_t n_iface_types);
4287
void ovsrec_open_vswitch_index_set_manager_options(const struct ovsrec_open_vswitch *,
4288
struct ovsrec_manager **manager_options, size_t n_manager_options);
4289
void ovsrec_open_vswitch_index_set_next_cfg(const struct ovsrec_open_vswitch *,
4290
int64_t next_cfg);
4291
void ovsrec_open_vswitch_index_set_other_config(const struct ovsrec_open_vswitch *,
4292
const struct smap *);
4293
void ovsrec_open_vswitch_index_set_ovs_version(const struct ovsrec_open_vswitch *,
4294
const char *ovs_version);
4295
void ovsrec_open_vswitch_index_set_ssl(const struct ovsrec_open_vswitch *,
4296
const struct ovsrec_ssl *ssl);
4297
void ovsrec_open_vswitch_index_set_statistics(const struct ovsrec_open_vswitch *,
4298
const struct smap *);
4299
void ovsrec_open_vswitch_index_set_system_type(const struct ovsrec_open_vswitch *,
4300
const char *system_type);
4301
void ovsrec_open_vswitch_index_set_system_version(const struct ovsrec_open_vswitch *,
4302
const char *system_version);
4303

4304
/* Port table. */
4305
struct ovsrec_port {
4306
  struct ovsdb_idl_row header_;
4307
4308
  /* bond_active_slave column. */
4309
  char *bond_active_slave;
4310
4311
  /* bond_downdelay column. */
4312
  int64_t bond_downdelay;
4313
4314
  /* bond_fake_iface column. */
4315
  bool bond_fake_iface;
4316
4317
  /* bond_mode column. */
4318
  char *bond_mode;
4319
4320
  /* bond_updelay column. */
4321
  int64_t bond_updelay;
4322
4323
  /* cvlans column. */
4324
  int64_t *cvlans;
4325
  size_t n_cvlans;
4326
4327
  /* external_ids column. */
4328
  struct smap external_ids;
4329
4330
  /* fake_bridge column. */
4331
  bool fake_bridge;
4332
4333
  /* interfaces column. */
4334
  struct ovsrec_interface **interfaces;
4335
  size_t n_interfaces;
4336
4337
  /* lacp column. */
4338
  char *lacp;
4339
4340
  /* mac column. */
4341
  char *mac;
4342
4343
  /* name column. */
4344
  char *name; /* Always nonnull. */
4345
4346
  /* other_config column. */
4347
  struct smap other_config;
4348
4349
  /* protected_ column. */
4350
  bool protected_;
4351
4352
  /* qos column. */
4353
  struct ovsrec_qos *qos;
4354
4355
  /* rstp_statistics column. */
4356
  char **key_rstp_statistics;
4357
  int64_t *value_rstp_statistics;
4358
  size_t n_rstp_statistics;
4359
4360
  /* rstp_status column. */
4361
  struct smap rstp_status;
4362
4363
  /* statistics column. */
4364
  char **key_statistics;
4365
  int64_t *value_statistics;
4366
  size_t n_statistics;
4367
4368
  /* status column. */
4369
  struct smap status;
4370
4371
  /* tag column. */
4372
  int64_t *tag;
4373
  size_t n_tag;
4374
4375
  /* trunks column. */
4376
  int64_t *trunks;
4377
  size_t n_trunks;
4378
4379
  /* vlan_mode column. */
4380
  char *vlan_mode;
4381
};
4382
4383
enum ovsrec_port_column_id {
4384
    OVSREC_PORT_COL_BOND_ACTIVE_SLAVE,
4385
    OVSREC_PORT_COL_BOND_DOWNDELAY,
4386
    OVSREC_PORT_COL_BOND_FAKE_IFACE,
4387
    OVSREC_PORT_COL_BOND_MODE,
4388
    OVSREC_PORT_COL_BOND_UPDELAY,
4389
    OVSREC_PORT_COL_CVLANS,
4390
    OVSREC_PORT_COL_EXTERNAL_IDS,
4391
    OVSREC_PORT_COL_FAKE_BRIDGE,
4392
    OVSREC_PORT_COL_INTERFACES,
4393
    OVSREC_PORT_COL_LACP,
4394
    OVSREC_PORT_COL_MAC,
4395
    OVSREC_PORT_COL_NAME,
4396
    OVSREC_PORT_COL_OTHER_CONFIG,
4397
    OVSREC_PORT_COL_PROTECTED_,
4398
    OVSREC_PORT_COL_QOS,
4399
    OVSREC_PORT_COL_RSTP_STATISTICS,
4400
    OVSREC_PORT_COL_RSTP_STATUS,
4401
    OVSREC_PORT_COL_STATISTICS,
4402
    OVSREC_PORT_COL_STATUS,
4403
    OVSREC_PORT_COL_TAG,
4404
    OVSREC_PORT_COL_TRUNKS,
4405
    OVSREC_PORT_COL_VLAN_MODE,
4406
    OVSREC_PORT_N_COLUMNS
4407
};
4408
4409
0
#define ovsrec_port_col_bond_active_slave (ovsrec_port_columns[OVSREC_PORT_COL_BOND_ACTIVE_SLAVE])
4410
0
#define ovsrec_port_col_bond_downdelay (ovsrec_port_columns[OVSREC_PORT_COL_BOND_DOWNDELAY])
4411
0
#define ovsrec_port_col_bond_fake_iface (ovsrec_port_columns[OVSREC_PORT_COL_BOND_FAKE_IFACE])
4412
0
#define ovsrec_port_col_bond_mode (ovsrec_port_columns[OVSREC_PORT_COL_BOND_MODE])
4413
0
#define ovsrec_port_col_bond_updelay (ovsrec_port_columns[OVSREC_PORT_COL_BOND_UPDELAY])
4414
0
#define ovsrec_port_col_cvlans (ovsrec_port_columns[OVSREC_PORT_COL_CVLANS])
4415
0
#define ovsrec_port_col_external_ids (ovsrec_port_columns[OVSREC_PORT_COL_EXTERNAL_IDS])
4416
0
#define ovsrec_port_col_fake_bridge (ovsrec_port_columns[OVSREC_PORT_COL_FAKE_BRIDGE])
4417
0
#define ovsrec_port_col_interfaces (ovsrec_port_columns[OVSREC_PORT_COL_INTERFACES])
4418
0
#define ovsrec_port_col_lacp (ovsrec_port_columns[OVSREC_PORT_COL_LACP])
4419
0
#define ovsrec_port_col_mac (ovsrec_port_columns[OVSREC_PORT_COL_MAC])
4420
0
#define ovsrec_port_col_name (ovsrec_port_columns[OVSREC_PORT_COL_NAME])
4421
0
#define ovsrec_port_col_other_config (ovsrec_port_columns[OVSREC_PORT_COL_OTHER_CONFIG])
4422
0
#define ovsrec_port_col_qos (ovsrec_port_columns[OVSREC_PORT_COL_QOS])
4423
0
#define ovsrec_port_col_rstp_statistics (ovsrec_port_columns[OVSREC_PORT_COL_RSTP_STATISTICS])
4424
0
#define ovsrec_port_col_rstp_status (ovsrec_port_columns[OVSREC_PORT_COL_RSTP_STATUS])
4425
0
#define ovsrec_port_col_statistics (ovsrec_port_columns[OVSREC_PORT_COL_STATISTICS])
4426
0
#define ovsrec_port_col_status (ovsrec_port_columns[OVSREC_PORT_COL_STATUS])
4427
0
#define ovsrec_port_col_tag (ovsrec_port_columns[OVSREC_PORT_COL_TAG])
4428
0
#define ovsrec_port_col_trunks (ovsrec_port_columns[OVSREC_PORT_COL_TRUNKS])
4429
0
#define ovsrec_port_col_vlan_mode (ovsrec_port_columns[OVSREC_PORT_COL_VLAN_MODE])
4430
0
#define ovsrec_port_col_protected_ (ovsrec_port_columns[OVSREC_PORT_COL_PROTECTED_])
4431
4432
extern struct ovsdb_idl_column ovsrec_port_columns[OVSREC_PORT_N_COLUMNS];
4433
bool ovsrec_server_has_port_table_col_bond_active_slave(const struct ovsdb_idl *); 
4434
bool ovsrec_server_has_port_table_col_bond_downdelay(const struct ovsdb_idl *); 
4435
bool ovsrec_server_has_port_table_col_bond_fake_iface(const struct ovsdb_idl *); 
4436
bool ovsrec_server_has_port_table_col_bond_mode(const struct ovsdb_idl *); 
4437
bool ovsrec_server_has_port_table_col_bond_updelay(const struct ovsdb_idl *); 
4438
bool ovsrec_server_has_port_table_col_cvlans(const struct ovsdb_idl *); 
4439
bool ovsrec_server_has_port_table_col_external_ids(const struct ovsdb_idl *); 
4440
bool ovsrec_server_has_port_table_col_fake_bridge(const struct ovsdb_idl *); 
4441
bool ovsrec_server_has_port_table_col_interfaces(const struct ovsdb_idl *); 
4442
bool ovsrec_server_has_port_table_col_lacp(const struct ovsdb_idl *); 
4443
bool ovsrec_server_has_port_table_col_mac(const struct ovsdb_idl *); 
4444
bool ovsrec_server_has_port_table_col_name(const struct ovsdb_idl *); 
4445
bool ovsrec_server_has_port_table_col_other_config(const struct ovsdb_idl *); 
4446
bool ovsrec_server_has_port_table_col_qos(const struct ovsdb_idl *); 
4447
bool ovsrec_server_has_port_table_col_rstp_statistics(const struct ovsdb_idl *); 
4448
bool ovsrec_server_has_port_table_col_rstp_status(const struct ovsdb_idl *); 
4449
bool ovsrec_server_has_port_table_col_statistics(const struct ovsdb_idl *); 
4450
bool ovsrec_server_has_port_table_col_status(const struct ovsdb_idl *); 
4451
bool ovsrec_server_has_port_table_col_tag(const struct ovsdb_idl *); 
4452
bool ovsrec_server_has_port_table_col_trunks(const struct ovsdb_idl *); 
4453
bool ovsrec_server_has_port_table_col_vlan_mode(const struct ovsdb_idl *); 
4454
bool ovsrec_server_has_port_table_col_protected_(const struct ovsdb_idl *); 
4455
4456
bool ovsrec_server_has_port_table(const struct ovsdb_idl *);
4457
const struct ovsrec_port_table *ovsrec_port_table_get(const struct ovsdb_idl *);
4458
const struct ovsrec_port *ovsrec_port_table_first(const struct ovsrec_port_table *);
4459
4460
#define OVSREC_PORT_TABLE_FOR_EACH(ROW, TABLE) \
4461
        for ((ROW) = ovsrec_port_table_first(TABLE); \
4462
             (ROW); \
4463
             (ROW) = ovsrec_port_next(ROW))
4464
#define OVSREC_PORT_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
4465
        for ((ROW) = ovsrec_port_table_first(TABLE); \
4466
             (ROW) ? ((NEXT) = ovsrec_port_next(ROW), 1) : 0; \
4467
             (ROW) = (NEXT))
4468
#define OVSREC_PORT_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
4469
        for (const struct ovsrec_port * ROW__next = ((ROW) = ovsrec_port_table_first(TABLE), NULL); \
4470
             (ROW) ? (ROW__next = ovsrec_port_next(ROW), 1) : (ROW__next = NULL, 0); \
4471
             (ROW) = ROW__next)
4472
#define OVSREC_PORT_TABLE_FOR_EACH_SAFE(...)                                        \
4473
        OVERLOAD_SAFE_MACRO(OVSREC_PORT_TABLE_FOR_EACH_SAFE_LONG,                   \
4474
                            OVSREC_PORT_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4475
4476
4477
const struct ovsrec_port *ovsrec_port_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
4478
const struct ovsrec_port *ovsrec_port_table_get_for_uuid(const struct ovsrec_port_table *, const struct uuid *);
4479
const struct ovsrec_port *ovsrec_port_first(const struct ovsdb_idl *);
4480
const struct ovsrec_port *ovsrec_port_next(const struct ovsrec_port *);
4481
#define OVSREC_PORT_FOR_EACH(ROW, IDL) \
4482
        for ((ROW) = ovsrec_port_first(IDL); \
4483
             (ROW); \
4484
             (ROW) = ovsrec_port_next(ROW))
4485
#define OVSREC_PORT_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
4486
        for ((ROW) = ovsrec_port_first(IDL); \
4487
             (ROW) ? ((NEXT) = ovsrec_port_next(ROW), 1) : 0; \
4488
             (ROW) = (NEXT))
4489
#define OVSREC_PORT_FOR_EACH_SAFE_SHORT(ROW, IDL) \
4490
        for (const struct ovsrec_port * ROW__next = ((ROW) = ovsrec_port_first(IDL), NULL); \
4491
             (ROW) ? (ROW__next = ovsrec_port_next(ROW), 1) : (ROW__next = NULL, 0); \
4492
             (ROW) = ROW__next)
4493
#define OVSREC_PORT_FOR_EACH_SAFE(...)                                         \
4494
        OVERLOAD_SAFE_MACRO(OVSREC_PORT_FOR_EACH_SAFE_LONG,                    \
4495
                            OVSREC_PORT_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4496
4497
unsigned int ovsrec_port_get_seqno(const struct ovsdb_idl *);
4498
unsigned int ovsrec_port_row_get_seqno(const struct ovsrec_port *row, enum ovsdb_idl_change change);
4499
const struct ovsrec_port *ovsrec_port_track_get_first(const struct ovsdb_idl *);
4500
const struct ovsrec_port *ovsrec_port_track_get_next(const struct ovsrec_port *);
4501
#define OVSREC_PORT_FOR_EACH_TRACKED(ROW, IDL) \
4502
        for ((ROW) = ovsrec_port_track_get_first(IDL); \
4503
             (ROW); \
4504
             (ROW) = ovsrec_port_track_get_next(ROW))
4505
4506
const struct ovsrec_port *ovsrec_port_table_track_get_first(const struct ovsrec_port_table *);
4507
#define OVSREC_PORT_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
4508
        for ((ROW) = ovsrec_port_table_track_get_first(TABLE); \
4509
             (ROW); \
4510
             (ROW) = ovsrec_port_track_get_next(ROW))
4511
4512
4513
/* Returns true if 'row' was inserted since the last change tracking reset.
4514
 *
4515
 * Note: This can only be used to test rows of tracked changes. This cannot be
4516
 * used to test if an uncommitted row that has been added locally is new or it
4517
 * may given unexpected results. */
4518
static inline bool ovsrec_port_is_new(const struct ovsrec_port *row)
4519
0
{
4520
0
    return ovsrec_port_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
4521
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_port_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_port_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_port_is_new
4522
4523
/* Returns true if 'row' was deleted since the last change tracking reset.
4524
 *
4525
 * Note: This can only be used to test rows of tracked changes. This cannot be
4526
 * used to test if an uncommitted row that has been added locally has been
4527
 * deleted or it may given unexpected results. */
4528
static inline bool ovsrec_port_is_deleted(const struct ovsrec_port *row)
4529
0
{
4530
0
    return ovsrec_port_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
4531
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_port_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_port_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_port_is_deleted
4532
4533
void ovsrec_port_index_destroy_row(const struct ovsrec_port *);
4534
4535
struct ovsrec_port *ovsrec_port_index_find(struct ovsdb_idl_index *, const struct ovsrec_port *);
4536
4537
int ovsrec_port_index_compare(
4538
    struct ovsdb_idl_index *, 
4539
    const struct ovsrec_port *, 
4540
    const struct ovsrec_port *);
4541
struct ovsdb_idl_cursor ovsrec_port_cursor_first(struct ovsdb_idl_index *);
4542
struct ovsdb_idl_cursor ovsrec_port_cursor_first_eq(
4543
    struct ovsdb_idl_index *, const struct ovsrec_port *);
4544
struct ovsdb_idl_cursor ovsrec_port_cursor_first_ge(
4545
    struct ovsdb_idl_index *, const struct ovsrec_port *);
4546
4547
struct ovsrec_port *ovsrec_port_cursor_data(struct ovsdb_idl_cursor *);
4548
4549
#define OVSREC_PORT_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
4550
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_port_cursor_first_ge(INDEX, FROM); \
4551
             (cursor__.position \
4552
              && ((ROW) = ovsrec_port_cursor_data(&cursor__), \
4553
                  !(TO) || ovsrec_port_index_compare(INDEX, ROW, TO) <= 0)); \
4554
             ovsdb_idl_cursor_next(&cursor__))
4555
#define OVSREC_PORT_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
4556
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_port_cursor_first_eq(INDEX, KEY); \
4557
             (cursor__.position \
4558
              ? ((ROW) = ovsrec_port_cursor_data(&cursor__), \
4559
                 ovsdb_idl_cursor_next_eq(&cursor__), \
4560
                 true) \
4561
              : false); \
4562
            )
4563
#define OVSREC_PORT_FOR_EACH_BYINDEX(ROW, INDEX) \
4564
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_port_cursor_first(INDEX); \
4565
             (cursor__.position \
4566
              ? ((ROW) = ovsrec_port_cursor_data(&cursor__), \
4567
                 ovsdb_idl_cursor_next(&cursor__), \
4568
                 true) \
4569
              : false); \
4570
            )
4571
4572
void ovsrec_port_init(struct ovsrec_port *);
4573
void ovsrec_port_delete(const struct ovsrec_port *);
4574
struct ovsrec_port *ovsrec_port_insert(struct ovsdb_idl_txn *);
4575
struct ovsrec_port *ovsrec_port_insert_persist_uuid(
4576
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
4577
4578
/* Returns true if the tracked column referenced by 'enum ovsrec_port_column_id' of
4579
 * the row referenced by 'struct ovsrec_port *' was updated since the last change
4580
 * tracking reset.
4581
 *
4582
 * Note: This can only be used to test rows of tracked changes. This cannot be
4583
 * used to test if an uncommitted row that has been added locally has been
4584
 * updated or it may given unexpected results. */
4585
bool ovsrec_port_is_updated(const struct ovsrec_port *, enum ovsrec_port_column_id);
4586
4587
void ovsrec_port_verify_bond_active_slave(const struct ovsrec_port *);
4588
void ovsrec_port_verify_bond_downdelay(const struct ovsrec_port *);
4589
void ovsrec_port_verify_bond_fake_iface(const struct ovsrec_port *);
4590
void ovsrec_port_verify_bond_mode(const struct ovsrec_port *);
4591
void ovsrec_port_verify_bond_updelay(const struct ovsrec_port *);
4592
void ovsrec_port_verify_cvlans(const struct ovsrec_port *);
4593
void ovsrec_port_verify_external_ids(const struct ovsrec_port *);
4594
void ovsrec_port_verify_fake_bridge(const struct ovsrec_port *);
4595
void ovsrec_port_verify_interfaces(const struct ovsrec_port *);
4596
void ovsrec_port_verify_lacp(const struct ovsrec_port *);
4597
void ovsrec_port_verify_mac(const struct ovsrec_port *);
4598
void ovsrec_port_verify_name(const struct ovsrec_port *);
4599
void ovsrec_port_verify_other_config(const struct ovsrec_port *);
4600
void ovsrec_port_verify_protected_(const struct ovsrec_port *);
4601
void ovsrec_port_verify_qos(const struct ovsrec_port *);
4602
void ovsrec_port_verify_rstp_statistics(const struct ovsrec_port *);
4603
void ovsrec_port_verify_rstp_status(const struct ovsrec_port *);
4604
void ovsrec_port_verify_statistics(const struct ovsrec_port *);
4605
void ovsrec_port_verify_status(const struct ovsrec_port *);
4606
void ovsrec_port_verify_tag(const struct ovsrec_port *);
4607
void ovsrec_port_verify_trunks(const struct ovsrec_port *);
4608
void ovsrec_port_verify_vlan_mode(const struct ovsrec_port *);
4609
4610
const struct ovsdb_datum *ovsrec_port_get_bond_active_slave(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4611
const struct ovsdb_datum *ovsrec_port_get_bond_downdelay(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4612
const struct ovsdb_datum *ovsrec_port_get_bond_fake_iface(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4613
const struct ovsdb_datum *ovsrec_port_get_bond_mode(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4614
const struct ovsdb_datum *ovsrec_port_get_bond_updelay(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4615
const struct ovsdb_datum *ovsrec_port_get_cvlans(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4616
const struct ovsdb_datum *ovsrec_port_get_external_ids(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4617
const struct ovsdb_datum *ovsrec_port_get_fake_bridge(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4618
const struct ovsdb_datum *ovsrec_port_get_interfaces(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4619
const struct ovsdb_datum *ovsrec_port_get_lacp(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4620
const struct ovsdb_datum *ovsrec_port_get_mac(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4621
const struct ovsdb_datum *ovsrec_port_get_name(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4622
const struct ovsdb_datum *ovsrec_port_get_other_config(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4623
const struct ovsdb_datum *ovsrec_port_get_protected_(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4624
const struct ovsdb_datum *ovsrec_port_get_qos(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4625
const struct ovsdb_datum *ovsrec_port_get_rstp_statistics(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4626
const struct ovsdb_datum *ovsrec_port_get_rstp_status(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4627
const struct ovsdb_datum *ovsrec_port_get_statistics(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4628
const struct ovsdb_datum *ovsrec_port_get_status(const struct ovsrec_port *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4629
const struct ovsdb_datum *ovsrec_port_get_tag(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4630
const struct ovsdb_datum *ovsrec_port_get_trunks(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4631
const struct ovsdb_datum *ovsrec_port_get_vlan_mode(const struct ovsrec_port *, enum ovsdb_atomic_type key_type);
4632
4633
void ovsrec_port_set_bond_active_slave(const struct ovsrec_port *, const char *bond_active_slave);
4634
void ovsrec_port_set_bond_downdelay(const struct ovsrec_port *, int64_t bond_downdelay);
4635
void ovsrec_port_set_bond_fake_iface(const struct ovsrec_port *, bool bond_fake_iface);
4636
void ovsrec_port_set_bond_mode(const struct ovsrec_port *, const char *bond_mode);
4637
void ovsrec_port_set_bond_updelay(const struct ovsrec_port *, int64_t bond_updelay);
4638
void ovsrec_port_set_cvlans(const struct ovsrec_port *, const int64_t *cvlans, size_t n_cvlans);
4639
void ovsrec_port_set_external_ids(const struct ovsrec_port *, const struct smap *);
4640
void ovsrec_port_set_fake_bridge(const struct ovsrec_port *, bool fake_bridge);
4641
void ovsrec_port_set_interfaces(const struct ovsrec_port *, struct ovsrec_interface **interfaces, size_t n_interfaces);
4642
void ovsrec_port_set_lacp(const struct ovsrec_port *, const char *lacp);
4643
void ovsrec_port_set_mac(const struct ovsrec_port *, const char *mac);
4644
void ovsrec_port_set_name(const struct ovsrec_port *, const char *name);
4645
void ovsrec_port_set_other_config(const struct ovsrec_port *, const struct smap *);
4646
void ovsrec_port_set_protected_(const struct ovsrec_port *, bool protected_);
4647
void ovsrec_port_set_qos(const struct ovsrec_port *, const struct ovsrec_qos *qos);
4648
void ovsrec_port_set_rstp_statistics(const struct ovsrec_port *, const char **key_rstp_statistics, const int64_t *value_rstp_statistics, size_t n_rstp_statistics);
4649
void ovsrec_port_set_rstp_status(const struct ovsrec_port *, const struct smap *);
4650
void ovsrec_port_set_statistics(const struct ovsrec_port *, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
4651
void ovsrec_port_set_status(const struct ovsrec_port *, const struct smap *);
4652
void ovsrec_port_set_tag(const struct ovsrec_port *, const int64_t *tag, size_t n_tag);
4653
void ovsrec_port_set_trunks(const struct ovsrec_port *, const int64_t *trunks, size_t n_trunks);
4654
void ovsrec_port_set_vlan_mode(const struct ovsrec_port *, const char *vlan_mode);
4655
4656
void ovsrec_port_update_bond_active_slave_addvalue(const struct ovsrec_port *,  const char *);
4657
void ovsrec_port_update_bond_active_slave_delvalue(const struct ovsrec_port *,  const char *);
4658
void ovsrec_port_add_clause_bond_active_slave(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *bond_active_slave);
4659
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4660
void ovsrec_port_add_clause_bond_downdelay(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t bond_downdelay);
4661
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4662
void ovsrec_port_add_clause_bond_fake_iface(struct ovsdb_idl_condition *, enum ovsdb_function function, bool bond_fake_iface);
4663
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4664
void ovsrec_port_update_bond_mode_addvalue(const struct ovsrec_port *,  const char *);
4665
void ovsrec_port_update_bond_mode_delvalue(const struct ovsrec_port *,  const char *);
4666
void ovsrec_port_add_clause_bond_mode(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *bond_mode);
4667
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4668
void ovsrec_port_add_clause_bond_updelay(struct ovsdb_idl_condition *, enum ovsdb_function function, int64_t bond_updelay);
4669
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4670
void ovsrec_port_update_cvlans_addvalue(const struct ovsrec_port *,  int64_t );
4671
void ovsrec_port_update_cvlans_delvalue(const struct ovsrec_port *,  int64_t );
4672
void ovsrec_port_add_clause_cvlans(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *cvlans, size_t n_cvlans);
4673
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4674
void ovsrec_port_update_external_ids_setkey(const struct ovsrec_port *,  const char *, const char *);
4675
void ovsrec_port_update_external_ids_delkey(const struct ovsrec_port *,  const char *);
4676
void ovsrec_port_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4677
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4678
void ovsrec_port_add_clause_fake_bridge(struct ovsdb_idl_condition *, enum ovsdb_function function, bool fake_bridge);
4679
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4680
void ovsrec_port_update_interfaces_addvalue(const struct ovsrec_port *,  const struct ovsrec_interface *);
4681
void ovsrec_port_update_interfaces_delvalue(const struct ovsrec_port *,  const struct ovsrec_interface *);
4682
void ovsrec_port_add_clause_interfaces(struct ovsdb_idl_condition *, enum ovsdb_function function, struct uuid **interfaces, size_t n_interfaces);
4683
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4684
void ovsrec_port_update_lacp_addvalue(const struct ovsrec_port *,  const char *);
4685
void ovsrec_port_update_lacp_delvalue(const struct ovsrec_port *,  const char *);
4686
void ovsrec_port_add_clause_lacp(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *lacp);
4687
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4688
void ovsrec_port_update_mac_addvalue(const struct ovsrec_port *,  const char *);
4689
void ovsrec_port_update_mac_delvalue(const struct ovsrec_port *,  const char *);
4690
void ovsrec_port_add_clause_mac(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *mac);
4691
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4692
void ovsrec_port_add_clause_name(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *name);
4693
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4694
void ovsrec_port_update_other_config_setkey(const struct ovsrec_port *,  const char *, const char *);
4695
void ovsrec_port_update_other_config_delkey(const struct ovsrec_port *,  const char *);
4696
void ovsrec_port_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4697
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4698
void ovsrec_port_add_clause_protected_(struct ovsdb_idl_condition *, enum ovsdb_function function, bool protected_);
4699
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4700
void ovsrec_port_update_qos_addvalue(const struct ovsrec_port *,  const struct ovsrec_qos *);
4701
void ovsrec_port_update_qos_delvalue(const struct ovsrec_port *,  const struct ovsrec_qos *);
4702
void ovsrec_port_add_clause_qos(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct uuid *qos);
4703
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4704
void ovsrec_port_update_rstp_statistics_setkey(const struct ovsrec_port *,  const char *, int64_t );
4705
void ovsrec_port_update_rstp_statistics_delkey(const struct ovsrec_port *,  const char *);
4706
void ovsrec_port_add_clause_rstp_statistics(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_rstp_statistics, const int64_t *value_rstp_statistics, size_t n_rstp_statistics);
4707
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4708
void ovsrec_port_update_rstp_status_setkey(const struct ovsrec_port *,  const char *, const char *);
4709
void ovsrec_port_update_rstp_status_delkey(const struct ovsrec_port *,  const char *);
4710
void ovsrec_port_add_clause_rstp_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4711
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4712
void ovsrec_port_update_statistics_setkey(const struct ovsrec_port *,  const char *, int64_t );
4713
void ovsrec_port_update_statistics_delkey(const struct ovsrec_port *,  const char *);
4714
void ovsrec_port_add_clause_statistics(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
4715
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4716
void ovsrec_port_update_status_setkey(const struct ovsrec_port *,  const char *, const char *);
4717
void ovsrec_port_update_status_delkey(const struct ovsrec_port *,  const char *);
4718
void ovsrec_port_add_clause_status(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4719
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4720
void ovsrec_port_update_tag_addvalue(const struct ovsrec_port *,  int64_t );
4721
void ovsrec_port_update_tag_delvalue(const struct ovsrec_port *,  int64_t );
4722
void ovsrec_port_add_clause_tag(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *tag, size_t n_tag);
4723
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4724
void ovsrec_port_update_trunks_addvalue(const struct ovsrec_port *,  int64_t );
4725
void ovsrec_port_update_trunks_delvalue(const struct ovsrec_port *,  int64_t );
4726
void ovsrec_port_add_clause_trunks(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *trunks, size_t n_trunks);
4727
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4728
void ovsrec_port_update_vlan_mode_addvalue(const struct ovsrec_port *,  const char *);
4729
void ovsrec_port_update_vlan_mode_delvalue(const struct ovsrec_port *,  const char *);
4730
void ovsrec_port_add_clause_vlan_mode(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *vlan_mode);
4731
unsigned int ovsrec_port_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4732
4733
struct ovsrec_port *ovsrec_port_index_init_row(struct ovsdb_idl_index *);
4734
void ovsrec_port_index_set_bond_active_slave(const struct ovsrec_port *,
4735
const char *bond_active_slave);
4736
void ovsrec_port_index_set_bond_downdelay(const struct ovsrec_port *,
4737
int64_t bond_downdelay);
4738
void ovsrec_port_index_set_bond_fake_iface(const struct ovsrec_port *,
4739
bool bond_fake_iface);
4740
void ovsrec_port_index_set_bond_mode(const struct ovsrec_port *,
4741
const char *bond_mode);
4742
void ovsrec_port_index_set_bond_updelay(const struct ovsrec_port *,
4743
int64_t bond_updelay);
4744
void ovsrec_port_index_set_cvlans(const struct ovsrec_port *,
4745
const int64_t *cvlans, size_t n_cvlans);
4746
void ovsrec_port_index_set_external_ids(const struct ovsrec_port *,
4747
const struct smap *);
4748
void ovsrec_port_index_set_fake_bridge(const struct ovsrec_port *,
4749
bool fake_bridge);
4750
void ovsrec_port_index_set_interfaces(const struct ovsrec_port *,
4751
struct ovsrec_interface **interfaces, size_t n_interfaces);
4752
void ovsrec_port_index_set_lacp(const struct ovsrec_port *,
4753
const char *lacp);
4754
void ovsrec_port_index_set_mac(const struct ovsrec_port *,
4755
const char *mac);
4756
void ovsrec_port_index_set_name(const struct ovsrec_port *,
4757
const char *name);
4758
void ovsrec_port_index_set_other_config(const struct ovsrec_port *,
4759
const struct smap *);
4760
void ovsrec_port_index_set_protected_(const struct ovsrec_port *,
4761
bool protected_);
4762
void ovsrec_port_index_set_qos(const struct ovsrec_port *,
4763
const struct ovsrec_qos *qos);
4764
void ovsrec_port_index_set_rstp_statistics(const struct ovsrec_port *,
4765
const char **key_rstp_statistics, const int64_t *value_rstp_statistics, size_t n_rstp_statistics);
4766
void ovsrec_port_index_set_rstp_status(const struct ovsrec_port *,
4767
const struct smap *);
4768
void ovsrec_port_index_set_statistics(const struct ovsrec_port *,
4769
const char **key_statistics, const int64_t *value_statistics, size_t n_statistics);
4770
void ovsrec_port_index_set_status(const struct ovsrec_port *,
4771
const struct smap *);
4772
void ovsrec_port_index_set_tag(const struct ovsrec_port *,
4773
const int64_t *tag, size_t n_tag);
4774
void ovsrec_port_index_set_trunks(const struct ovsrec_port *,
4775
const int64_t *trunks, size_t n_trunks);
4776
void ovsrec_port_index_set_vlan_mode(const struct ovsrec_port *,
4777
const char *vlan_mode);
4778

4779
/* QoS table. */
4780
struct ovsrec_qos {
4781
  struct ovsdb_idl_row header_;
4782
4783
  /* external_ids column. */
4784
  struct smap external_ids;
4785
4786
  /* other_config column. */
4787
  struct smap other_config;
4788
4789
  /* queues column. */
4790
  int64_t *key_queues;
4791
  struct ovsrec_queue **value_queues;
4792
  size_t n_queues;
4793
4794
  /* type column. */
4795
  char *type; /* Always nonnull. */
4796
};
4797
4798
enum ovsrec_qos_column_id {
4799
    OVSREC_QOS_COL_EXTERNAL_IDS,
4800
    OVSREC_QOS_COL_OTHER_CONFIG,
4801
    OVSREC_QOS_COL_QUEUES,
4802
    OVSREC_QOS_COL_TYPE,
4803
    OVSREC_QOS_N_COLUMNS
4804
};
4805
4806
0
#define ovsrec_qos_col_external_ids (ovsrec_qos_columns[OVSREC_QOS_COL_EXTERNAL_IDS])
4807
0
#define ovsrec_qos_col_other_config (ovsrec_qos_columns[OVSREC_QOS_COL_OTHER_CONFIG])
4808
0
#define ovsrec_qos_col_queues (ovsrec_qos_columns[OVSREC_QOS_COL_QUEUES])
4809
0
#define ovsrec_qos_col_type (ovsrec_qos_columns[OVSREC_QOS_COL_TYPE])
4810
4811
extern struct ovsdb_idl_column ovsrec_qos_columns[OVSREC_QOS_N_COLUMNS];
4812
bool ovsrec_server_has_qos_table_col_external_ids(const struct ovsdb_idl *); 
4813
bool ovsrec_server_has_qos_table_col_other_config(const struct ovsdb_idl *); 
4814
bool ovsrec_server_has_qos_table_col_queues(const struct ovsdb_idl *); 
4815
bool ovsrec_server_has_qos_table_col_type(const struct ovsdb_idl *); 
4816
4817
bool ovsrec_server_has_qos_table(const struct ovsdb_idl *);
4818
const struct ovsrec_qos_table *ovsrec_qos_table_get(const struct ovsdb_idl *);
4819
const struct ovsrec_qos *ovsrec_qos_table_first(const struct ovsrec_qos_table *);
4820
4821
#define OVSREC_QOS_TABLE_FOR_EACH(ROW, TABLE) \
4822
        for ((ROW) = ovsrec_qos_table_first(TABLE); \
4823
             (ROW); \
4824
             (ROW) = ovsrec_qos_next(ROW))
4825
#define OVSREC_QOS_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
4826
        for ((ROW) = ovsrec_qos_table_first(TABLE); \
4827
             (ROW) ? ((NEXT) = ovsrec_qos_next(ROW), 1) : 0; \
4828
             (ROW) = (NEXT))
4829
#define OVSREC_QOS_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
4830
        for (const struct ovsrec_qos * ROW__next = ((ROW) = ovsrec_qos_table_first(TABLE), NULL); \
4831
             (ROW) ? (ROW__next = ovsrec_qos_next(ROW), 1) : (ROW__next = NULL, 0); \
4832
             (ROW) = ROW__next)
4833
#define OVSREC_QOS_TABLE_FOR_EACH_SAFE(...)                                        \
4834
        OVERLOAD_SAFE_MACRO(OVSREC_QOS_TABLE_FOR_EACH_SAFE_LONG,                   \
4835
                            OVSREC_QOS_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4836
4837
4838
const struct ovsrec_qos *ovsrec_qos_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
4839
const struct ovsrec_qos *ovsrec_qos_table_get_for_uuid(const struct ovsrec_qos_table *, const struct uuid *);
4840
const struct ovsrec_qos *ovsrec_qos_first(const struct ovsdb_idl *);
4841
const struct ovsrec_qos *ovsrec_qos_next(const struct ovsrec_qos *);
4842
#define OVSREC_QOS_FOR_EACH(ROW, IDL) \
4843
        for ((ROW) = ovsrec_qos_first(IDL); \
4844
             (ROW); \
4845
             (ROW) = ovsrec_qos_next(ROW))
4846
#define OVSREC_QOS_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
4847
        for ((ROW) = ovsrec_qos_first(IDL); \
4848
             (ROW) ? ((NEXT) = ovsrec_qos_next(ROW), 1) : 0; \
4849
             (ROW) = (NEXT))
4850
#define OVSREC_QOS_FOR_EACH_SAFE_SHORT(ROW, IDL) \
4851
        for (const struct ovsrec_qos * ROW__next = ((ROW) = ovsrec_qos_first(IDL), NULL); \
4852
             (ROW) ? (ROW__next = ovsrec_qos_next(ROW), 1) : (ROW__next = NULL, 0); \
4853
             (ROW) = ROW__next)
4854
#define OVSREC_QOS_FOR_EACH_SAFE(...)                                         \
4855
        OVERLOAD_SAFE_MACRO(OVSREC_QOS_FOR_EACH_SAFE_LONG,                    \
4856
                            OVSREC_QOS_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
4857
4858
unsigned int ovsrec_qos_get_seqno(const struct ovsdb_idl *);
4859
unsigned int ovsrec_qos_row_get_seqno(const struct ovsrec_qos *row, enum ovsdb_idl_change change);
4860
const struct ovsrec_qos *ovsrec_qos_track_get_first(const struct ovsdb_idl *);
4861
const struct ovsrec_qos *ovsrec_qos_track_get_next(const struct ovsrec_qos *);
4862
#define OVSREC_QOS_FOR_EACH_TRACKED(ROW, IDL) \
4863
        for ((ROW) = ovsrec_qos_track_get_first(IDL); \
4864
             (ROW); \
4865
             (ROW) = ovsrec_qos_track_get_next(ROW))
4866
4867
const struct ovsrec_qos *ovsrec_qos_table_track_get_first(const struct ovsrec_qos_table *);
4868
#define OVSREC_QOS_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
4869
        for ((ROW) = ovsrec_qos_table_track_get_first(TABLE); \
4870
             (ROW); \
4871
             (ROW) = ovsrec_qos_track_get_next(ROW))
4872
4873
4874
/* Returns true if 'row' was inserted since the last change tracking reset.
4875
 *
4876
 * Note: This can only be used to test rows of tracked changes. This cannot be
4877
 * used to test if an uncommitted row that has been added locally is new or it
4878
 * may given unexpected results. */
4879
static inline bool ovsrec_qos_is_new(const struct ovsrec_qos *row)
4880
0
{
4881
0
    return ovsrec_qos_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
4882
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_qos_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_qos_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_qos_is_new
4883
4884
/* Returns true if 'row' was deleted since the last change tracking reset.
4885
 *
4886
 * Note: This can only be used to test rows of tracked changes. This cannot be
4887
 * used to test if an uncommitted row that has been added locally has been
4888
 * deleted or it may given unexpected results. */
4889
static inline bool ovsrec_qos_is_deleted(const struct ovsrec_qos *row)
4890
0
{
4891
0
    return ovsrec_qos_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
4892
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_qos_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_qos_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_qos_is_deleted
4893
4894
void ovsrec_qos_index_destroy_row(const struct ovsrec_qos *);
4895
4896
struct ovsrec_qos *ovsrec_qos_index_find(struct ovsdb_idl_index *, const struct ovsrec_qos *);
4897
4898
int ovsrec_qos_index_compare(
4899
    struct ovsdb_idl_index *, 
4900
    const struct ovsrec_qos *, 
4901
    const struct ovsrec_qos *);
4902
struct ovsdb_idl_cursor ovsrec_qos_cursor_first(struct ovsdb_idl_index *);
4903
struct ovsdb_idl_cursor ovsrec_qos_cursor_first_eq(
4904
    struct ovsdb_idl_index *, const struct ovsrec_qos *);
4905
struct ovsdb_idl_cursor ovsrec_qos_cursor_first_ge(
4906
    struct ovsdb_idl_index *, const struct ovsrec_qos *);
4907
4908
struct ovsrec_qos *ovsrec_qos_cursor_data(struct ovsdb_idl_cursor *);
4909
4910
#define OVSREC_QOS_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
4911
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_qos_cursor_first_ge(INDEX, FROM); \
4912
             (cursor__.position \
4913
              && ((ROW) = ovsrec_qos_cursor_data(&cursor__), \
4914
                  !(TO) || ovsrec_qos_index_compare(INDEX, ROW, TO) <= 0)); \
4915
             ovsdb_idl_cursor_next(&cursor__))
4916
#define OVSREC_QOS_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
4917
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_qos_cursor_first_eq(INDEX, KEY); \
4918
             (cursor__.position \
4919
              ? ((ROW) = ovsrec_qos_cursor_data(&cursor__), \
4920
                 ovsdb_idl_cursor_next_eq(&cursor__), \
4921
                 true) \
4922
              : false); \
4923
            )
4924
#define OVSREC_QOS_FOR_EACH_BYINDEX(ROW, INDEX) \
4925
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_qos_cursor_first(INDEX); \
4926
             (cursor__.position \
4927
              ? ((ROW) = ovsrec_qos_cursor_data(&cursor__), \
4928
                 ovsdb_idl_cursor_next(&cursor__), \
4929
                 true) \
4930
              : false); \
4931
            )
4932
4933
void ovsrec_qos_init(struct ovsrec_qos *);
4934
void ovsrec_qos_delete(const struct ovsrec_qos *);
4935
struct ovsrec_qos *ovsrec_qos_insert(struct ovsdb_idl_txn *);
4936
struct ovsrec_qos *ovsrec_qos_insert_persist_uuid(
4937
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
4938
4939
/* Returns true if the tracked column referenced by 'enum ovsrec_qos_column_id' of
4940
 * the row referenced by 'struct ovsrec_qos *' was updated since the last change
4941
 * tracking reset.
4942
 *
4943
 * Note: This can only be used to test rows of tracked changes. This cannot be
4944
 * used to test if an uncommitted row that has been added locally has been
4945
 * updated or it may given unexpected results. */
4946
bool ovsrec_qos_is_updated(const struct ovsrec_qos *, enum ovsrec_qos_column_id);
4947
4948
void ovsrec_qos_verify_external_ids(const struct ovsrec_qos *);
4949
void ovsrec_qos_verify_other_config(const struct ovsrec_qos *);
4950
void ovsrec_qos_verify_queues(const struct ovsrec_qos *);
4951
void ovsrec_qos_verify_type(const struct ovsrec_qos *);
4952
4953
const struct ovsdb_datum *ovsrec_qos_get_external_ids(const struct ovsrec_qos *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4954
const struct ovsdb_datum *ovsrec_qos_get_other_config(const struct ovsrec_qos *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4955
const struct ovsdb_datum *ovsrec_qos_get_queues(const struct ovsrec_qos *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
4956
const struct ovsdb_datum *ovsrec_qos_get_type(const struct ovsrec_qos *, enum ovsdb_atomic_type key_type);
4957
4958
void ovsrec_qos_set_external_ids(const struct ovsrec_qos *, const struct smap *);
4959
void ovsrec_qos_set_other_config(const struct ovsrec_qos *, const struct smap *);
4960
void ovsrec_qos_set_queues(const struct ovsrec_qos *, const int64_t *key_queues, struct ovsrec_queue **value_queues, size_t n_queues);
4961
void ovsrec_qos_set_type(const struct ovsrec_qos *, const char *type);
4962
4963
void ovsrec_qos_update_external_ids_setkey(const struct ovsrec_qos *,  const char *, const char *);
4964
void ovsrec_qos_update_external_ids_delkey(const struct ovsrec_qos *,  const char *);
4965
void ovsrec_qos_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4966
unsigned int ovsrec_qos_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4967
void ovsrec_qos_update_other_config_setkey(const struct ovsrec_qos *,  const char *, const char *);
4968
void ovsrec_qos_update_other_config_delkey(const struct ovsrec_qos *,  const char *);
4969
void ovsrec_qos_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
4970
unsigned int ovsrec_qos_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4971
void ovsrec_qos_update_queues_setkey(const struct ovsrec_qos *,  int64_t , const struct ovsrec_queue *);
4972
void ovsrec_qos_update_queues_delkey(const struct ovsrec_qos *,  int64_t );
4973
void ovsrec_qos_add_clause_queues(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *key_queues, struct uuid **value_queues, size_t n_queues);
4974
unsigned int ovsrec_qos_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4975
void ovsrec_qos_add_clause_type(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *type);
4976
unsigned int ovsrec_qos_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
4977
4978
struct ovsrec_qos *ovsrec_qos_index_init_row(struct ovsdb_idl_index *);
4979
void ovsrec_qos_index_set_external_ids(const struct ovsrec_qos *,
4980
const struct smap *);
4981
void ovsrec_qos_index_set_other_config(const struct ovsrec_qos *,
4982
const struct smap *);
4983
void ovsrec_qos_index_set_queues(const struct ovsrec_qos *,
4984
const int64_t *key_queues, struct ovsrec_queue **value_queues, size_t n_queues);
4985
void ovsrec_qos_index_set_type(const struct ovsrec_qos *,
4986
const char *type);
4987

4988
/* Queue table. */
4989
struct ovsrec_queue {
4990
  struct ovsdb_idl_row header_;
4991
4992
  /* dscp column. */
4993
  int64_t *dscp;
4994
  size_t n_dscp;
4995
4996
  /* external_ids column. */
4997
  struct smap external_ids;
4998
4999
  /* other_config column. */
5000
  struct smap other_config;
5001
};
5002
5003
enum ovsrec_queue_column_id {
5004
    OVSREC_QUEUE_COL_DSCP,
5005
    OVSREC_QUEUE_COL_EXTERNAL_IDS,
5006
    OVSREC_QUEUE_COL_OTHER_CONFIG,
5007
    OVSREC_QUEUE_N_COLUMNS
5008
};
5009
5010
0
#define ovsrec_queue_col_dscp (ovsrec_queue_columns[OVSREC_QUEUE_COL_DSCP])
5011
0
#define ovsrec_queue_col_external_ids (ovsrec_queue_columns[OVSREC_QUEUE_COL_EXTERNAL_IDS])
5012
0
#define ovsrec_queue_col_other_config (ovsrec_queue_columns[OVSREC_QUEUE_COL_OTHER_CONFIG])
5013
5014
extern struct ovsdb_idl_column ovsrec_queue_columns[OVSREC_QUEUE_N_COLUMNS];
5015
bool ovsrec_server_has_queue_table_col_dscp(const struct ovsdb_idl *); 
5016
bool ovsrec_server_has_queue_table_col_external_ids(const struct ovsdb_idl *); 
5017
bool ovsrec_server_has_queue_table_col_other_config(const struct ovsdb_idl *); 
5018
5019
bool ovsrec_server_has_queue_table(const struct ovsdb_idl *);
5020
const struct ovsrec_queue_table *ovsrec_queue_table_get(const struct ovsdb_idl *);
5021
const struct ovsrec_queue *ovsrec_queue_table_first(const struct ovsrec_queue_table *);
5022
5023
#define OVSREC_QUEUE_TABLE_FOR_EACH(ROW, TABLE) \
5024
        for ((ROW) = ovsrec_queue_table_first(TABLE); \
5025
             (ROW); \
5026
             (ROW) = ovsrec_queue_next(ROW))
5027
#define OVSREC_QUEUE_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
5028
        for ((ROW) = ovsrec_queue_table_first(TABLE); \
5029
             (ROW) ? ((NEXT) = ovsrec_queue_next(ROW), 1) : 0; \
5030
             (ROW) = (NEXT))
5031
#define OVSREC_QUEUE_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
5032
        for (const struct ovsrec_queue * ROW__next = ((ROW) = ovsrec_queue_table_first(TABLE), NULL); \
5033
             (ROW) ? (ROW__next = ovsrec_queue_next(ROW), 1) : (ROW__next = NULL, 0); \
5034
             (ROW) = ROW__next)
5035
#define OVSREC_QUEUE_TABLE_FOR_EACH_SAFE(...)                                        \
5036
        OVERLOAD_SAFE_MACRO(OVSREC_QUEUE_TABLE_FOR_EACH_SAFE_LONG,                   \
5037
                            OVSREC_QUEUE_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5038
5039
5040
const struct ovsrec_queue *ovsrec_queue_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
5041
const struct ovsrec_queue *ovsrec_queue_table_get_for_uuid(const struct ovsrec_queue_table *, const struct uuid *);
5042
const struct ovsrec_queue *ovsrec_queue_first(const struct ovsdb_idl *);
5043
const struct ovsrec_queue *ovsrec_queue_next(const struct ovsrec_queue *);
5044
#define OVSREC_QUEUE_FOR_EACH(ROW, IDL) \
5045
        for ((ROW) = ovsrec_queue_first(IDL); \
5046
             (ROW); \
5047
             (ROW) = ovsrec_queue_next(ROW))
5048
#define OVSREC_QUEUE_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
5049
        for ((ROW) = ovsrec_queue_first(IDL); \
5050
             (ROW) ? ((NEXT) = ovsrec_queue_next(ROW), 1) : 0; \
5051
             (ROW) = (NEXT))
5052
#define OVSREC_QUEUE_FOR_EACH_SAFE_SHORT(ROW, IDL) \
5053
        for (const struct ovsrec_queue * ROW__next = ((ROW) = ovsrec_queue_first(IDL), NULL); \
5054
             (ROW) ? (ROW__next = ovsrec_queue_next(ROW), 1) : (ROW__next = NULL, 0); \
5055
             (ROW) = ROW__next)
5056
#define OVSREC_QUEUE_FOR_EACH_SAFE(...)                                         \
5057
        OVERLOAD_SAFE_MACRO(OVSREC_QUEUE_FOR_EACH_SAFE_LONG,                    \
5058
                            OVSREC_QUEUE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5059
5060
unsigned int ovsrec_queue_get_seqno(const struct ovsdb_idl *);
5061
unsigned int ovsrec_queue_row_get_seqno(const struct ovsrec_queue *row, enum ovsdb_idl_change change);
5062
const struct ovsrec_queue *ovsrec_queue_track_get_first(const struct ovsdb_idl *);
5063
const struct ovsrec_queue *ovsrec_queue_track_get_next(const struct ovsrec_queue *);
5064
#define OVSREC_QUEUE_FOR_EACH_TRACKED(ROW, IDL) \
5065
        for ((ROW) = ovsrec_queue_track_get_first(IDL); \
5066
             (ROW); \
5067
             (ROW) = ovsrec_queue_track_get_next(ROW))
5068
5069
const struct ovsrec_queue *ovsrec_queue_table_track_get_first(const struct ovsrec_queue_table *);
5070
#define OVSREC_QUEUE_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
5071
        for ((ROW) = ovsrec_queue_table_track_get_first(TABLE); \
5072
             (ROW); \
5073
             (ROW) = ovsrec_queue_track_get_next(ROW))
5074
5075
5076
/* Returns true if 'row' was inserted since the last change tracking reset.
5077
 *
5078
 * Note: This can only be used to test rows of tracked changes. This cannot be
5079
 * used to test if an uncommitted row that has been added locally is new or it
5080
 * may given unexpected results. */
5081
static inline bool ovsrec_queue_is_new(const struct ovsrec_queue *row)
5082
0
{
5083
0
    return ovsrec_queue_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
5084
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_queue_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_queue_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_queue_is_new
5085
5086
/* Returns true if 'row' was deleted since the last change tracking reset.
5087
 *
5088
 * Note: This can only be used to test rows of tracked changes. This cannot be
5089
 * used to test if an uncommitted row that has been added locally has been
5090
 * deleted or it may given unexpected results. */
5091
static inline bool ovsrec_queue_is_deleted(const struct ovsrec_queue *row)
5092
0
{
5093
0
    return ovsrec_queue_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
5094
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_queue_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_queue_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_queue_is_deleted
5095
5096
void ovsrec_queue_index_destroy_row(const struct ovsrec_queue *);
5097
5098
struct ovsrec_queue *ovsrec_queue_index_find(struct ovsdb_idl_index *, const struct ovsrec_queue *);
5099
5100
int ovsrec_queue_index_compare(
5101
    struct ovsdb_idl_index *, 
5102
    const struct ovsrec_queue *, 
5103
    const struct ovsrec_queue *);
5104
struct ovsdb_idl_cursor ovsrec_queue_cursor_first(struct ovsdb_idl_index *);
5105
struct ovsdb_idl_cursor ovsrec_queue_cursor_first_eq(
5106
    struct ovsdb_idl_index *, const struct ovsrec_queue *);
5107
struct ovsdb_idl_cursor ovsrec_queue_cursor_first_ge(
5108
    struct ovsdb_idl_index *, const struct ovsrec_queue *);
5109
5110
struct ovsrec_queue *ovsrec_queue_cursor_data(struct ovsdb_idl_cursor *);
5111
5112
#define OVSREC_QUEUE_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
5113
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_queue_cursor_first_ge(INDEX, FROM); \
5114
             (cursor__.position \
5115
              && ((ROW) = ovsrec_queue_cursor_data(&cursor__), \
5116
                  !(TO) || ovsrec_queue_index_compare(INDEX, ROW, TO) <= 0)); \
5117
             ovsdb_idl_cursor_next(&cursor__))
5118
#define OVSREC_QUEUE_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
5119
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_queue_cursor_first_eq(INDEX, KEY); \
5120
             (cursor__.position \
5121
              ? ((ROW) = ovsrec_queue_cursor_data(&cursor__), \
5122
                 ovsdb_idl_cursor_next_eq(&cursor__), \
5123
                 true) \
5124
              : false); \
5125
            )
5126
#define OVSREC_QUEUE_FOR_EACH_BYINDEX(ROW, INDEX) \
5127
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_queue_cursor_first(INDEX); \
5128
             (cursor__.position \
5129
              ? ((ROW) = ovsrec_queue_cursor_data(&cursor__), \
5130
                 ovsdb_idl_cursor_next(&cursor__), \
5131
                 true) \
5132
              : false); \
5133
            )
5134
5135
void ovsrec_queue_init(struct ovsrec_queue *);
5136
void ovsrec_queue_delete(const struct ovsrec_queue *);
5137
struct ovsrec_queue *ovsrec_queue_insert(struct ovsdb_idl_txn *);
5138
struct ovsrec_queue *ovsrec_queue_insert_persist_uuid(
5139
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
5140
5141
/* Returns true if the tracked column referenced by 'enum ovsrec_queue_column_id' of
5142
 * the row referenced by 'struct ovsrec_queue *' was updated since the last change
5143
 * tracking reset.
5144
 *
5145
 * Note: This can only be used to test rows of tracked changes. This cannot be
5146
 * used to test if an uncommitted row that has been added locally has been
5147
 * updated or it may given unexpected results. */
5148
bool ovsrec_queue_is_updated(const struct ovsrec_queue *, enum ovsrec_queue_column_id);
5149
5150
void ovsrec_queue_verify_dscp(const struct ovsrec_queue *);
5151
void ovsrec_queue_verify_external_ids(const struct ovsrec_queue *);
5152
void ovsrec_queue_verify_other_config(const struct ovsrec_queue *);
5153
5154
const struct ovsdb_datum *ovsrec_queue_get_dscp(const struct ovsrec_queue *, enum ovsdb_atomic_type key_type);
5155
const struct ovsdb_datum *ovsrec_queue_get_external_ids(const struct ovsrec_queue *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
5156
const struct ovsdb_datum *ovsrec_queue_get_other_config(const struct ovsrec_queue *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
5157
5158
void ovsrec_queue_set_dscp(const struct ovsrec_queue *, const int64_t *dscp, size_t n_dscp);
5159
void ovsrec_queue_set_external_ids(const struct ovsrec_queue *, const struct smap *);
5160
void ovsrec_queue_set_other_config(const struct ovsrec_queue *, const struct smap *);
5161
5162
void ovsrec_queue_update_dscp_addvalue(const struct ovsrec_queue *,  int64_t );
5163
void ovsrec_queue_update_dscp_delvalue(const struct ovsrec_queue *,  int64_t );
5164
void ovsrec_queue_add_clause_dscp(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *dscp, size_t n_dscp);
5165
unsigned int ovsrec_queue_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5166
void ovsrec_queue_update_external_ids_setkey(const struct ovsrec_queue *,  const char *, const char *);
5167
void ovsrec_queue_update_external_ids_delkey(const struct ovsrec_queue *,  const char *);
5168
void ovsrec_queue_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
5169
unsigned int ovsrec_queue_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5170
void ovsrec_queue_update_other_config_setkey(const struct ovsrec_queue *,  const char *, const char *);
5171
void ovsrec_queue_update_other_config_delkey(const struct ovsrec_queue *,  const char *);
5172
void ovsrec_queue_add_clause_other_config(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
5173
unsigned int ovsrec_queue_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5174
5175
struct ovsrec_queue *ovsrec_queue_index_init_row(struct ovsdb_idl_index *);
5176
void ovsrec_queue_index_set_dscp(const struct ovsrec_queue *,
5177
const int64_t *dscp, size_t n_dscp);
5178
void ovsrec_queue_index_set_external_ids(const struct ovsrec_queue *,
5179
const struct smap *);
5180
void ovsrec_queue_index_set_other_config(const struct ovsrec_queue *,
5181
const struct smap *);
5182

5183
/* SSL table. */
5184
struct ovsrec_ssl {
5185
  struct ovsdb_idl_row header_;
5186
5187
  /* bootstrap_ca_cert column. */
5188
  bool bootstrap_ca_cert;
5189
5190
  /* ca_cert column. */
5191
  char *ca_cert;  /* Always nonnull. */
5192
5193
  /* certificate column. */
5194
  char *certificate;  /* Always nonnull. */
5195
5196
  /* external_ids column. */
5197
  struct smap external_ids;
5198
5199
  /* private_key column. */
5200
  char *private_key;  /* Always nonnull. */
5201
};
5202
5203
enum ovsrec_ssl_column_id {
5204
    OVSREC_SSL_COL_BOOTSTRAP_CA_CERT,
5205
    OVSREC_SSL_COL_CA_CERT,
5206
    OVSREC_SSL_COL_CERTIFICATE,
5207
    OVSREC_SSL_COL_EXTERNAL_IDS,
5208
    OVSREC_SSL_COL_PRIVATE_KEY,
5209
    OVSREC_SSL_N_COLUMNS
5210
};
5211
5212
0
#define ovsrec_ssl_col_bootstrap_ca_cert (ovsrec_ssl_columns[OVSREC_SSL_COL_BOOTSTRAP_CA_CERT])
5213
0
#define ovsrec_ssl_col_ca_cert (ovsrec_ssl_columns[OVSREC_SSL_COL_CA_CERT])
5214
0
#define ovsrec_ssl_col_certificate (ovsrec_ssl_columns[OVSREC_SSL_COL_CERTIFICATE])
5215
0
#define ovsrec_ssl_col_external_ids (ovsrec_ssl_columns[OVSREC_SSL_COL_EXTERNAL_IDS])
5216
0
#define ovsrec_ssl_col_private_key (ovsrec_ssl_columns[OVSREC_SSL_COL_PRIVATE_KEY])
5217
5218
extern struct ovsdb_idl_column ovsrec_ssl_columns[OVSREC_SSL_N_COLUMNS];
5219
bool ovsrec_server_has_ssl_table_col_bootstrap_ca_cert(const struct ovsdb_idl *); 
5220
bool ovsrec_server_has_ssl_table_col_ca_cert(const struct ovsdb_idl *); 
5221
bool ovsrec_server_has_ssl_table_col_certificate(const struct ovsdb_idl *); 
5222
bool ovsrec_server_has_ssl_table_col_external_ids(const struct ovsdb_idl *); 
5223
bool ovsrec_server_has_ssl_table_col_private_key(const struct ovsdb_idl *); 
5224
5225
bool ovsrec_server_has_ssl_table(const struct ovsdb_idl *);
5226
const struct ovsrec_ssl_table *ovsrec_ssl_table_get(const struct ovsdb_idl *);
5227
const struct ovsrec_ssl *ovsrec_ssl_table_first(const struct ovsrec_ssl_table *);
5228
5229
#define OVSREC_SSL_TABLE_FOR_EACH(ROW, TABLE) \
5230
        for ((ROW) = ovsrec_ssl_table_first(TABLE); \
5231
             (ROW); \
5232
             (ROW) = ovsrec_ssl_next(ROW))
5233
#define OVSREC_SSL_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
5234
        for ((ROW) = ovsrec_ssl_table_first(TABLE); \
5235
             (ROW) ? ((NEXT) = ovsrec_ssl_next(ROW), 1) : 0; \
5236
             (ROW) = (NEXT))
5237
#define OVSREC_SSL_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
5238
        for (const struct ovsrec_ssl * ROW__next = ((ROW) = ovsrec_ssl_table_first(TABLE), NULL); \
5239
             (ROW) ? (ROW__next = ovsrec_ssl_next(ROW), 1) : (ROW__next = NULL, 0); \
5240
             (ROW) = ROW__next)
5241
#define OVSREC_SSL_TABLE_FOR_EACH_SAFE(...)                                        \
5242
        OVERLOAD_SAFE_MACRO(OVSREC_SSL_TABLE_FOR_EACH_SAFE_LONG,                   \
5243
                            OVSREC_SSL_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5244
5245
5246
const struct ovsrec_ssl *ovsrec_ssl_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
5247
const struct ovsrec_ssl *ovsrec_ssl_table_get_for_uuid(const struct ovsrec_ssl_table *, const struct uuid *);
5248
const struct ovsrec_ssl *ovsrec_ssl_first(const struct ovsdb_idl *);
5249
const struct ovsrec_ssl *ovsrec_ssl_next(const struct ovsrec_ssl *);
5250
#define OVSREC_SSL_FOR_EACH(ROW, IDL) \
5251
        for ((ROW) = ovsrec_ssl_first(IDL); \
5252
             (ROW); \
5253
             (ROW) = ovsrec_ssl_next(ROW))
5254
#define OVSREC_SSL_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
5255
        for ((ROW) = ovsrec_ssl_first(IDL); \
5256
             (ROW) ? ((NEXT) = ovsrec_ssl_next(ROW), 1) : 0; \
5257
             (ROW) = (NEXT))
5258
#define OVSREC_SSL_FOR_EACH_SAFE_SHORT(ROW, IDL) \
5259
        for (const struct ovsrec_ssl * ROW__next = ((ROW) = ovsrec_ssl_first(IDL), NULL); \
5260
             (ROW) ? (ROW__next = ovsrec_ssl_next(ROW), 1) : (ROW__next = NULL, 0); \
5261
             (ROW) = ROW__next)
5262
#define OVSREC_SSL_FOR_EACH_SAFE(...)                                         \
5263
        OVERLOAD_SAFE_MACRO(OVSREC_SSL_FOR_EACH_SAFE_LONG,                    \
5264
                            OVSREC_SSL_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5265
5266
unsigned int ovsrec_ssl_get_seqno(const struct ovsdb_idl *);
5267
unsigned int ovsrec_ssl_row_get_seqno(const struct ovsrec_ssl *row, enum ovsdb_idl_change change);
5268
const struct ovsrec_ssl *ovsrec_ssl_track_get_first(const struct ovsdb_idl *);
5269
const struct ovsrec_ssl *ovsrec_ssl_track_get_next(const struct ovsrec_ssl *);
5270
#define OVSREC_SSL_FOR_EACH_TRACKED(ROW, IDL) \
5271
        for ((ROW) = ovsrec_ssl_track_get_first(IDL); \
5272
             (ROW); \
5273
             (ROW) = ovsrec_ssl_track_get_next(ROW))
5274
5275
const struct ovsrec_ssl *ovsrec_ssl_table_track_get_first(const struct ovsrec_ssl_table *);
5276
#define OVSREC_SSL_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
5277
        for ((ROW) = ovsrec_ssl_table_track_get_first(TABLE); \
5278
             (ROW); \
5279
             (ROW) = ovsrec_ssl_track_get_next(ROW))
5280
5281
5282
/* Returns true if 'row' was inserted since the last change tracking reset.
5283
 *
5284
 * Note: This can only be used to test rows of tracked changes. This cannot be
5285
 * used to test if an uncommitted row that has been added locally is new or it
5286
 * may given unexpected results. */
5287
static inline bool ovsrec_ssl_is_new(const struct ovsrec_ssl *row)
5288
0
{
5289
0
    return ovsrec_ssl_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
5290
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ssl_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_ssl_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_ssl_is_new
5291
5292
/* Returns true if 'row' was deleted since the last change tracking reset.
5293
 *
5294
 * Note: This can only be used to test rows of tracked changes. This cannot be
5295
 * used to test if an uncommitted row that has been added locally has been
5296
 * deleted or it may given unexpected results. */
5297
static inline bool ovsrec_ssl_is_deleted(const struct ovsrec_ssl *row)
5298
0
{
5299
0
    return ovsrec_ssl_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
5300
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_ssl_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_ssl_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_ssl_is_deleted
5301
5302
void ovsrec_ssl_index_destroy_row(const struct ovsrec_ssl *);
5303
5304
struct ovsrec_ssl *ovsrec_ssl_index_find(struct ovsdb_idl_index *, const struct ovsrec_ssl *);
5305
5306
int ovsrec_ssl_index_compare(
5307
    struct ovsdb_idl_index *, 
5308
    const struct ovsrec_ssl *, 
5309
    const struct ovsrec_ssl *);
5310
struct ovsdb_idl_cursor ovsrec_ssl_cursor_first(struct ovsdb_idl_index *);
5311
struct ovsdb_idl_cursor ovsrec_ssl_cursor_first_eq(
5312
    struct ovsdb_idl_index *, const struct ovsrec_ssl *);
5313
struct ovsdb_idl_cursor ovsrec_ssl_cursor_first_ge(
5314
    struct ovsdb_idl_index *, const struct ovsrec_ssl *);
5315
5316
struct ovsrec_ssl *ovsrec_ssl_cursor_data(struct ovsdb_idl_cursor *);
5317
5318
#define OVSREC_SSL_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
5319
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ssl_cursor_first_ge(INDEX, FROM); \
5320
             (cursor__.position \
5321
              && ((ROW) = ovsrec_ssl_cursor_data(&cursor__), \
5322
                  !(TO) || ovsrec_ssl_index_compare(INDEX, ROW, TO) <= 0)); \
5323
             ovsdb_idl_cursor_next(&cursor__))
5324
#define OVSREC_SSL_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
5325
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ssl_cursor_first_eq(INDEX, KEY); \
5326
             (cursor__.position \
5327
              ? ((ROW) = ovsrec_ssl_cursor_data(&cursor__), \
5328
                 ovsdb_idl_cursor_next_eq(&cursor__), \
5329
                 true) \
5330
              : false); \
5331
            )
5332
#define OVSREC_SSL_FOR_EACH_BYINDEX(ROW, INDEX) \
5333
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_ssl_cursor_first(INDEX); \
5334
             (cursor__.position \
5335
              ? ((ROW) = ovsrec_ssl_cursor_data(&cursor__), \
5336
                 ovsdb_idl_cursor_next(&cursor__), \
5337
                 true) \
5338
              : false); \
5339
            )
5340
5341
void ovsrec_ssl_init(struct ovsrec_ssl *);
5342
void ovsrec_ssl_delete(const struct ovsrec_ssl *);
5343
struct ovsrec_ssl *ovsrec_ssl_insert(struct ovsdb_idl_txn *);
5344
struct ovsrec_ssl *ovsrec_ssl_insert_persist_uuid(
5345
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
5346
5347
/* Returns true if the tracked column referenced by 'enum ovsrec_ssl_column_id' of
5348
 * the row referenced by 'struct ovsrec_ssl *' was updated since the last change
5349
 * tracking reset.
5350
 *
5351
 * Note: This can only be used to test rows of tracked changes. This cannot be
5352
 * used to test if an uncommitted row that has been added locally has been
5353
 * updated or it may given unexpected results. */
5354
bool ovsrec_ssl_is_updated(const struct ovsrec_ssl *, enum ovsrec_ssl_column_id);
5355
5356
void ovsrec_ssl_verify_bootstrap_ca_cert(const struct ovsrec_ssl *);
5357
void ovsrec_ssl_verify_ca_cert(const struct ovsrec_ssl *);
5358
void ovsrec_ssl_verify_certificate(const struct ovsrec_ssl *);
5359
void ovsrec_ssl_verify_external_ids(const struct ovsrec_ssl *);
5360
void ovsrec_ssl_verify_private_key(const struct ovsrec_ssl *);
5361
5362
const struct ovsdb_datum *ovsrec_ssl_get_bootstrap_ca_cert(const struct ovsrec_ssl *, enum ovsdb_atomic_type key_type);
5363
const struct ovsdb_datum *ovsrec_ssl_get_ca_cert(const struct ovsrec_ssl *, enum ovsdb_atomic_type key_type);
5364
const struct ovsdb_datum *ovsrec_ssl_get_certificate(const struct ovsrec_ssl *, enum ovsdb_atomic_type key_type);
5365
const struct ovsdb_datum *ovsrec_ssl_get_external_ids(const struct ovsrec_ssl *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
5366
const struct ovsdb_datum *ovsrec_ssl_get_private_key(const struct ovsrec_ssl *, enum ovsdb_atomic_type key_type);
5367
5368
void ovsrec_ssl_set_bootstrap_ca_cert(const struct ovsrec_ssl *, bool bootstrap_ca_cert);
5369
void ovsrec_ssl_set_ca_cert(const struct ovsrec_ssl *, const char *ca_cert);
5370
void ovsrec_ssl_set_certificate(const struct ovsrec_ssl *, const char *certificate);
5371
void ovsrec_ssl_set_external_ids(const struct ovsrec_ssl *, const struct smap *);
5372
void ovsrec_ssl_set_private_key(const struct ovsrec_ssl *, const char *private_key);
5373
5374
void ovsrec_ssl_add_clause_bootstrap_ca_cert(struct ovsdb_idl_condition *, enum ovsdb_function function, bool bootstrap_ca_cert);
5375
unsigned int ovsrec_ssl_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5376
void ovsrec_ssl_add_clause_ca_cert(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *ca_cert);
5377
unsigned int ovsrec_ssl_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5378
void ovsrec_ssl_add_clause_certificate(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *certificate);
5379
unsigned int ovsrec_ssl_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5380
void ovsrec_ssl_update_external_ids_setkey(const struct ovsrec_ssl *,  const char *, const char *);
5381
void ovsrec_ssl_update_external_ids_delkey(const struct ovsrec_ssl *,  const char *);
5382
void ovsrec_ssl_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
5383
unsigned int ovsrec_ssl_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5384
void ovsrec_ssl_add_clause_private_key(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *private_key);
5385
unsigned int ovsrec_ssl_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5386
5387
struct ovsrec_ssl *ovsrec_ssl_index_init_row(struct ovsdb_idl_index *);
5388
void ovsrec_ssl_index_set_bootstrap_ca_cert(const struct ovsrec_ssl *,
5389
bool bootstrap_ca_cert);
5390
void ovsrec_ssl_index_set_ca_cert(const struct ovsrec_ssl *,
5391
const char *ca_cert);
5392
void ovsrec_ssl_index_set_certificate(const struct ovsrec_ssl *,
5393
const char *certificate);
5394
void ovsrec_ssl_index_set_external_ids(const struct ovsrec_ssl *,
5395
const struct smap *);
5396
void ovsrec_ssl_index_set_private_key(const struct ovsrec_ssl *,
5397
const char *private_key);
5398

5399
/* sFlow table. */
5400
struct ovsrec_sflow {
5401
  struct ovsdb_idl_row header_;
5402
5403
  /* agent column. */
5404
  char *agent;
5405
5406
  /* external_ids column. */
5407
  struct smap external_ids;
5408
5409
  /* header column. */
5410
  int64_t *header;
5411
  size_t n_header;
5412
5413
  /* polling column. */
5414
  int64_t *polling;
5415
  size_t n_polling;
5416
5417
  /* sampling column. */
5418
  int64_t *sampling;
5419
  size_t n_sampling;
5420
5421
  /* targets column. */
5422
  char **targets;
5423
  size_t n_targets;
5424
};
5425
5426
enum ovsrec_sflow_column_id {
5427
    OVSREC_SFLOW_COL_AGENT,
5428
    OVSREC_SFLOW_COL_EXTERNAL_IDS,
5429
    OVSREC_SFLOW_COL_HEADER,
5430
    OVSREC_SFLOW_COL_POLLING,
5431
    OVSREC_SFLOW_COL_SAMPLING,
5432
    OVSREC_SFLOW_COL_TARGETS,
5433
    OVSREC_SFLOW_N_COLUMNS
5434
};
5435
5436
0
#define ovsrec_sflow_col_agent (ovsrec_sflow_columns[OVSREC_SFLOW_COL_AGENT])
5437
0
#define ovsrec_sflow_col_external_ids (ovsrec_sflow_columns[OVSREC_SFLOW_COL_EXTERNAL_IDS])
5438
0
#define ovsrec_sflow_col_header (ovsrec_sflow_columns[OVSREC_SFLOW_COL_HEADER])
5439
0
#define ovsrec_sflow_col_polling (ovsrec_sflow_columns[OVSREC_SFLOW_COL_POLLING])
5440
0
#define ovsrec_sflow_col_sampling (ovsrec_sflow_columns[OVSREC_SFLOW_COL_SAMPLING])
5441
0
#define ovsrec_sflow_col_targets (ovsrec_sflow_columns[OVSREC_SFLOW_COL_TARGETS])
5442
5443
extern struct ovsdb_idl_column ovsrec_sflow_columns[OVSREC_SFLOW_N_COLUMNS];
5444
bool ovsrec_server_has_sflow_table_col_agent(const struct ovsdb_idl *); 
5445
bool ovsrec_server_has_sflow_table_col_external_ids(const struct ovsdb_idl *); 
5446
bool ovsrec_server_has_sflow_table_col_header(const struct ovsdb_idl *); 
5447
bool ovsrec_server_has_sflow_table_col_polling(const struct ovsdb_idl *); 
5448
bool ovsrec_server_has_sflow_table_col_sampling(const struct ovsdb_idl *); 
5449
bool ovsrec_server_has_sflow_table_col_targets(const struct ovsdb_idl *); 
5450
5451
bool ovsrec_server_has_sflow_table(const struct ovsdb_idl *);
5452
const struct ovsrec_sflow_table *ovsrec_sflow_table_get(const struct ovsdb_idl *);
5453
const struct ovsrec_sflow *ovsrec_sflow_table_first(const struct ovsrec_sflow_table *);
5454
5455
#define OVSREC_SFLOW_TABLE_FOR_EACH(ROW, TABLE) \
5456
        for ((ROW) = ovsrec_sflow_table_first(TABLE); \
5457
             (ROW); \
5458
             (ROW) = ovsrec_sflow_next(ROW))
5459
#define OVSREC_SFLOW_TABLE_FOR_EACH_SAFE_LONG(ROW, NEXT, TABLE) \
5460
        for ((ROW) = ovsrec_sflow_table_first(TABLE); \
5461
             (ROW) ? ((NEXT) = ovsrec_sflow_next(ROW), 1) : 0; \
5462
             (ROW) = (NEXT))
5463
#define OVSREC_SFLOW_TABLE_FOR_EACH_SAFE_SHORT(ROW, TABLE) \
5464
        for (const struct ovsrec_sflow * ROW__next = ((ROW) = ovsrec_sflow_table_first(TABLE), NULL); \
5465
             (ROW) ? (ROW__next = ovsrec_sflow_next(ROW), 1) : (ROW__next = NULL, 0); \
5466
             (ROW) = ROW__next)
5467
#define OVSREC_SFLOW_TABLE_FOR_EACH_SAFE(...)                                        \
5468
        OVERLOAD_SAFE_MACRO(OVSREC_SFLOW_TABLE_FOR_EACH_SAFE_LONG,                   \
5469
                            OVSREC_SFLOW_TABLE_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5470
5471
5472
const struct ovsrec_sflow *ovsrec_sflow_get_for_uuid(const struct ovsdb_idl *, const struct uuid *);
5473
const struct ovsrec_sflow *ovsrec_sflow_table_get_for_uuid(const struct ovsrec_sflow_table *, const struct uuid *);
5474
const struct ovsrec_sflow *ovsrec_sflow_first(const struct ovsdb_idl *);
5475
const struct ovsrec_sflow *ovsrec_sflow_next(const struct ovsrec_sflow *);
5476
#define OVSREC_SFLOW_FOR_EACH(ROW, IDL) \
5477
        for ((ROW) = ovsrec_sflow_first(IDL); \
5478
             (ROW); \
5479
             (ROW) = ovsrec_sflow_next(ROW))
5480
#define OVSREC_SFLOW_FOR_EACH_SAFE_LONG(ROW, NEXT, IDL) \
5481
        for ((ROW) = ovsrec_sflow_first(IDL); \
5482
             (ROW) ? ((NEXT) = ovsrec_sflow_next(ROW), 1) : 0; \
5483
             (ROW) = (NEXT))
5484
#define OVSREC_SFLOW_FOR_EACH_SAFE_SHORT(ROW, IDL) \
5485
        for (const struct ovsrec_sflow * ROW__next = ((ROW) = ovsrec_sflow_first(IDL), NULL); \
5486
             (ROW) ? (ROW__next = ovsrec_sflow_next(ROW), 1) : (ROW__next = NULL, 0); \
5487
             (ROW) = ROW__next)
5488
#define OVSREC_SFLOW_FOR_EACH_SAFE(...)                                         \
5489
        OVERLOAD_SAFE_MACRO(OVSREC_SFLOW_FOR_EACH_SAFE_LONG,                    \
5490
                            OVSREC_SFLOW_FOR_EACH_SAFE_SHORT, 3, __VA_ARGS__)
5491
5492
unsigned int ovsrec_sflow_get_seqno(const struct ovsdb_idl *);
5493
unsigned int ovsrec_sflow_row_get_seqno(const struct ovsrec_sflow *row, enum ovsdb_idl_change change);
5494
const struct ovsrec_sflow *ovsrec_sflow_track_get_first(const struct ovsdb_idl *);
5495
const struct ovsrec_sflow *ovsrec_sflow_track_get_next(const struct ovsrec_sflow *);
5496
#define OVSREC_SFLOW_FOR_EACH_TRACKED(ROW, IDL) \
5497
        for ((ROW) = ovsrec_sflow_track_get_first(IDL); \
5498
             (ROW); \
5499
             (ROW) = ovsrec_sflow_track_get_next(ROW))
5500
5501
const struct ovsrec_sflow *ovsrec_sflow_table_track_get_first(const struct ovsrec_sflow_table *);
5502
#define OVSREC_SFLOW_TABLE_FOR_EACH_TRACKED(ROW, TABLE) \
5503
        for ((ROW) = ovsrec_sflow_table_track_get_first(TABLE); \
5504
             (ROW); \
5505
             (ROW) = ovsrec_sflow_track_get_next(ROW))
5506
5507
5508
/* Returns true if 'row' was inserted since the last change tracking reset.
5509
 *
5510
 * Note: This can only be used to test rows of tracked changes. This cannot be
5511
 * used to test if an uncommitted row that has been added locally is new or it
5512
 * may given unexpected results. */
5513
static inline bool ovsrec_sflow_is_new(const struct ovsrec_sflow *row)
5514
0
{
5515
0
    return ovsrec_sflow_row_get_seqno(row, OVSDB_IDL_CHANGE_INSERT) > 0;
5516
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_sflow_is_new
Unexecuted instantiation: dpdk-stub.c:ovsrec_sflow_is_new
Unexecuted instantiation: vswitch-idl.c:ovsrec_sflow_is_new
5517
5518
/* Returns true if 'row' was deleted since the last change tracking reset.
5519
 *
5520
 * Note: This can only be used to test rows of tracked changes. This cannot be
5521
 * used to test if an uncommitted row that has been added locally has been
5522
 * deleted or it may given unexpected results. */
5523
static inline bool ovsrec_sflow_is_deleted(const struct ovsrec_sflow *row)
5524
0
{
5525
0
    return ovsrec_sflow_row_get_seqno(row, OVSDB_IDL_CHANGE_DELETE) > 0;
5526
0
}
Unexecuted instantiation: userspace-tso.c:ovsrec_sflow_is_deleted
Unexecuted instantiation: dpdk-stub.c:ovsrec_sflow_is_deleted
Unexecuted instantiation: vswitch-idl.c:ovsrec_sflow_is_deleted
5527
5528
void ovsrec_sflow_index_destroy_row(const struct ovsrec_sflow *);
5529
5530
struct ovsrec_sflow *ovsrec_sflow_index_find(struct ovsdb_idl_index *, const struct ovsrec_sflow *);
5531
5532
int ovsrec_sflow_index_compare(
5533
    struct ovsdb_idl_index *, 
5534
    const struct ovsrec_sflow *, 
5535
    const struct ovsrec_sflow *);
5536
struct ovsdb_idl_cursor ovsrec_sflow_cursor_first(struct ovsdb_idl_index *);
5537
struct ovsdb_idl_cursor ovsrec_sflow_cursor_first_eq(
5538
    struct ovsdb_idl_index *, const struct ovsrec_sflow *);
5539
struct ovsdb_idl_cursor ovsrec_sflow_cursor_first_ge(
5540
    struct ovsdb_idl_index *, const struct ovsrec_sflow *);
5541
5542
struct ovsrec_sflow *ovsrec_sflow_cursor_data(struct ovsdb_idl_cursor *);
5543
5544
#define OVSREC_SFLOW_FOR_EACH_RANGE(ROW, FROM, TO, INDEX) \
5545
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_sflow_cursor_first_ge(INDEX, FROM); \
5546
             (cursor__.position \
5547
              && ((ROW) = ovsrec_sflow_cursor_data(&cursor__), \
5548
                  !(TO) || ovsrec_sflow_index_compare(INDEX, ROW, TO) <= 0)); \
5549
             ovsdb_idl_cursor_next(&cursor__))
5550
#define OVSREC_SFLOW_FOR_EACH_EQUAL(ROW, KEY, INDEX) \
5551
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_sflow_cursor_first_eq(INDEX, KEY); \
5552
             (cursor__.position \
5553
              ? ((ROW) = ovsrec_sflow_cursor_data(&cursor__), \
5554
                 ovsdb_idl_cursor_next_eq(&cursor__), \
5555
                 true) \
5556
              : false); \
5557
            )
5558
#define OVSREC_SFLOW_FOR_EACH_BYINDEX(ROW, INDEX) \
5559
        for (struct ovsdb_idl_cursor cursor__ = ovsrec_sflow_cursor_first(INDEX); \
5560
             (cursor__.position \
5561
              ? ((ROW) = ovsrec_sflow_cursor_data(&cursor__), \
5562
                 ovsdb_idl_cursor_next(&cursor__), \
5563
                 true) \
5564
              : false); \
5565
            )
5566
5567
void ovsrec_sflow_init(struct ovsrec_sflow *);
5568
void ovsrec_sflow_delete(const struct ovsrec_sflow *);
5569
struct ovsrec_sflow *ovsrec_sflow_insert(struct ovsdb_idl_txn *);
5570
struct ovsrec_sflow *ovsrec_sflow_insert_persist_uuid(
5571
    struct ovsdb_idl_txn *txn, const struct uuid *uuid);
5572
5573
/* Returns true if the tracked column referenced by 'enum ovsrec_sflow_column_id' of
5574
 * the row referenced by 'struct ovsrec_sflow *' was updated since the last change
5575
 * tracking reset.
5576
 *
5577
 * Note: This can only be used to test rows of tracked changes. This cannot be
5578
 * used to test if an uncommitted row that has been added locally has been
5579
 * updated or it may given unexpected results. */
5580
bool ovsrec_sflow_is_updated(const struct ovsrec_sflow *, enum ovsrec_sflow_column_id);
5581
5582
void ovsrec_sflow_verify_agent(const struct ovsrec_sflow *);
5583
void ovsrec_sflow_verify_external_ids(const struct ovsrec_sflow *);
5584
void ovsrec_sflow_verify_header(const struct ovsrec_sflow *);
5585
void ovsrec_sflow_verify_polling(const struct ovsrec_sflow *);
5586
void ovsrec_sflow_verify_sampling(const struct ovsrec_sflow *);
5587
void ovsrec_sflow_verify_targets(const struct ovsrec_sflow *);
5588
5589
const struct ovsdb_datum *ovsrec_sflow_get_agent(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type);
5590
const struct ovsdb_datum *ovsrec_sflow_get_external_ids(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type, enum ovsdb_atomic_type value_type);
5591
const struct ovsdb_datum *ovsrec_sflow_get_header(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type);
5592
const struct ovsdb_datum *ovsrec_sflow_get_polling(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type);
5593
const struct ovsdb_datum *ovsrec_sflow_get_sampling(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type);
5594
const struct ovsdb_datum *ovsrec_sflow_get_targets(const struct ovsrec_sflow *, enum ovsdb_atomic_type key_type);
5595
5596
void ovsrec_sflow_set_agent(const struct ovsrec_sflow *, const char *agent);
5597
void ovsrec_sflow_set_external_ids(const struct ovsrec_sflow *, const struct smap *);
5598
void ovsrec_sflow_set_header(const struct ovsrec_sflow *, const int64_t *header, size_t n_header);
5599
void ovsrec_sflow_set_polling(const struct ovsrec_sflow *, const int64_t *polling, size_t n_polling);
5600
void ovsrec_sflow_set_sampling(const struct ovsrec_sflow *, const int64_t *sampling, size_t n_sampling);
5601
void ovsrec_sflow_set_targets(const struct ovsrec_sflow *, const char **targets, size_t n_targets);
5602
5603
void ovsrec_sflow_update_agent_addvalue(const struct ovsrec_sflow *,  const char *);
5604
void ovsrec_sflow_update_agent_delvalue(const struct ovsrec_sflow *,  const char *);
5605
void ovsrec_sflow_add_clause_agent(struct ovsdb_idl_condition *, enum ovsdb_function function, const char *agent);
5606
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5607
void ovsrec_sflow_update_external_ids_setkey(const struct ovsrec_sflow *,  const char *, const char *);
5608
void ovsrec_sflow_update_external_ids_delkey(const struct ovsrec_sflow *,  const char *);
5609
void ovsrec_sflow_add_clause_external_ids(struct ovsdb_idl_condition *, enum ovsdb_function function, const struct smap *);
5610
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5611
void ovsrec_sflow_update_header_addvalue(const struct ovsrec_sflow *,  int64_t );
5612
void ovsrec_sflow_update_header_delvalue(const struct ovsrec_sflow *,  int64_t );
5613
void ovsrec_sflow_add_clause_header(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *header, size_t n_header);
5614
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5615
void ovsrec_sflow_update_polling_addvalue(const struct ovsrec_sflow *,  int64_t );
5616
void ovsrec_sflow_update_polling_delvalue(const struct ovsrec_sflow *,  int64_t );
5617
void ovsrec_sflow_add_clause_polling(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *polling, size_t n_polling);
5618
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5619
void ovsrec_sflow_update_sampling_addvalue(const struct ovsrec_sflow *,  int64_t );
5620
void ovsrec_sflow_update_sampling_delvalue(const struct ovsrec_sflow *,  int64_t );
5621
void ovsrec_sflow_add_clause_sampling(struct ovsdb_idl_condition *, enum ovsdb_function function, const int64_t *sampling, size_t n_sampling);
5622
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5623
void ovsrec_sflow_update_targets_addvalue(const struct ovsrec_sflow *,  const char *);
5624
void ovsrec_sflow_update_targets_delvalue(const struct ovsrec_sflow *,  const char *);
5625
void ovsrec_sflow_add_clause_targets(struct ovsdb_idl_condition *, enum ovsdb_function function, const char **targets, size_t n_targets);
5626
unsigned int ovsrec_sflow_set_condition(struct ovsdb_idl *, struct ovsdb_idl_condition *);
5627
5628
struct ovsrec_sflow *ovsrec_sflow_index_init_row(struct ovsdb_idl_index *);
5629
void ovsrec_sflow_index_set_agent(const struct ovsrec_sflow *,
5630
const char *agent);
5631
void ovsrec_sflow_index_set_external_ids(const struct ovsrec_sflow *,
5632
const struct smap *);
5633
void ovsrec_sflow_index_set_header(const struct ovsrec_sflow *,
5634
const int64_t *header, size_t n_header);
5635
void ovsrec_sflow_index_set_polling(const struct ovsrec_sflow *,
5636
const int64_t *polling, size_t n_polling);
5637
void ovsrec_sflow_index_set_sampling(const struct ovsrec_sflow *,
5638
const int64_t *sampling, size_t n_sampling);
5639
void ovsrec_sflow_index_set_targets(const struct ovsrec_sflow *,
5640
const char **targets, size_t n_targets);
5641
5642
enum ovsrec_table_id {
5643
    OVSREC_TABLE_AUTOATTACH,
5644
    OVSREC_TABLE_BRIDGE,
5645
    OVSREC_TABLE_CT_TIMEOUT_POLICY,
5646
    OVSREC_TABLE_CT_ZONE,
5647
    OVSREC_TABLE_CONTROLLER,
5648
    OVSREC_TABLE_DATAPATH,
5649
    OVSREC_TABLE_FLOW_SAMPLE_COLLECTOR_SET,
5650
    OVSREC_TABLE_FLOW_TABLE,
5651
    OVSREC_TABLE_IPFIX,
5652
    OVSREC_TABLE_INTERFACE,
5653
    OVSREC_TABLE_MANAGER,
5654
    OVSREC_TABLE_MIRROR,
5655
    OVSREC_TABLE_NETFLOW,
5656
    OVSREC_TABLE_OPEN_VSWITCH,
5657
    OVSREC_TABLE_PORT,
5658
    OVSREC_TABLE_QOS,
5659
    OVSREC_TABLE_QUEUE,
5660
    OVSREC_TABLE_SSL,
5661
    OVSREC_TABLE_SFLOW,
5662
    OVSREC_N_TABLES
5663
};
5664
5665
0
#define ovsrec_table_autoattach (ovsrec_table_classes[OVSREC_TABLE_AUTOATTACH])
5666
0
#define ovsrec_table_bridge (ovsrec_table_classes[OVSREC_TABLE_BRIDGE])
5667
0
#define ovsrec_table_ct_timeout_policy (ovsrec_table_classes[OVSREC_TABLE_CT_TIMEOUT_POLICY])
5668
0
#define ovsrec_table_ct_zone (ovsrec_table_classes[OVSREC_TABLE_CT_ZONE])
5669
0
#define ovsrec_table_controller (ovsrec_table_classes[OVSREC_TABLE_CONTROLLER])
5670
0
#define ovsrec_table_datapath (ovsrec_table_classes[OVSREC_TABLE_DATAPATH])
5671
0
#define ovsrec_table_flow_sample_collector_set (ovsrec_table_classes[OVSREC_TABLE_FLOW_SAMPLE_COLLECTOR_SET])
5672
0
#define ovsrec_table_flow_table (ovsrec_table_classes[OVSREC_TABLE_FLOW_TABLE])
5673
0
#define ovsrec_table_ipfix (ovsrec_table_classes[OVSREC_TABLE_IPFIX])
5674
0
#define ovsrec_table_interface (ovsrec_table_classes[OVSREC_TABLE_INTERFACE])
5675
0
#define ovsrec_table_manager (ovsrec_table_classes[OVSREC_TABLE_MANAGER])
5676
0
#define ovsrec_table_mirror (ovsrec_table_classes[OVSREC_TABLE_MIRROR])
5677
0
#define ovsrec_table_netflow (ovsrec_table_classes[OVSREC_TABLE_NETFLOW])
5678
0
#define ovsrec_table_open_vswitch (ovsrec_table_classes[OVSREC_TABLE_OPEN_VSWITCH])
5679
0
#define ovsrec_table_port (ovsrec_table_classes[OVSREC_TABLE_PORT])
5680
0
#define ovsrec_table_qos (ovsrec_table_classes[OVSREC_TABLE_QOS])
5681
0
#define ovsrec_table_queue (ovsrec_table_classes[OVSREC_TABLE_QUEUE])
5682
0
#define ovsrec_table_ssl (ovsrec_table_classes[OVSREC_TABLE_SSL])
5683
0
#define ovsrec_table_sflow (ovsrec_table_classes[OVSREC_TABLE_SFLOW])
5684
5685
extern struct ovsdb_idl_table_class ovsrec_table_classes[OVSREC_N_TABLES];
5686
5687
extern struct ovsdb_idl_class ovsrec_idl_class;
5688
5689
const char * ovsrec_get_db_version(void);
5690
5691
#ifdef  __cplusplus
5692
}
5693
#endif
5694
5695
#endif /* OVSREC_IDL_HEADER */