[NET]: skb_find_text() - Find a text pattern in skb data
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. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
677e90eda3
commit
3fc7e8a6d8
@@ -27,6 +27,7 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/poll.h>
|
||||
#include <linux/net.h>
|
||||
#include <linux/textsearch.h>
|
||||
#include <net/checksum.h>
|
||||
|
||||
#define HAVE_ALLOC_SKB /* For the drivers to know */
|
||||
@@ -339,6 +340,10 @@ extern unsigned int skb_seq_read(unsigned int consumed, const u8 **data,
|
||||
struct skb_seq_state *st);
|
||||
extern void skb_abort_seq_read(struct skb_seq_state *st);
|
||||
|
||||
extern unsigned int skb_find_text(struct sk_buff *skb, unsigned int from,
|
||||
unsigned int to, struct ts_config *config,
|
||||
struct ts_state *state);
|
||||
|
||||
/* Internal */
|
||||
#define skb_shinfo(SKB) ((struct skb_shared_info *)((SKB)->end))
|
||||
|
||||
|
Reference in New Issue
Block a user