"Memcap: %"PRIu64", Hash table size %"PRIu64". Calculate "
"total hash size by multiplying \"flow.hash-size\" with %"PRIuMAX", "
"which is the hash bucket size.", flow_config.memcap, hash_size,
- sizeof(FlowBucket));
+ (uintmax_t)sizeof(FlowBucket));
exit(EXIT_FAILURE);
}
flow_hash = SCCalloc(flow_config.hash_size, sizeof(FlowBucket));
"Memcap: %"PRIu64", Hash table size %"PRIu64". Calculate "
"total hash size by multiplying \"host.hash-size\" with %"PRIuMAX", "
"which is the hash bucket size.", host_config.memcap, hash_size,
- sizeof(HostHashRow));
+ (uintmax_t)sizeof(HostHashRow));
exit(EXIT_FAILURE);
}
host_hash = SCCalloc(host_config.hash_size, sizeof(HostHashRow));
SCPerfCounterIncr(dtv->counter_pkts, tv->sc_perf_pca);
SCPerfCounterIncr(dtv->counter_pkts_per_sec, tv->sc_perf_pca);
- SCPerfCounterAddUI64(dtv->counter_bytes, tv->sc_perf_pca, p->pktlen);
- SCPerfCounterAddDouble(dtv->counter_bytes_per_sec, tv->sc_perf_pca, p->pktlen);
- SCPerfCounterAddDouble(dtv->counter_mbit_per_sec, tv->sc_perf_pca,
- (p->pktlen * 8)/1000000.0);
+ SCPerfCounterAddUI64(dtv->counter_bytes, tv->sc_perf_pca, GET_PKT_LEN(p));
+// SCPerfCounterAddDouble(dtv->counter_bytes_per_sec, tv->sc_perf_pca, GET_PKT_LEN(p));
+// SCPerfCounterAddDouble(dtv->counter_mbit_per_sec, tv->sc_perf_pca,
+// (GET_PKT_LEN(p) * 8)/1000000.0);
- SCPerfCounterAddUI64(dtv->counter_avg_pkt_size, tv->sc_perf_pca, p->pktlen);
- SCPerfCounterSetUI64(dtv->counter_max_pkt_size, tv->sc_perf_pca, p->pktlen);
+ SCPerfCounterAddUI64(dtv->counter_avg_pkt_size, tv->sc_perf_pca, GET_PKT_LEN(p));
+ SCPerfCounterSetUI64(dtv->counter_max_pkt_size, tv->sc_perf_pca, GET_PKT_LEN(p));
switch (p->datalink) {
case LINKTYPE_ETHERNET: