Various TLS/STUN improvememnts
This commit is contained in:
+22
-4
@@ -90,6 +90,7 @@ static u_int8_t stats_flag = 0, bpf_filter_flag = 0;
|
||||
static u_int8_t file_first_time = 1;
|
||||
#endif
|
||||
u_int8_t human_readeable_string_len = 5;
|
||||
u_int8_t max_num_udp_dissected_pkts = 16 /* 8 is enough for most protocols, Signal requires more */, max_num_tcp_dissected_pkts = 10;
|
||||
static u_int32_t pcap_analysis_duration = (u_int32_t)-1;
|
||||
static u_int16_t decode_tunnels = 0;
|
||||
static u_int16_t num_loops = 1;
|
||||
@@ -341,7 +342,8 @@ static void help(u_int long_help) {
|
||||
#endif
|
||||
"[-f <filter>][-s <duration>][-m <duration>]\n"
|
||||
" [-p <protos>][-l <loops> [-q][-d][-J][-h][-e <len>][-t][-v <level>]\n"
|
||||
" [-n <threads>][-w <file>][-c <file>][-j <file>][-x <file>]\n\n"
|
||||
" [-n <threads>][-w <file>][-c <file>][-j <file>][-x <file>]\n"
|
||||
" [-T <num>][-U <num>]\n\n"
|
||||
"Usage:\n"
|
||||
" -i <file.pcap|device> | Specify a pcap file/playlist to read packets from or a\n"
|
||||
" | device for live capture (comma-separated list)\n"
|
||||
@@ -376,8 +378,13 @@ static void help(u_int long_help) {
|
||||
" | >3 - full debug + dbg_proto = all\n"
|
||||
" -b <file.json> | Specify a file to write port based diagnose statistics\n"
|
||||
" -x <file.json> | Produce bpf filters for specified diagnose file. Use\n"
|
||||
" | this option only for .json files generated with -b flag.\n",
|
||||
human_readeable_string_len);
|
||||
" | this option only for .json files generated with -b flag.\n"
|
||||
" -T <num> | Max number of TCP processed packets before giving up [default: %u]\n"
|
||||
" -U <num> | Max number of UDP processed packets before giving up [default: %u]\n"
|
||||
,
|
||||
human_readeable_string_len,
|
||||
max_num_tcp_dissected_pkts,
|
||||
max_num_udp_dissected_pkts);
|
||||
|
||||
#ifndef WIN32
|
||||
printf("\nExcap (wireshark) options:\n"
|
||||
@@ -584,7 +591,8 @@ static void parseOptions(int argc, char **argv) {
|
||||
}
|
||||
#endif
|
||||
|
||||
while((opt = getopt_long(argc, argv, "e:c:df:g:i:hp:l:s:tv:V:n:j:Jrp:w:q0123:456:7:89:m:b:x:", longopts, &option_idx)) != EOF) {
|
||||
while((opt = getopt_long(argc, argv, "e:c:df:g:i:hp:l:s:tv:V:n:j:Jrp:w:q0123:456:7:89:m:b:x:T:U:",
|
||||
longopts, &option_idx)) != EOF) {
|
||||
#ifdef DEBUG_TRACE
|
||||
if(trace) fprintf(trace, " #### -%c [%s] #### \n", opt, optarg ? optarg : "");
|
||||
#endif
|
||||
@@ -745,6 +753,16 @@ static void parseOptions(int argc, char **argv) {
|
||||
_debug_protocols = strdup(optarg);
|
||||
break;
|
||||
|
||||
case 'T':
|
||||
max_num_tcp_dissected_pkts = atoi(optarg);
|
||||
if(max_num_tcp_dissected_pkts < 3) max_num_tcp_dissected_pkts = 3;
|
||||
break;
|
||||
|
||||
case 'U':
|
||||
max_num_udp_dissected_pkts = atoi(optarg);
|
||||
if(max_num_udp_dissected_pkts < 3) max_num_udp_dissected_pkts = 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
help(0);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user