package bpf

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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_ 1 R2 `EQ 0x806;
  movi R0 0;
  ret
]

See src/test.ml for more examples.

OCaml

Innovation. Community. Security.