From: Pieter Lexis Date: Fri, 29 Apr 2016 15:07:31 +0000 (+0200) Subject: Add --version to dnstcpbench X-Git-Tag: rec-4.0.0-alpha3~19^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4f20ff95cca061144219d815c267ec568768ee3;p=pdns Add --version to dnstcpbench --- diff --git a/pdns/dnstcpbench.cc b/pdns/dnstcpbench.cc index 5e2aee5df..5f33e26cd 100644 --- a/pdns/dnstcpbench.cc +++ b/pdns/dnstcpbench.cc @@ -184,12 +184,19 @@ static void* worker(void*) return 0; } +void usage(po::options_description &desc) { + cerr<<"Syntax: dnstcpbench REMOTE [PORT] < QUERIES"<(), "source file - if not specified, defaults to stdin") @@ -208,9 +215,14 @@ try po::store(po::command_line_parser(argc, argv).options(alloptions).positional(p).run(), g_vm); po::notify(g_vm); - + + if(g_vm.count("version")) { + cerr<<"dnstcpbench "<(); @@ -222,9 +234,7 @@ try reportAllTypes(); if(g_vm["remote-host"].empty()) { - cerr<<"Syntax: tcpbench remote [port] < queries"<