Commit Graph

6 Commits (c17df004ed609cd19e12c87b48cfce60bb016951)

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.
1 year ago
Victor Julien 8ba7f23c9b detect/content: use const pointer where possible 2 years ago
Philippe Antoine 02f2602dde src: rework includes as per cppclean 3 years ago
Victor Julien 065c3379ed detect/replace: implement post-match
Implement replace executor as a post match callback so that it
is only considered if there actually is a replace keyword in use.
6 years ago
Ken Steele 60c46170b0 Check replist is not NULL inline before doing any processing.
The replist is often NULL, so it is worth checking that case before making
the function call do perform work on the list.
11 years ago
Eric Leblond a85dc9b0e2 Add support for replace keyword.
This patch adds support for the replace keyword. It is used with
content to change selected part of the payload. The major point
with this patch is that having a replace keyword made necessary
to avoid all stream level check because we need to access to the
could-be-modified packet payload.

One of the main difficulty is to handle complex signature. If there is
other content check, we must do the substitution when we're sure all
match are valid. The patch adds an attribute to the thread context
variable to be able to deal with recursivity of the match function.

Replace is only activated in IPS mode and apply only to raw match.
14 years ago