]> git.proxmox.com Git - mirror_ovs.git/blob - lib/dummy.h
ovsdb-idl: Fix iteration over tracked rows with no actual data.
[mirror_ovs.git] / lib / dummy.h
1 /*
2 * Copyright (c) 2010, 2011, 2012, 2013, 2015 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain 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,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef DUMMY_H
18 #define DUMMY_H 1
19
20 #include <stdbool.h>
21
22 /* Degree of dummy support.
23 *
24 * Beyond enabling support for dummies, it can be useful to replace some kinds
25 * of bridges and netdevs, or all kinds, by dummies. This enum expresses the
26 * degree to which this should happen. */
27 enum dummy_level {
28 DUMMY_OVERRIDE_NONE, /* Support dummy but don't force its use. */
29 DUMMY_OVERRIDE_SYSTEM, /* Replace "system" by dummy. */
30 DUMMY_OVERRIDE_ALL, /* Replace all types by dummy. */
31 };
32
33 /* For client programs to call directly to enable dummy support. */
34 void dummy_enable(const char *arg);
35
36 /* Implementation details. */
37 void dpif_dummy_register(enum dummy_level);
38 void netdev_dummy_register(enum dummy_level);
39 void timeval_dummy_register(void);
40 void ofpact_dummy_enable(void);
41
42 #endif /* dummy.h */