From: Victor Julien Date: Mon, 2 May 2022 19:27:43 +0000 (+0200) Subject: decode: turn no payload/packet inspect macros into funcs X-Git-Tag: suricata-7.0.0-beta1~485 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d81ad784440d21be4865be32973a76a81fc8791b;p=thirdparty%2Fsuricata.git decode: turn no payload/packet inspect macros into funcs Remove unused unset macros. --- diff --git a/src/decode.h b/src/decode.h index c766695801..f4d6b5b52f 100644 --- a/src/decode.h +++ b/src/decode.h @@ -1058,30 +1058,6 @@ void DecodeGlobalConfig(void); void PacketAlertGetMaxConfig(void); void DecodeUnregisterCounters(void); -/** \brief Set the No payload inspection Flag for the packet. - * - * \param p Packet to set the flag in - */ -#define DecodeSetNoPayloadInspectionFlag(p) do { \ - (p)->flags |= PKT_NOPAYLOAD_INSPECTION; \ - } while (0) - -#define DecodeUnsetNoPayloadInspectionFlag(p) do { \ - (p)->flags &= ~PKT_NOPAYLOAD_INSPECTION; \ - } while (0) - -/** \brief Set the No packet inspection Flag for the packet. - * - * \param p Packet to set the flag in - */ -#define DecodeSetNoPacketInspectionFlag(p) do { \ - (p)->flags |= PKT_NOPACKET_INSPECTION; \ - } while (0) -#define DecodeUnsetNoPacketInspectionFlag(p) do { \ - (p)->flags &= ~PKT_NOPACKET_INSPECTION; \ - } while (0) - - #define ENGINE_SET_EVENT(p, e) do { \ SCLogDebug("p %p event %d", (p), e); \ if ((p)->events.cnt < PACKET_ENGINE_EVENT_MAX) { \ @@ -1269,6 +1245,24 @@ static inline bool PacketIncreaseCheckLayers(Packet *p) return true; } +/** \brief Set the No payload inspection Flag for the packet. + * + * \param p Packet to set the flag in + */ +static inline void DecodeSetNoPayloadInspectionFlag(Packet *p) +{ + p->flags |= PKT_NOPAYLOAD_INSPECTION; +} + +/** \brief Set the No packet inspection Flag for the packet. + * + * \param p Packet to set the flag in + */ +static inline void DecodeSetNoPacketInspectionFlag(Packet *p) +{ + p->flags |= PKT_NOPACKET_INSPECTION; +} + /** \brief return true if *this* packet needs to trigger a verdict. * * If we have the root packet, and we have none outstanding,