Go to the documentation of this file.
40 static int g_etherhdr_buffer_id = 0;
60 BUG_ON(g_etherhdr_buffer_id < 0);
97 if (!PacketIsEthernet(p)) {
101 const EthernetHdr *ethh = PacketGetEthernet(p);
111 const uint8_t *data = (
const uint8_t *)ethh;
112 SCLogDebug(
"inspect data %p / %u", data, data_len);
115 det_ctx, list_id, buffer, data, data_len, transforms);
int PrefilterGenericMpmPktRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
#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
main detection engine ctx
#define DETECT_PROTO_ETHERNET
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void DetectBufferTypeSupportsPacket(const char *name)
void DetectPktInspectEngineRegister(const char *name, InspectionBufferGetPktDataPtr GetPktData, InspectionBufferPktInspectFunc Callback)
register inspect engine at start up time
#define ETHERNET_HEADER_LEN
SignatureInitData * init_data
void DetectEtherhdrRegisterTests(void)
this function registers unit tests for ether.hdr
int DetectBufferTypeRegister(const char *name)
void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len, const DetectEngineTransforms *transforms)
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)
void DetectEtherhdrRegister(void)
Registration function for ether.hdr: keyword.
#define SIG_FLAG_REQUIRE_PACKET