bpf

Embedded eBPF assembler
README

OCaml embedded eBPF assembler.

eBPF.mli

Assuming R1 points to packet data - check if it is an ARP packet :

let arp =
[
  ldx H R2 (R1,12);
  movi R0 1;
  jmpi `Exit R2 `EQ 0x806;
  movi R0 0;
label `Exit;
  ret
]

See src/test.ml for more examples.

Install
Sources
bpf-0.2.tbz
md5=f1df7018dd45fc057da8c437f1a86270
Dependencies
Reverse Dependencies