diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-03-19 16:36:10 +0100 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-03-19 16:36:10 +0100 |
commit | ceae98914962e4375a98db2622b65ecf44b0232a (patch) | |
tree | 1560778e9ea194247c1cec6d827dde882a860b58 /bpf_lexer.l | |
parent | e4c98bb91e35dba56a077e8e5b9c70556fdd4e24 (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_lexer.l')
-rw-r--r-- | bpf_lexer.l | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bpf_lexer.l b/bpf_lexer.l index d4b6947..a2ff90a 100644 --- a/bpf_lexer.l +++ b/bpf_lexer.l @@ -75,6 +75,7 @@ label [a-zA-Z_][a-zA-Z0-9_]+ "#"?("len"|"pktlen") { return K_PKT_LEN; } "#"?("pto"|"proto") { return K_PROTO; } "#"?("type") { return K_TYPE; } +"#"?("poff") { return K_POFF; } "#"?("ifx"|"ifidx") { return K_IFIDX; } "#"?("nla") { return K_NLATTR; } "#"?("nlan") { return K_NLATTR_NEST; } |