]>
git.proxmox.com Git - ovs.git/blob - tests/test-lib.c
2 * Copyright (C) 2014 Cisco Systems, Inc.
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:
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 #include <openvswitch/compiler.h>
22 #include <openvswitch/thread.h>
23 #include <openvswitch/types.h>
24 #include <openvswitch/util.h>
25 #include <openvswitch/vconn.h>
26 #include <openvswitch/vlog.h>
32 ovs_get_program_name(), ovs_get_program_version());
39 printf("%s: Open vSwitch library test utility\n"
40 "usage: %s [OPTIONS] COMMAND [ARG...]\n\n",
41 ovs_get_program_name(), ovs_get_program_name());
47 parse_options(int argc
, char *argv
[])
49 static const struct option long_options
[] = {
50 {"help", no_argument
, NULL
, 'h'},
51 {"version", no_argument
, NULL
, 'V'},
52 {"verbose", optional_argument
, NULL
, 'v'},
55 char *short_options
= "hVv";
60 c
= getopt_long(argc
, argv
, short_options
, long_options
, NULL
);
75 vlog_set_verbosity(optarg
);
88 main(int argc
, char *argv
[])
90 ovs_set_program_name(argv
[0], "1.0");
91 parse_options(argc
, argv
);