summaryrefslogtreecommitdiffstats
path: root/include/linux/filter.h
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2012-03-31 11:01:19 +0000
committerDavid S. Miller <davem@davemloft.net>2012-04-03 18:36:20 -0400
commit302d663740cfaf2c364df6bb61cd339014ed714c (patch)
tree85e3ea387a72e08b91b325850af062f430ce1260 /include/linux/filter.h
parentfca231b2771cfd4e4f89445cf5c8dd81409b5b3c (diff)
downloadblackbird-obmc-linux-302d663740cfaf2c364df6bb61cd339014ed714c.tar.gz
blackbird-obmc-linux-302d663740cfaf2c364df6bb61cd339014ed714c.zip
filter: Allow to create sk-unattached filters
Today, BPF filters are bind to sockets. Since BPF machine becomes handy for other purposes, this patch allows to create unattached filter. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r--include/linux/filter.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 8eeb205f298b..92dd9933c43d 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -153,6 +153,9 @@ static inline unsigned int sk_filter_len(const struct sk_filter *fp)
extern int sk_filter(struct sock *sk, struct sk_buff *skb);
extern unsigned int sk_run_filter(const struct sk_buff *skb,
const struct sock_filter *filter);
+extern int sk_unattached_filter_create(struct sk_filter **pfp,
+ struct sock_fprog *fprog);
+extern void sk_unattached_filter_destroy(struct sk_filter *fp);
extern int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk);
extern int sk_detach_filter(struct sock *sk);
extern int sk_chk_filter(struct sock_filter *filter, unsigned int flen);
OpenPOWER on IntegriCloud