74acdbaa507b3f226ed471736e42796fd8ed374a
[cascardo/ovs.git] / ovsdb / replication.h
1 /*
2  * (c) Copyright 2016 Hewlett Packard Enterprise Development LP
3  * Copyright (c) 2009, 2010, 2012, 2013 Nicira, Inc.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17
18 #ifndef REPLICATION_H
19 #define REPLICATION_H 1
20
21 #include "shash.h"
22
23 struct db {
24     /* Initialized in main(). */
25     char *filename;
26     struct ovsdb_file *file;
27     struct ovsdb *db;
28
29     /* Only used by update_remote_status(). */
30     struct ovsdb_txn *txn;
31 };
32
33 void replication_run(struct shash *dbs);
34 void set_remote_ovsdb_server(const char *remote_server);
35 void set_tables_blacklist(const char *blacklist);
36 void disconnect_remote_server(void);
37 const struct db *find_db(const struct shash *all_dbs, const char *db_name);
38 void replication_usage(void);
39
40 #endif /* ovsdb/replication.h */