Skip to content
Snippets Groups Projects
Commit 49129ec1 authored by Simon Désaulniers's avatar Simon Désaulniers
Browse files

tools: specify optional arg syntax -o[ARG]

parent 80335455
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@
.SH SYNOPSIS
.B dhtnode [-h]
.B dhtnode [-v [\fIlogfile\fP]] [-i] [-d] [-n \fInetwork_id\fP] [-p \fIlocal_port\fP] [-b [\fIbootstrap_host\fP[:\fIport\fP]]]
.B dhtnode [-v[\fIlogfile\fP]] [-i] [-d] [-n \fInetwork_id\fP] [-p \fIlocal_port\fP] [-b[\fIbootstrap_host\fP[:\fIport\fP]]]
.SH DESCRIPTION
......@@ -45,7 +45,7 @@ interactive shell:
Prints some help.
.TP
\fB-v\fP \fIlogfile\fP
\fB-v\fP\fIlogfile\fP
Enable the verbose mode. Optionally provide a log file.
.TP
......@@ -66,7 +66,7 @@ the merge of two different networks (available since OpenDHT v0.6.1).
Use port \fIlocal_port\fP for the program to bind to.
.TP
\fB-b\fP \fIbootstrap_host\fP[:\fIport\fP]
\fB-b\fP\fIbootstrap_host\fP[:\fIport\fP]
The program needs to be given a node to connect to the network. You use this
option to provide the ip address of that node.
......
......@@ -29,7 +29,7 @@ extern "C" {
using namespace dht;
void print_usage() {
std::cout << "Usage: dhtnode [-v [logfile]] [-i] [-d] [-n network_id] [-p local_port] [-b [bootstrap_host[:port]]]" << std::endl << std::endl;
std::cout << "Usage: dhtnode [-v[logfile]] [-i] [-d] [-n network_id] [-p local_port] [-b[bootstrap_host[:port]]]" << std::endl << std::endl;
std::cout << "dhtnode, a simple OpenDHT command line node runner." << std::endl;
std::cout << "Report bugs to: http://opendht.net" << std::endl;
}
......
......@@ -155,7 +155,7 @@ static const constexpr struct option long_options[] = {
{"net", required_argument, nullptr, 'n'},
{"bootstrap", optional_argument, nullptr, 'b'},
{"identity", no_argument , nullptr, 'i'},
{"verbose", no_argument , nullptr, 'v'},
{"verbose", optional_argument, nullptr, 'v'},
{"daemonize", no_argument , nullptr, 'd'},
{nullptr, 0, nullptr, 0}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment