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_H
18 #define OVN_CONTROLLER_H 1
21 #include "ovn/lib/ovn-sb-idl.h"
23 /* Linux supports a maximum of 64K zones, which seems like a fine default. */
24 #define MAX_CT_ZONES 65535
26 struct controller_ctx {
27 struct ovsdb_idl *ovnsb_idl;
28 struct ovsdb_idl_txn *ovnsb_idl_txn;
30 struct ovsdb_idl *ovs_idl;
31 struct ovsdb_idl_txn *ovs_idl_txn;
34 const struct ovsrec_bridge *get_bridge(struct ovsdb_idl *,
37 const struct sbrec_chassis *get_chassis(struct ovsdb_idl *,
38 const char *chassis_id);
40 /* Must be a bit-field ordered from most-preferred (higher number) to
41 * least-preferred (lower number). */
42 enum chassis_tunnel_type {
48 uint32_t get_tunnel_type(const char *name);
51 #endif /* ovn/ovn-controller.h */