/* Filter predicate for dynamic sized arrays of characters. These are implemented through a list of strings at the end of the entry. Also each of these strings have a field in the entry which contains its offset from the beginning of the entry. We have then first to get this field, dereference it and add it to the address of the entry, and at last we have the address of the string.  */
static int filter_pred_strloc(struct filter_pred *pred, void *event, int val1, int val2)
/* Filter predicate for dynamic sized arrays of characters. These are implemented through a list of strings at the end of the entry. Also each of these strings have a field in the entry which contains its offset from the beginning of the entry. We have then first to get this field, dereference it and add it to the address of the entry, and at last we have the address of the string.  */
static int filter_pred_strloc(struct filter_pred *pred, void *event, int val1, int val2)
{
	u32 str_item = *(u32 *)(event + pred->offset);
	int str_loc = str_item & 0xffff;
	int str_len = str_item >> 16;
	char *addr = (char *)(event + str_loc);
	int cmp, match;
	cmp = pred->regex.match(addr, &pred->regex, str_len);
	match = cmp ^ pred->not;
	return match;
}