mirror of
https://github.com/yarrick/iodine.git
synced 2024-11-30 13:35:09 +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
|
static void
|
||||||
usage() {
|
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);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
help() {
|
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(" -f is to keep running in foreground\n");
|
||||||
printf(" -u name to drop privileges and run as user 'name'\n");
|
printf(" -u name to drop privileges and run as user 'name'\n");
|
||||||
exit(0);
|
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
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@ -147,8 +156,11 @@ main(int argc, char **argv)
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "fhu:")) != -1) {
|
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
|
case 'v':
|
||||||
|
version();
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
foreground = 1;
|
foreground = 1;
|
||||||
break;
|
break;
|
||||||
|
18
iodined.c
18
iodined.c
@ -116,18 +116,27 @@ extern char *__progname;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
usage() {
|
usage() {
|
||||||
printf("Usage: %s [-f] [-u user] topdomain\n", __progname);
|
printf("Usage: %s [-v] [-h] [-f] [-u user] topdomain\n", __progname);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
help() {
|
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(" -f to keep running in foreground\n");
|
||||||
printf(" -u name to drop privileges and run as user 'name'\n");
|
printf(" -u name to drop privileges and run as user 'name'\n");
|
||||||
exit(0);
|
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
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
@ -146,8 +155,11 @@ main(int argc, char **argv)
|
|||||||
usage();
|
usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((choice = getopt(argc, argv, "fhu:")) != -1) {
|
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
|
||||||
switch(choice) {
|
switch(choice) {
|
||||||
|
case 'v':
|
||||||
|
version();
|
||||||
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
foreground = 1;
|
foreground = 1;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user