detect/transform: Add transform "validate" function

This commit adds an (optional) entry for a validation function. The
validation function, if present, will be used during rule processing.

Its role is to determine if the arguments are compatible with the
transform. E.g., a content string of "this string has whitespace" is not
compatible with the `strip_whitespace` transform.
pull/5115/head
Jeff Lucovsky 5 years ago committed by Victor Julien
parent 114b7e5cd9
commit a4132d8e0f

@ -1189,6 +1189,7 @@ typedef struct SigTableElmt_ {
/** InspectionBuffer transformation callback */
void (*Transform)(InspectionBuffer *, void *context);
bool (*TransformValidate)(const uint8_t *content, uint16_t content_len, void *context);
/** keyword setup function pointer */
int (*Setup)(DetectEngineCtx *, Signature *, const char *);

Loading…
Cancel
Save