version 1.1.2.2, 2010/10/27 13:29:06
|
version 1.1.2.3, 2010/10/27 13:50:03
|
Line 10 extern char compiled[], compiledby[], compilehost[];
|
Line 10 extern char compiled[], compiledby[], compilehost[];
|
static void |
static void |
Usage() |
Usage() |
{ |
{ |
printf( "dWDS - WiFi dynamic WDS service managment for VAP\n" | printf( "-= dWDS =- WiFi dynamic WDS service managment for VAP\n" |
"=== %s === %s@%s ===\n\n" |
"=== %s === %s@%s ===\n\n" |
" Syntax: dwds [options] [interface(s) ...]\n" | " Syntax: dwds [options] <interface|any> [interface [...]]\n" |
"\n" |
"\n" |
"\t-v\t\tVerbose ...\n" |
"\t-v\t\tVerbose ...\n" |
"\t-f\t\tForeground, not demonize process ...\n" |
"\t-f\t\tForeground, not demonize process ...\n" |
Line 26 int
|
Line 26 int
|
main(int argc, char **argv) |
main(int argc, char **argv) |
{ |
{ |
char ch, fg = 0; |
char ch, fg = 0; |
|
|
|
while ((ch = getopt(argc, argv, "hvfc:")) != -1) |
|
switch (ch) { |
|
case 'v': |
|
Verbose++; |
|
break; |
|
case 'f': |
|
fg = 1; |
|
break; |
|
case 'c': |
|
strlcpy(szConfig, optarg, MAXPATHLEN); |
|
break; |
|
case 'h': |
|
default: |
|
Usage(); |
|
return 1; |
|
} |
|
argc -= optind; |
|
argv += optind; |
|
if (!argc) { |
|
printf("Error:: not specified interface for use ...\n"); |
|
Usage(); |
|
return 1; |
|
} |
|
|
return 0; |
return 0; |
} |
} |