diff options
author | Campus <campus@ntop.org> | 2016-10-30 01:14:49 +0200 |
---|---|---|
committer | Campus <campus@ntop.org> | 2016-10-30 01:14:49 +0200 |
commit | 097ba22a595f7d5e8f4f58dcd4c3e7e77d71e355 (patch) | |
tree | f04243dab3908a8a8004327ef8d0740fb7f49366 /example/ndpiReader.c | |
parent | b8fb5fb403a48820787ea87bca63acbfd658d31c (diff) |
minor fix to keep same coherence of type used
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index deb61b681..0440a3954 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -283,7 +283,7 @@ static void parseOptions(int argc, char **argv) { /** * @brief From IPPROTO to string NAME */ -static char* ipProto2Name(u_short proto_id) { +static char* ipProto2Name(u_int16_t proto_id) { static char proto[8]; @@ -316,7 +316,7 @@ static char* ipProto2Name(u_short proto_id) { /** * @brief A faster replacement for inet_ntoa(). */ -char* intoaV4(unsigned int addr, char* buf, u_short bufLen) { +char* intoaV4(u_int32_t addr, char* buf, u_int16_t bufLen) { char *cp, *retStr; uint byte; @@ -384,7 +384,7 @@ static void printFlow(u_int16_t thread_id, struct ndpi_flow_info *flow) { ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct, flow->detected_protocol.protocol)); fprintf(out, "[%u pkts/%llu bytes]", - flow->packets, (long long unsigned int)flow->bytes); + flow->packets, (long long unsigned int) flow->bytes); if(flow->host_server_name[0] != '\0') fprintf(out, "[Host: %s]", flow->host_server_name); if(flow->ssl.client_certificate[0] != '\0') fprintf(out, "[SSL client: %s]", flow->ssl.client_certificate); @@ -760,7 +760,7 @@ static void printResults(u_int64_t tot_usec) { u_int32_t i; u_int64_t total_flow_bytes = 0; - u_int avg_pkt_size = 0; + u_int32_t avg_pkt_size = 0; struct ndpi_stats cumulative_stats; int thread_id; char buf[32]; |