iodined: improve help output format

Standardise output format:
  - remove redundant fprint calls
  - maximum character width: 80 characters (improved readability)
  - add additional newlines

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
Ralf Ramsauer 2017-03-11 01:52:28 -08:00
parent fe0dbccbc5
commit 829a822de3

View file

@ -2307,43 +2307,46 @@ usage() {
static void static void
help() { help() {
fprintf(stderr, "iodine IP over DNS tunneling server\n"); fprintf(stderr, "iodine IP over DNS tunneling server\n\n");
print_usage(); print_usage();
fprintf(stderr, " -v to print version info and exit\n"); fprintf(stderr, "\nAvailable options:\n"
fprintf(stderr, " -h to print this help and exit\n"); " -v to print version info and exit\n"
fprintf(stderr, " -4 to listen only on IPv4\n"); " -h to print this help and exit\n"
fprintf(stderr, " -6 to listen only on IPv6\n"); " -4 to listen only on IPv4\n"
fprintf(stderr, " -c to disable check of client IP/port on each request\n"); " -6 to listen only on IPv6\n"
fprintf(stderr, " -s to skip creating and configuring the tun device, " " -c to disable check of client IP/port on each request\n"
"which then has to be created manually\n"); " -s to skip creating and configuring the tun device,\n"
fprintf(stderr, " -f to keep running in foreground\n"); " which then has to be created manually\n"
fprintf(stderr, " -D to increase debug level\n"); " -f to keep running in foreground\n"
fprintf(stderr, " (using -DD in UTF-8 terminal: \"LC_ALL=C luit iodined -DD ...\")\n"); " -D to increase debug level\n"
fprintf(stderr, " -u name to drop privileges and run as user 'name'\n"); " (using -DD in UTF-8 terminal: \"LC_ALL=C luit iodined -DD ...\")\n"
fprintf(stderr, " -t dir to chroot to directory dir\n"); " -u name to drop privileges and run as user 'name'\n"
fprintf(stderr, " -d device to set tunnel device name\n"); " -t dir to chroot to directory dir\n"
fprintf(stderr, " -m mtu to set tunnel device mtu\n"); " -d device to set tunnel device name\n"
fprintf(stderr, " -z context to apply SELinux context after initialization\n"); " -m mtu to set tunnel device mtu\n"
fprintf(stderr, " -l IPv4 address to listen on for incoming dns traffic " " -z context to apply SELinux context after initialization\n"
"(default 0.0.0.0)\n"); " -l IPv4 address to listen on for incoming dns traffic "
fprintf(stderr, " -L IPv6 address to listen on for incoming dns traffic " "(default 0.0.0.0)\n"
"(default ::)\n"); " -L IPv6 address to listen on for incoming dns traffic "
fprintf(stderr, " -p port to listen on for incoming dns traffic (default 53)\n"); "(default ::)\n"
fprintf(stderr, " -n ip to respond with to NS queries\n"); " -p port to listen on for incoming dns traffic (default 53)\n"
fprintf(stderr, " -b port to forward normal DNS queries to (on localhost)\n"); " -n ip to respond with to NS queries\n"
fprintf(stderr, " -P password used for authentication (max 32 chars will be used)\n"); " -b port to forward normal DNS queries to (on localhost)\n"
fprintf(stderr, " -F pidfile to write pid to a file\n"); " -P password used for authentication (max 32 chars will be used)\n"
fprintf(stderr, " -i maximum idle time before shutting down\n"); " -F pidfile to write pid to a file\n"
fprintf(stderr, "tunnel_ip is the IP number of the local tunnel interface.\n"); " -i maximum idle time before shutting down\n\n"
fprintf(stderr, " /netmask sets the size of the tunnel network.\n"); "tunnel_ip is the IP number of the local tunnel interface.\n"
fprintf(stderr, "topdomain is the FQDN that is delegated to this server.\n"); " /netmask sets the size of the tunnel network.\n"
"topdomain is the FQDN that is delegated to this server.\n");
exit(0); exit(0);
} }
static void static void
version() { version() {
fprintf(stderr, "iodine IP over DNS tunneling server\n"); fprintf(stderr, "iodine IP over DNS tunneling server\n"
fprintf(stderr, "Git version: %s\n", GITREVISION); "Git version: %s\n", GITREVISION);
exit(0); exit(0);
} }