minor fix to keep same coherence of type used

This commit is contained in:
Campus
2016-10-30 01:14:49 +02:00
parent b8fb5fb403
commit 097ba22a59
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -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];
+1 -1
View File
@@ -748,7 +748,7 @@ void ndpi_workflow_process_packet (struct ndpi_workflow * workflow,
}
if(iph->version == 4) {
ip_len = ((u_short)iph->ihl * 4);
ip_len = ((u_int16_t)iph->ihl * 4);
iph6 = NULL;
if(iph->protocol == 41) {