summaryrefslogtreecommitdiff
path: root/bpf.h
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-03-19 16:36:10 +0100
committerDaniel Borkmann <dborkman@redhat.com>2013-03-19 16:36:10 +0100
commitceae98914962e4375a98db2622b65ecf44b0232a (patch)
tree1560778e9ea194247c1cec6d827dde882a860b58 /bpf.h
parente4c98bb91e35dba56a077e8e5b9c70556fdd4e24 (diff)
bpfc: filter: add poff ancillary operation
In preparation for [1], add the #poff operation, so that users can dynamically truncate packets on the payload start offset. This is useful for several reasons: privacy, speed, ... Example for bpfc: ld #poff ret a [1] http://thread.gmane.org/gmane.linux.network/262512 Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'bpf.h')
-rw-r--r--bpf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/bpf.h b/bpf.h
index 84cf0b8..07631d6 100644
--- a/bpf.h
+++ b/bpf.h
@@ -131,5 +131,8 @@ static inline void bpf_release(struct sock_fprog *bpf)
#ifndef SKF_AD_VLAN_TAG_PRESENT
# define SKF_AD_VLAN_TAG_PRESENT 48
#endif
+#ifndef SKF_AD_PAY_OFFSET
+# define SKF_AD_PAY_OFFSET 52
+#endif
#endif /* BPF_I_H */