add option --dev to bind to a specific interface

This commit is contained in:
wangyu-
2018-07-18 02:02:30 -05:00
parent 736c3f46b6
commit fef76af3a5
4 changed files with 42 additions and 14 deletions

View File

@@ -264,6 +264,7 @@ void process_arg(int argc, char *argv[]) //process all options
{"gen-rule", no_argument, 0, 'g'},
{"gen-add", no_argument, 0, 1},
{"debug", no_argument, 0, 1},
{"dev", required_argument, 0, 1},
{"retry-on-error", no_argument, 0, 1},
{"clear", no_argument, 0, 1},
{"simple-rule", no_argument, 0, 1},
@@ -567,6 +568,11 @@ void process_arg(int argc, char *argv[]) //process all options
debug_flag=1;
//enable_log_color=0;
}
else if(strcmp(long_options[option_index].name,"dev")==0)
{
sscanf(optarg,"%s",dev);
//enable_log_color=0;
}
else if(strcmp(long_options[option_index].name,"debug-resend")==0)
{
//debug_resend=1;