diff options
author | Luca Deri <deri@ntop.org> | 2021-04-27 08:26:08 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-04-27 08:26:08 +0200 |
commit | dd651420207129a24267c3cb308232752caf6a0d (patch) | |
tree | 0c1c259e8eec9b57522372ac649d4dc50a6409fb | |
parent | 70686249c91d2cd40910fcf136b92474272d5a41 (diff) |
Compilation fix
-rw-r--r-- | example/ndpiReader.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 851203962..806fb4a69 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -57,6 +57,8 @@ #include "reader_util.h" #include "intrusion_detection.h" +#define ntohl64(x) ( ( (uint64_t)(ntohl( (uint32_t)((x << 32) >> 32) )) << 32) | ntohl( ((uint32_t)(x >> 32)) ) ) +#define htonl64(x) ntohl64(x) /** Client parameters **/ @@ -3286,7 +3288,7 @@ static void ndpi_process_packet(u_char *args, memcpy(extcap_buf, packet, h.caplen); memset(trailer, 0, sizeof(struct ndpi_packet_trailer)); trailer->magic = htonl(WIRESHARK_NTOP_MAGIC); - trailer->flow_risk = htonll(flow_risk); + trailer->flow_risk = htonl64(flow_risk); trailer->master_protocol = htons(p.master_protocol), trailer->app_protocol = htons(p.app_protocol); ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct, p, trailer->name, sizeof(trailer->name)); crc = (uint32_t*)&extcap_buf[h.caplen+sizeof(struct ndpi_packet_trailer)]; |