dpif-netlink: add GENEVE creation support
[cascardo/ovs.git] / lib / ovsdb-map-op.h
1 /* Copyright (C) 2016 Hewlett Packard Enterprise Development LP
2  * All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may
5  * not use this file except in compliance with the License. You may obtain
6  * a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13  * License for the specific language governing permissions and limitations
14  * under the License.
15  */
16
17 #ifndef OVSDB_MAP_OP_H
18 #define OVSDB_MAP_OP_H 1
19
20 #include "ovsdb-data.h"
21
22 enum map_op_type {
23     MAP_OP_UPDATE,
24     MAP_OP_INSERT,
25     MAP_OP_DELETE
26 };
27
28 struct map_op; /* Map Operation: a Partial Map Update */
29 struct map_op_list; /* List of Map Operations */
30
31 /* Map Operation functions */
32 struct map_op *map_op_create(struct ovsdb_datum *, enum map_op_type);
33 void map_op_destroy(struct map_op *, const struct ovsdb_type *);
34 struct ovsdb_datum *map_op_datum(const struct map_op*);
35 enum map_op_type map_op_type(const struct map_op*);
36
37 /* Map Operation List functions */
38 struct map_op_list *map_op_list_create(void);
39 void map_op_list_destroy(struct map_op_list *, const struct ovsdb_type *);
40 void map_op_list_add(struct map_op_list *, struct map_op *,
41                      const struct ovsdb_type *);
42 struct map_op *map_op_list_first(struct map_op_list *);
43 struct map_op *map_op_list_next(struct map_op_list *, struct map_op *);
44
45 #endif /* ovsdb-map-op.h */