1 /* Copyright (c) 2015 Nicira, Inc.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
17 #ifndef OVN_CONTROLLER_VTEP_H
18 #define OVN_CONTROLLER_VTEP_H 1
20 #include "ovn/lib/ovn-sb-idl.h"
25 struct controller_vtep_ctx {
26 struct ovsdb_idl *ovnsb_idl;
27 struct ovsdb_idl_txn *ovnsb_idl_txn;
29 struct ovsdb_idl *vtep_idl;
30 struct ovsdb_idl_txn *vtep_idl_txn;
33 /* VTEP needs what VTEP needs. */
34 #define OVN_SB_ENCAP_TYPE "vxlan"
35 #define VTEP_ENCAP_TYPE "vxlan_over_ipv4"
37 static inline const struct sbrec_chassis *
38 get_chassis_by_name(struct ovsdb_idl *ovnsb_idl, const char *chassis_id)
40 const struct sbrec_chassis *chassis_rec;
42 SBREC_CHASSIS_FOR_EACH(chassis_rec, ovnsb_idl) {
43 if (!strcmp(chassis_rec->name, chassis_id)) {
51 #endif /* ovn/ovn-controller-vtep.h */