} \
} while(0)
-/** \brief issue drop action
- *
- * Set drop (+reject) flags in both current and root packet.
- *
- * \param action action bit flags. Must be limited to ACTION_DROP_REJECT
- */
-static inline void PacketDrop(Packet *p, const uint8_t action, enum PacketDropReason r)
-{
- BUG_ON((action & ~ACTION_DROP_REJECT) != 0);
-
- if (p->drop_reason == PKT_DROP_REASON_NOT_SET)
- p->drop_reason = (uint8_t)r;
-
- if (p->root) {
- p->root->action |= action;
- if (p->root->drop_reason == PKT_DROP_REASON_NOT_SET) {
- p->root->drop_reason = PKT_DROP_REASON_INNER_PACKET;
- }
- }
- p->action |= action;
-}
-
-static inline uint8_t PacketCheckAction(const Packet *p, const uint8_t a)
-{
- if (likely(p->root == NULL)) {
- return (p->action & a) != 0;
- } else {
- /* check against both */
- const uint8_t actions = p->action | p->root->action;
- return (actions & a) != 0;
- }
-}
-
-#ifdef UNITTESTS
-static inline uint8_t PacketTestAction(const Packet *p, const uint8_t a)
-{
- return PacketCheckAction(p, a);
-}
-#endif
-
#define TUNNEL_INCR_PKT_RTV_NOLOCK(p) do { \
((p)->root ? (p)->root->tunnel_rtv_cnt++ : (p)->tunnel_rtv_cnt++); \
} while (0)
#include "detect-engine-tag.h"
#include "decode.h"
+#include "packet.h"
#include "flow.h"
#include "flow-private.h"
#include "conf.h"
#include "decode.h"
+#include "packet.h"
#include "flow.h"
#include "stream-tcp.h"
#include "app-layer.h"
*/
#include "suricata-common.h"
+#include "packet.h"
#include "detect.h"
#include "flow.h"
#include "conf.h"
*/
#include "suricata-common.h"
+#include "packet.h"
#include "detect.h"
#include "flow.h"
#include "conf.h"
#include "flow.h"
#include "host.h"
#include "util-profiling.h"
+#include "util-validate.h"
+
+/** \brief issue drop action
+ *
+ * Set drop (+reject) flags in both current and root packet.
+ *
+ * \param action action bit flags. Must be limited to ACTION_DROP_REJECT
+ */
+void PacketDrop(Packet *p, const uint8_t action, enum PacketDropReason r)
+{
+ DEBUG_VALIDATE_BUG_ON((action & ~ACTION_DROP_REJECT) != 0);
+
+ if (p->drop_reason == PKT_DROP_REASON_NOT_SET)
+ p->drop_reason = (uint8_t)r;
+
+ if (p->root) {
+ p->root->action |= action;
+ if (p->root->drop_reason == PKT_DROP_REASON_NOT_SET) {
+ p->root->drop_reason = PKT_DROP_REASON_INNER_PACKET;
+ }
+ }
+ p->action |= action;
+}
+
+bool PacketCheckAction(const Packet *p, const uint8_t a)
+{
+ if (likely(p->root == NULL)) {
+ return (p->action & a) != 0;
+ } else {
+ /* check against both */
+ const uint8_t actions = p->action | p->root->action;
+ return (actions & a) != 0;
+ }
+}
/**
* \brief Initialize a packet structure for use.
#include "decode.h"
+void PacketDrop(Packet *p, const uint8_t action, enum PacketDropReason r);
+bool PacketCheckAction(const Packet *p, const uint8_t a);
+
+#ifdef UNITTESTS
+static inline uint8_t PacketTestAction(const Packet *p, const uint8_t a)
+{
+ return PacketCheckAction(p, a);
+}
+#endif
+
void PacketInit(Packet *p);
void PacketReleaseRefs(Packet *p);
void PacketReinit(Packet *p);
*/
#include "suricata-common.h"
+#include "packet.h"
#include "decode.h"
#include "packet-queue.h"
#include "threads.h"
#define SC_PCAP_DONT_INCLUDE_PCAP_H 1
#include "suricata-common.h"
#include "suricata.h"
+#include "packet.h"
#include "decode.h"
#include "packet-queue.h"
#include "threads.h"
#include "suricata-common.h"
#include "runmodes.h"
#include "decode.h"
+#include "packet.h"
#include "source-dpdk.h"
#include "suricata.h"
#include "threads.h"
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
+#include "packet.h"
#include "packet-queue.h"
#include "threads.h"
#include "threadvars.h"
*/
#include "suricata-common.h"
#include "decode.h"
+#include "packet.h"
#include "suricata.h"
#include "threadvars.h"
#include "util-datalink.h"
#include "suricata.h"
#include "suricata-common.h"
#include "tm-threads.h"
+#include "packet.h"
#include "util-bpf.h"
#include "util-privs.h"
#include "util-validate.h"
#include "suricata-common.h"
#include "suricata.h"
+#include "packet.h"
#include "decode.h"
#include "packet-queue.h"
#include "suricata-common.h"
#include "suricata.h"
#include "tm-threads.h"
-
+#include "packet.h"
#include "util-byte.h"
#include "util-debug.h"
#include "util-device.h"
#include "suricata-common.h"
#include "suricata.h"
-
+#include "packet.h"
#include "decode.h"
#include "detect.h"
#include "suricata-common.h"
#include "suricata.h"
+#include "packet.h"
#include "util-exception-policy.h"
#include "util-misc.h"
#include "stream-tcp-reassemble.h"