Commit Graph

18 Commits (c1d69589402876d35e12fddf4489a9afff9388cf)

Author SHA1 Message Date
Jason Ish 44388f1b69 src: make include guards more library friendly
Include guards for libraries should use a prefix that is meaningful for
the library to avoid conflicts with other user code. For Suricata, use
SURICATA.

Additionally, remove the pattern of leading and trailing underscores as
these are reserved for the language implementation per the C and C++
standards.
3 years ago
Victor Julien 101452056d detect/bytejump: don't reuse content flag
To avoid future problems with overlapping flag values, give bytejump
its own DETECT_BYTEJUMP_OFFSET_VAR flag.

The values are currently not overlapping, so this patch should have
no side effects.
3 years ago
Jeff Lucovsky 27a665546b detect/bytejump: Change DoMatch signature to return bool
Issue: 4624

Change the function signature of byte-jump's domatch from an int to a
bool to avoid ambiguity handling return values.
3 years ago
Jeff Lucovsky 3f118188e9 detect/bytejump: Allow nbytes to be a variable
Issue: 6105

This commit adds the ability for nbytes to be a variable when used with
the byte_jump keyword.
3 years ago
Jeff Lucovsky f7a47a4477 detect/bsize: Use U16 bit macros
This commit changes the flag bit values to be expressed using the
BIT_U16 macro instead with hex values.
6 years ago
Jeff Lucovsky 620659b5f3 detect: Increase flag size for byte_jump 6 years ago
Jeff Lucovsky 0701d82890 detect/bytejump: Add "from_end" support
This commit adds support for the byte jump "from_end" keyword and
unittests.
6 years ago
Victor Julien 579cc9f02b const: constify decoder, app-layer, detect funcs 7 years ago
Victor Julien 39613778cd detect: make setup/free/match funcs static where possible 10 years ago
Victor Julien bfd4bc8233 detect: constify Signature/SigMatch use at runtime 10 years ago
Ken Steele 923a77e952 Change Match() function to take const SigMatchCtx*
The Match functions don't need a pointer to the SigMatch object, just the
context pointer contained inside, so pass the Context to the Match function
rather than the SigMatch object. This allows for further optimization.

Change SigMatch->ctx to have type SigMatchCtx* rather than void* for better
type checking. This requires adding type casts when using or assigning it.

The SigMatch contex should not be changed by the Match() funciton, so pass it
as a const SigMatchCtx*.
12 years ago
Anoop Saldanha 35f3eafa5e byte extract added to the engine. Detection support added for packet payload, uri and dce detection engines 16 years ago
Anoop Saldanha 45ea0d914e dce stub content keywords support using dcepayload.c support for all dce related content keywords 17 years ago
William Metcalf ce01927515 Import of GPLv2 Header 050410 17 years ago
Victor Julien 8b30226914 Detection keyword cleanup 17 years ago
Victor Julien bef70a04ce First stage of detect engine redesign: equal patterns share id's, search phase no longer used, new match verification phase. 17 years ago
Brian Rectanus 3e9223c22c Cleanup bytetest and bytejump. 17 years ago
Brian Rectanus 02a8b583c9 Added byte_test and byte_jump support. 17 years ago