summaryrefslogtreecommitdiff
path: root/proto_tcp.c
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-05-23 11:08:03 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-05-23 11:10:55 +0200
commit4584b955420cd8d2fcae767c86b853fde4bccc6e (patch)
treea0a00667b54fd4d3b4bda48185ce5df98ca24bc5 /proto_tcp.c
parent4e497b9aa7e8635a9414021bd1bf31a9ff923566 (diff)
bpfc: allow bpf programs to be passed to cpp
This patch allows bpf programs to be passed to the C preprocessor before handing over to bpfc. Example: #define ETH_P_IP 0x800 ldh [12] jne #ETH_P_IP, drop ldb [23] jneq #6, drop ldh [20] jset #0x1fff, drop ldxb 4 * ([14] & 0xf) ldh [x + 14] jeq #0x16, pass ldh [x + 16] jne #0x16, drop pass: ret #-1 drop: ret #0 Compile with: bpfc -i foo -p Suggested-by: John Lange <JLange@trendium.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'proto_tcp.c')
0 files changed, 0 insertions, 0 deletions