datapath-windows: Make VPORT ovs number values smaller than MAXUINT16
[cascardo/ovs.git] / lib / dpctl.h
1 /*
2  * Copyright (c) 2014 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 #ifndef DPCTL_H
17 #define DPCTL_H 1
18
19 #include <stdbool.h>
20
21 #include "compiler.h"
22
23 struct dpctl_params {
24     /* -s, --statistics: Print port/flow statistics? */
25     bool print_statistics;
26
27     /* --clear: Reset existing statistics to zero when modifying a flow? */
28     bool zero_statistics;
29
30     /* --may-create: Allow mod-flows command to create a new flow? */
31     bool may_create;
32
33     /* -m, --more: Increase output verbosity. */
34     int verbosity;
35
36     /* Callback for printing.  This function is called from dpctl_run_command()
37      * to output data.  The 'aux' parameter is set to the 'aux'
38      * member.  The 'error' parameter is true if 'string' is an error
39      * message, false otherwise */
40     void (*output)(void *aux, bool error, const char *string);
41     void *aux;
42
43     /* 'usage' (if != NULL) gets called for the "help" command. */
44     void (*usage)(void *aux);
45 };
46
47 int dpctl_run_command(int argc, const char *argv[],
48                       struct dpctl_params *dpctl_p);
49
50 void dpctl_unixctl_register(void);
51
52 #endif /* dpctl.h */