mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-25 15:41:26 +00:00
A try at printing version
This commit is contained in:
parent
350aea908b
commit
ae5177d320
18
iodine.c
18
iodine.c
|
@ -117,18 +117,27 @@ extern char *__progname;
|
|||
|
||||
static void
|
||||
usage() {
|
||||
printf("Usage: %s [-f] [-u user] nameserver topdomain\n", __progname);
|
||||
printf("Usage: %s [-v] [-h] [-f] [-u user] nameserver topdomain\n", __progname);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
static void
|
||||
help() {
|
||||
printf("Usage: %s [-f] [-u user] nameserver topdomain\n", __progname);
|
||||
printf("iodine IP over DNS tunneling client\n");
|
||||
printf("Usage: %s [-v] [-h] [-f] [-u user] nameserver topdomain\n", __progname);
|
||||
printf(" -f is to keep running in foreground\n");
|
||||
printf(" -u name to drop privileges and run as user 'name'\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void
|
||||
version() {
|
||||
char *svnver = "$Id$";
|
||||
printf("iodine IP over DNS tunneling client\n");
|
||||
printf("SVN version: %s\n", svnver);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
@ -147,8 +156,11 @@ main(int argc, char **argv)
|
|||
usage();
|
||||
}
|
||||
|
||||
while ((choice = getopt(argc, argv, "fhu:")) != -1) {
|
||||
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
||||
switch(choice) {
|
||||
case 'v':
|
||||
version();
|
||||
break;
|
||||
case 'f':
|
||||
foreground = 1;
|
||||
break;
|
||||
|
|
18
iodined.c
18
iodined.c
|
@ -116,18 +116,27 @@ extern char *__progname;
|
|||
|
||||
static void
|
||||
usage() {
|
||||
printf("Usage: %s [-f] [-u user] topdomain\n", __progname);
|
||||
printf("Usage: %s [-v] [-h] [-f] [-u user] topdomain\n", __progname);
|
||||
exit(2);
|
||||
}
|
||||
|
||||
static void
|
||||
help() {
|
||||
printf("Usage: %s [-f] [-u user] topdomain\n", __progname);
|
||||
printf("iodine IP over DNS tunneling client\n");
|
||||
printf("Usage: %s [-v] [-h] [-f] [-u user] topdomain\n", __progname);
|
||||
printf(" -f to keep running in foreground\n");
|
||||
printf(" -u name to drop privileges and run as user 'name'\n");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void
|
||||
version() {
|
||||
char *svnver = "$Id$";
|
||||
printf("iodine IP over DNS tunneling server\n");
|
||||
printf("SVN version: %s\n", svnver);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
|
@ -146,8 +155,11 @@ main(int argc, char **argv)
|
|||
usage();
|
||||
}
|
||||
|
||||
while ((choice = getopt(argc, argv, "fhu:")) != -1) {
|
||||
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
||||
switch(choice) {
|
||||
case 'v':
|
||||
version();
|
||||
break;
|
||||
case 'f':
|
||||
foreground = 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue