From ceae98914962e4375a98db2622b65ecf44b0232a Mon Sep 17 00:00:00 2001 From: Daniel Borkmann Date: Tue, 19 Mar 2013 16:36:10 +0100 Subject: 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 --- bpf_lexer.l | 1 + 1 file changed, 1 insertion(+) (limited to 'bpf_lexer.l') 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; } -- cgit v1.2.3-54-g00ecf