/* Finds a pattern in the skb data according to the specified textsearch configuration. Use textsearch_next() to retrieve subsequent occurrences of the pattern. Returns the offset to the first occurrence or UINT_MAX if no match was found.  */
unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, unsigned int to, struct ts_config *config, struct ts_state *state)
/* Finds a pattern in the skb data according to the specified textsearch configuration. Use textsearch_next() to retrieve subsequent occurrences of the pattern. Returns the offset to the first occurrence or UINT_MAX if no match was found.  */
unsigned int skb_find_text(struct sk_buff *skb, unsigned int from, unsigned int to, struct ts_config *config, struct ts_state *state)
{
	unsigned int ret;
	config->get_next_block = skb_ts_get_next_block;
	config->finish = skb_ts_finish;
	skb_prepare_seq_read(skb, from, to, TS_SKB_CB(state));
	ret = textsearch_find(config, state);
	return (ret <= to - from ? ret : UINT_MAX);
}