diff --git a/misc.cpp b/misc.cpp index ed5162c..0bce226 100644 --- a/misc.cpp +++ b/misc.cpp @@ -46,6 +46,10 @@ u32_t sub_net_uint32=0; char tun_dev[100]=""; +int keep_reconnect=0; + + + int from_normal_to_fec(conn_info_t & conn_info,char *data,int len,int & out_n,char **&out_arr,int *&out_len,my_time_t *&out_delay) { @@ -567,6 +571,7 @@ void process_arg(int argc, char *argv[]) {"fifo", required_argument, 0, 1}, {"sub-net", required_argument, 0, 1}, {"tun-dev", required_argument, 0, 1}, + {"keep-reconnect", no_argument, 0, 1}, {NULL, 0, 0, 0} }; int option_index = 0; @@ -868,6 +873,11 @@ void process_arg(int argc, char *argv[]) mylog(log_info,"fifo_file =%s \n",fifo_file); } + else if(strcmp(long_options[option_index].name,"keep-reconnect")==0) + { + keep_reconnect=1; + mylog(log_info,"keep_reconnect enabled\n"); + } else if(strcmp(long_options[option_index].name,"sub-net")==0) { sscanf(optarg,"%s",sub_net); diff --git a/misc.h b/misc.h index b3f8a19..7ad236b 100644 --- a/misc.h +++ b/misc.h @@ -46,6 +46,8 @@ extern int time_mono_test; extern int delay_capacity; +extern int keep_reconnect; + int from_normal_to_fec(conn_info_t & conn_info,char *data,int len,int & out_n,char **&out_arr,int *&out_len,my_time_t *&out_delay); int from_fec_to_normal(conn_info_t & conn_info,char *data,int len,int & out_n,char **&out_arr,int *&out_len,my_time_t *&out_delay);