some minor changes

remotes/origin/master-1.0.x
Gurvinder Singh 16 years ago committed by Victor Julien
parent 94674c58f3
commit 71da019734

@ -22,3 +22,19 @@ 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
*/
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
*/
void DecodeSetNoPacketInspectionFlag(Packet *p) {
p->flags |= PKT_NOPACKET_INSPECTION;
}

@ -425,6 +425,9 @@ void DecodeGRE(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t,
Packet *SetupPkt (void);
Packet *TunnelPktSetup(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, uint16_t, uint8_t);
void DecodeSetNoPayloadInspectionFlag(Packet *);
void DecodeSetNoPacketInspectionFlag(Packet *);
#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)))
@ -459,5 +462,9 @@ Packet *TunnelPktSetup(ThreadVars *, DecodeThreadVars *, Packet *, uint8_t *, ui
#define PPP_OVER_GRE 11
/*Packet Flags*/
#define PKT_NOPACKET_INSPECTION 0x01 /**< Flag to indicate that packet header or contents should not be inspected*/
#define PKT_NOPAYLOAD_INSPECTION 0x02 /**< Flag to indicate that packet contents should not be inspected*/
#endif /* __DECODE_H__ */

@ -17,8 +17,8 @@
#define FLOW_TOSERVER_IPONLY_SET 0x0020
#define FLOW_TOCLIENT_IPONLY_SET 0x0040
#define FLOW_NOPACKET_INSPECTION 0x0080
#define FLOW_NOPAYLOAD_INSPECTION 0x0100
#define FLOW_NOPACKET_INSPECTION 0x0080 /**< Flag to indicate the packet belongs to this flow should not be inspected*/
#define FLOW_NOPAYLOAD_INSPECTION 0x0100 /**< Flag to indicate the contents or the packet which belongs to this flow should not be inspected*/
/* global flow flags */
#define FLOW_EMERGENCY 0x01

@ -345,9 +345,9 @@ void FlowHandlePacket (ThreadVars *tv, Packet *p)
/*set the detection bypass flags*/
if (f->flags & FLOW_NOPACKET_INSPECTION)
FlowSetPktNoPacketInspectionFlag(p);
DecodeSetNoPacketInspectionFlag(p);
if (f->flags & FLOW_NOPAYLOAD_INSPECTION)
FlowSetPktNoPayloadInspectionFlag(p);
DecodeSetNoPayloadInspectionFlag(p);
/* set the flow in the packet */
p->flow = f;
@ -784,22 +784,6 @@ void FlowSetNoPayloadInspectionFlag(Flow *f) {
f->flags |= FLOW_NOPAYLOAD_INSPECTION;
}
/** \brief Set the No payload inspection Flag for the packet.
*
* \param p Packet to set the flag in
*/
void FlowSetPktNoPayloadInspectionFlag(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
*/
void FlowSetPktNoPacketInspectionFlag(Packet *p) {
p->flags |= PKT_NOPACKET_INSPECTION;
}
#ifdef UNITTESTS
#include "stream-tcp-private.h"

@ -19,10 +19,6 @@
#define FLOW_PKT_NOSTREAM 0x40
#define FLOW_PKT_STREAMONLY 0x80
/*Packet Flags*/
#define PKT_NOPACKET_INSPECTION 0x01
#define PKT_NOPAYLOAD_INSPECTION 0x02
/* global flow config */
typedef struct FlowCnf_
{
@ -127,6 +123,10 @@ int FlowSetProtoEmergencyTimeout(uint8_t ,uint32_t ,uint32_t ,uint32_t);
int FlowSetProtoFreeFunc (uint8_t , void (*Free)(void *));
int FlowSetFlowStateFunc (uint8_t , int (*GetProtoState)(void *));
void FlowUpdateQueue(Flow *);
void FlowLockSetNoPacketInspectionFlag(Flow *);
void FlowSetNoPacketInspectionFlag(Flow *);
void FlowLockSetNoPayloadInspectionFlag(Flow *);
void FlowSetNoPayloadInspectionFlag(Flow *);
#endif /* __FLOW_H__ */

@ -57,7 +57,7 @@ enum
#define STREAMTCP_FLAG_NOSERVER_REASSEMBLY 0x40 /**< Flag to avoid stream reassembly / application layer
inspection for the server stream.*/
#define PAWS_24DAYS 2073600 /* 24 days in seconds */
#define PAWS_24DAYS 2073600 /**< 24 days in seconds */
/* Macro's for comparing Sequence numbers
* Page 810 from TCP/IP Illustrated, Volume 2. */

Loading…
Cancel
Save