Go to the documentation of this file.
38 static int g_icmpv4hdr_buffer_id = 0;
58 BUG_ON(g_icmpv4hdr_buffer_id < 0);
96 if (!PacketIsICMPv4(p)) {
102 const ICMPV4Hdr *icmpv4h = PacketGetICMPv4(p);
104 if (((uint8_t *)icmpv4h + (ptrdiff_t)hlen) >
106 SCLogDebug(
"data out of range: %p > %p", ((uint8_t *)icmpv4h + (ptrdiff_t)hlen),
111 const uint32_t data_len = hlen;
112 const uint8_t *data = (
const uint8_t *)icmpv4h;
#define SIGMATCH_INFO_STICKY_BUFFER
SigTableElmt * sigmatch_table
void DetectPktMpmRegister(const char *name, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id), InspectionBufferGetPktDataPtr GetData)
register a MPM engine
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
main detection engine ctx
void DetectIcmpv4HdrRegister(void)
Registration function for icmpv4.hdr: keyword.
#define ICMPV4_GET_HLEN_ICMPV4H(p)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
void DetectBufferTypeSupportsPacket(const char *name)
void DetectPktInspectEngineRegister(const char *name, InspectionBufferGetPktDataPtr GetPktData, InspectionBufferPktInspectFunc Callback)
register inspect engine at start up time
#define SCReturnPtr(x, type)
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
#define DETECT_PROTO_IPV4
int DetectBufferTypeRegister(const char *name)
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
void DetectIcmpv4HdrRegisterTests(void)
this function registers unit tests for DetectIcmpv4Hdr
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
int DetectEngineInspectPktBufferGeneric(DetectEngineThreadCtx *det_ctx, const DetectEnginePktInspectionEngine *engine, const Signature *s, Packet *p, uint8_t *_alert_flags)
Do the content inspection & validation for a signature.
void(* RegisterTests)(void)
int DetectProtoContainsProto(const DetectProto *dp, int proto)
see if a DetectProto contains a certain proto
#define SIG_FLAG_REQUIRE_PACKET