From be5b547803ff397c694403fbe7deeff44a4364b6 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 26 Apr 2010 18:05:01 +0200 Subject: [PATCH] Convert DecodeSetNoPayloadInspectionFlag and DecodeSetNoPacketInspectionFlag to macro's. --- src/decode.c | 20 -------------------- src/decode.h | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/decode.c b/src/decode.c index 26a685883d..7112704bb8 100644 --- a/src/decode.c +++ b/src/decode.c @@ -23,26 +23,6 @@ void DecodeTunnel(ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt } } -/** \brief Set the No payload inspection Flag for the packet. - * - * \param p Packet to set the flag in - */ -inline void DecodeSetNoPayloadInspectionFlag(Packet *p) { - SCEnter(); - p->flags |= PKT_NOPAYLOAD_INSPECTION; - SCReturn; -} - -/** \brief Set the No packet inspection Flag for the packet. - * - * \param p Packet to set the flag in - */ -inline void DecodeSetNoPacketInspectionFlag(Packet *p) { - SCEnter(); - p->flags |= PKT_NOPACKET_INSPECTION; - SCReturn; -} - void DecodeRegisterPerfCounters(DecodeThreadVars *dtv, ThreadVars *tv) { /* register counters */ diff --git a/src/decode.h b/src/decode.h index d3f672a142..15991fcc4d 100644 --- a/src/decode.h +++ b/src/decode.h @@ -484,8 +484,22 @@ void DecodeVLAN(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, Packet *SetupPkt (void); Packet *TunnelPktSetup(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, uint8_t); -inline void DecodeSetNoPayloadInspectionFlag(Packet *); -inline void DecodeSetNoPacketInspectionFlag(Packet *); +/** \brief Set the No payload inspection Flag for the packet. + * + * \param p Packet to set the flag in + */ +#define DecodeSetNoPayloadInspectionFlag(p) { \ + (p)->flags |= PKT_NOPAYLOAD_INSPECTION; \ +} + +/** \brief Set the No packet inspection Flag for the packet. + * + * \param p Packet to set the flag in + */ +#define DecodeSetNoPacketInspectionFlag(p) { \ + (p)->flags |= PKT_NOPACKET_INSPECTION; \ +} + #define DECODER_SET_EVENT(p, e) ((p)->events[(e/8)] |= (1<<(e%8))) #define DECODER_ISSET_EVENT(p, e) ((p)->events[(e/8)] & (1<<(e%8)))