btd->endianess, btd->bytes_to_compare,
start_ptr, c.buffer(), c.endo(), &value))
return DETECTION_OPTION_NO_MATCH;
-#ifdef DEBUG
+#ifdef DEBUG_MSGS
payload_bytes_grabbed = (int)btd->bytes_to_compare;
#endif
}
int DAQ_Inject(const DAQ_PktHdr_t* h, int rev, const uint8_t* buf, uint32_t len)
{
int err = daq_inject(daq_mod, daq_hand, (DAQ_PktHdr_t*)h, buf, len, rev);
-#ifdef DEBUG
+#ifdef DEBUG_MSGS
if ( err )
LogMessage("Can't inject (%d) - %s\n",
err, daq_get_error(daq_mod, daq_hand));
ip_stats.reassembles++;
ip_stats.reassembled_bytes += dpkt->pkth->caplen;
-#if defined(DEBUG_FRAG_EX) && defined(DEBUG)
+#if defined(DEBUG_FRAG_EX) && defined(DEBUG_MSGS)
/*
* Note, that this won't print out the IP Options or any other
* data that is established when the packet is decoded.
*/
if (p->ptrs.ip_api.ttl() < fe->min_ttl)
{
-#ifdef DEBUG
+#ifdef DEBUG_MSGS
if ( p->is_ip4() )
{
DebugFormat(DEBUG_FRAG,
switch (insert_return)
{
case FRAG_INSERT_FAILED:
-#ifdef DEBUG
- LogMessage("WARNING: Insert into Fraglist failed, "
+ DebugFormat(DEBUG_FRAG, "WARNING: Insert into Fraglist failed, "
"(offset: %u).\n", frag_offset);
-#endif
return;
+
case FRAG_INSERT_TTL:
-#ifdef DEBUG
+#ifdef DEBUG_MSGS
if ( p->is_ip4() )
{
DebugFormat(DEBUG_FRAG,
#endif
ip_stats.discards++;
return;
+
case FRAG_INSERT_ATTACK:
case FRAG_INSERT_ANOMALY:
ip_stats.discards++;
return;
+
case FRAG_INSERT_TIMEOUT:
-#ifdef DEBUG
- LogMessage("WARNING: Insert into Fraglist failed due to timeout, "
+ DebugFormat(DEBUG_FRAG, "WARNING: Insert into Fraglist failed due to timeout, "
"(offset: %u).\n", frag_offset);
-#endif
return;
+
case FRAG_INSERT_OVERLAP_LIMIT:
-#ifdef DEBUG
- LogMessage("WARNING: Excessive IP fragment overlap, "
+ DebugFormat(DEBUG_FRAG,
+ "WARNING: Excessive IP fragment overlap, "
"(More: %u, offset: %u, offsetSize: %u).\n",
(p->ptrs.decode_flags & DECODE_MF),
(frag_offset << 3), p->dsize);
-#endif
ip_stats.discards++;
return;
+
default:
break;
}