package bpf
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
OCaml embedded eBPF assembler.
Assuming R1
points to packet data - check if it is an ARP packet :
let arp =
[
ldx H R2 (R1,12);
movi R0 1;
jmpi_ 1 R2 `EQ 0x806;
movi R0 0;
ret
]
See src/test.ml for more examples.