ovs-ofctl: Merge dump_stats_transaction() into dump_transaction().
[cascardo/ovs.git] / utilities / ovs-dpctl.c
index 94a6b90..89a5a60 100644 (file)
 #include "packets.h"
 #include "timeval.h"
 #include "util.h"
-#include "vlog.h"
+#include "openvswitch/vlog.h"
 
 static struct dpctl_params dpctl_p;
 
-NO_RETURN static void usage(void *userdata OVS_UNUSED);
+OVS_NO_RETURN static void usage(void *userdata OVS_UNUSED);
 static void parse_options(int argc, char *argv[]);
 
 static void
@@ -62,6 +62,7 @@ main(int argc, char *argv[])
     parse_options(argc, argv);
     fatal_ignore_sigpipe();
 
+    dpctl_p.is_appctl = false;
     dpctl_p.output = dpctl_print;
     dpctl_p.usage = usage;
 
@@ -85,11 +86,12 @@ parse_options(int argc, char *argv[])
         {"more", no_argument, NULL, 'm'},
         {"timeout", required_argument, NULL, 't'},
         {"help", no_argument, NULL, 'h'},
+        {"option", no_argument, NULL, 'o'},
         {"version", no_argument, NULL, 'V'},
         VLOG_LONG_OPTIONS,
         {NULL, 0, NULL, 0},
     };
-    char *short_options = long_options_to_short_options(long_options);
+    char *short_options = ovs_cmdl_long_options_to_short_options(long_options);
 
     for (;;) {
         unsigned long int timeout;
@@ -130,6 +132,10 @@ parse_options(int argc, char *argv[])
         case 'h':
             usage(NULL);
 
+        case 'o':
+            ovs_cmdl_print_options(long_options);
+            exit(EXIT_SUCCESS);
+
         case 'V':
             ovs_print_version(0, 0);
             exit(EXIT_SUCCESS);
@@ -162,8 +168,11 @@ usage(void *userdata OVS_UNUSED)
            "  dump-flows [DP]          display flows in DP\n"
            "  add-flow [DP] FLOW ACTIONS add FLOW with ACTIONS to DP\n"
            "  mod-flow [DP] FLOW ACTIONS change FLOW actions to ACTIONS in DP\n"
+           "  get-flow [DP] ufid:UFID    fetch flow corresponding to UFID\n"
            "  del-flow [DP] FLOW         delete FLOW from DP\n"
            "  del-flows [DP]             delete all flows from DP\n"
+           "  dump-conntrack [DP]        display conntrack entries\n"
+           "  flush-conntrack [DP]       delete all conntrack entries\n"
            "Each IFACE on add-dp, add-if, and set-if may be followed by\n"
            "comma-separated options.  See ovs-dpctl(8) for syntax, or the\n"
            "Interface table in ovs-vswitchd.conf.db(5) for an options list.\n"
@@ -184,4 +193,3 @@ usage(void *userdata OVS_UNUSED)
            "  -V, --version               display version information\n");
     exit(EXIT_SUCCESS);
 }
-