FLOWLOCK_RDLOCK(p->flow);
CreateTimeString(&p->flow->startts, timebuf, sizeof(timebuf));
MemBufferWriteString(aft->buffer, "FLOW Start TS: %s\n", timebuf);
-#ifdef DEBUG
MemBufferWriteString(aft->buffer, "FLOW PKTS TODST: %"PRIu32"\n"
"FLOW PKTS TOSRC: %"PRIu32"\n"
"FLOW Total Bytes: %"PRIu64"\n",
p->flow->todstpktcnt, p->flow->tosrcpktcnt,
p->flow->todstbytecnt + p->flow->tosrcbytecnt);
-#endif
MemBufferWriteString(aft->buffer,
"FLOW IPONLY SET: TOSERVER: %s, TOCLIENT: %s\n"
"FLOW ACTION: DROP: %s\n"
#define COPY_TIMESTAMP(src,dst) ((dst)->tv_sec = (src)->tv_sec, (dst)->tv_usec = (src)->tv_usec)
-#ifdef DEBUG
#define RESET_COUNTERS(f) do { \
(f)->todstpktcnt = 0; \
(f)->tosrcpktcnt = 0; \
(f)->todstbytecnt = 0; \
(f)->tosrcbytecnt = 0; \
} while (0)
-#else
-#define RESET_COUNTERS(f)
-#endif
#define FLOW_INITIALIZE(f) do { \
(f)->sp = 0; \
if (FlowUpdateSeenFlag(p)) {
f->flags |= FLOW_TO_DST_SEEN;
}
-#ifdef DEBUG
f->todstpktcnt++;
f->todstbytecnt += GET_PKT_LEN(p);
-#endif
p->flowflags |= FLOW_PKT_TOSERVER;
} else {
if (FlowUpdateSeenFlag(p)) {
f->flags |= FLOW_TO_SRC_SEEN;
}
-#ifdef DEBUG
f->tosrcpktcnt++;
f->tosrcbytecnt += GET_PKT_LEN(p);
-#endif
p->flowflags |= FLOW_PKT_TOCLIENT;
}
-#ifdef DEBUG
-#endif
if ((f->flags & FLOW_TO_DST_SEEN) && (f->flags & FLOW_TO_SRC_SEEN)) {
SCLogDebug("pkt %p FLOW_PKT_ESTABLISHED", p);
struct Flow_ *lnext; /* list */
struct Flow_ *lprev;
struct timeval startts;
-#ifdef DEBUG
+
uint32_t todstpktcnt;
uint32_t tosrcpktcnt;
uint64_t todstbytecnt;
uint64_t tosrcbytecnt;
-#endif
} Flow;
enum {
json_object_set_new(hjs, "app_proto", json_string(AppProtoToString(f->alproto)));
- /* debug until we move this out of the debug wrapper in the flow code */
-#ifdef DEBUG
json_object_set_new(hjs, "pkts_toserver",
json_integer(f->todstpktcnt));
json_object_set_new(hjs, "pkts_toclient",
json_object_set_new(hjs, "bytes_toclient",
json_integer(f->tosrcbytecnt));
-
-#endif
char timebuf1[64], timebuf2[64];
CreateIsoTimeString(&f->startts, timebuf1, sizeof(timebuf1));