code refactor for dns resolve; disabled it by default

This commit is contained in:
wangyu-
2018-06-05 11:26:55 -05:00
parent 2c2d897bc2
commit b0976dbee6
7 changed files with 51 additions and 23 deletions

7
misc.h
View File

@@ -20,6 +20,8 @@ extern int mtu_warn;
extern int max_rst_allowed;
extern int max_rst_to_show;
extern int enable_dns_resolve;
const u32_t max_handshake_conn_num=10000;
const u32_t max_ready_conn_num=1000;
@@ -69,9 +71,10 @@ union current_state_t
client_current_state_t client_current_state;
};
extern char local_ip[100], remote_host[100],source_ip[100];//local_ip is for -l option,remote_host for -r option,source for --source-ip
extern char remote_address[max_address_len];
extern char local_ip[100], remote_ip[100],source_ip[100];//local_ip is for -l option,remote_ip for -r option,source for --source-ip
extern u32_t local_ip_uint32,remote_ip_uint32,source_ip_uint32;//convert from last line.
extern int local_port , remote_port,source_port;//similiar to local_ip remote_host,buf for port.source_port=0 indicates --source-port is not enabled
extern int local_port , remote_port,source_port;//similiar to local_ip remote_ip,buf for port.source_port=0 indicates --source-port is not enabled
extern int force_source_ip; //if --source-ip is enabled