Commit 11df0119 authored by 's avatar

Reorderer flow_data struct to suppress differences between 32/64-bit...

Reorderer flow_data struct to suppress differences between 32/64-bit client/server and save space at 64bit. Added ttl of the first packet to flow_data.


git-svn-id: file:///home/svn/mapi/trunk@1349 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 047c01a1
......@@ -3,11 +3,12 @@
#include "protocols.h"
typedef struct flow_data {
u_char ptcl;
unsigned long long timestamp;
unsigned long long packets_count, bytes_count;
ip_addr saddr, daddr;
u_short sport, dport;
unsigned long long timestamp;
u_char ptcl;
u_char ttl_pkt1;
}flow_data;
struct exfl_list_node {
......
......@@ -455,6 +455,7 @@ static int exprflow_process(mapidflib_function_instance_t *instance, MAPI_UNUSED
record.timestamp = data->epoch;
record.ptcl = ip->ptcl;
record.bytes_count = pkt_head->wlen - headerlenoverplus;
record.ttl_pkt1 = ip->ttl;
add_toflow(data, record);
}
//IPPROTO_UDP
......@@ -467,6 +468,7 @@ static int exprflow_process(mapidflib_function_instance_t *instance, MAPI_UNUSED
record.timestamp = data->epoch;
record.ptcl = ip->ptcl;
record.bytes_count = pkt_head->wlen - headerlenoverplus;
record.ttl_pkt1 = ip->ttl;
add_toflow(data,record);
}
//IPPROTO_IP
......@@ -477,6 +479,7 @@ static int exprflow_process(mapidflib_function_instance_t *instance, MAPI_UNUSED
record.timestamp = data->epoch;
record.ptcl = ip->ptcl;
record.bytes_count = pkt_head->wlen - headerlenoverplus;
record.ttl_pkt1 = ip->ttl;
add_toflow(data, record);
}
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment