X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=utilities%2Fovs-dpctl.c;h=89a5a60a9421e9281c215adc3be3fbe2a190b932;hb=bdcad671e088d454a807072d07b8314f9860fdbc;hp=94a6b90f214a889081f0d10dc23b5838a8fa5ff4;hpb=270f328621bfd8f80659150d5d3eec51754b5bfb;p=cascardo%2Fovs.git diff --git a/utilities/ovs-dpctl.c b/utilities/ovs-dpctl.c index 94a6b90f2..89a5a60a9 100644 --- a/utilities/ovs-dpctl.c +++ b/utilities/ovs-dpctl.c @@ -40,11 +40,11 @@ #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); } -