ubpf.h: Add <stdbool.h> to external header file

Commit 089f627 added the bool type to an external function but did not
add the approriate header to define that type. This still allowed the
library to be built because <stdbool.h> was included in the internal
library source files. However it causes issues when linking to this
library from other programs.

Fixes #38
1 file changed
tree: f282ecf70192bd7ab9b014d3b9dfcbc7e661ef67
  1. bin/
  2. test_framework/
  3. tests/
  4. ubpf/
  5. vm/
  6. .gitignore
  7. .travis.yml
  9. README.md
  10. requirements.txt


Userspace eBPF VM

Build Status Coverage Status


This project aims to create an Apache-licensed library for executing eBPF programs. The primary implementation of eBPF lives in the Linux kernel, but due to its GPL license it can't be used in many projects.

Linux documentation for the eBPF instruction set

Instruction set reference

This project includes an eBPF assembler, disassembler, interpreter, and JIT compiler for x86-64.


Run make -C vm to build the VM. This produces a static library libubpf.a and a simple executable used by the testsuite. After building the library you can install using make -C vm install via either root or sudo.

Compiling C to eBPF

You'll need Clang 3.7.

clang-3.7 -O2 -target bpf -c prog.c -o prog.o

You can then pass the contents of prog.o to ubpf_load_elf, or to the stdin of the vm/test binary.


Please fork the project on GitHub and open a pull request. You can run all the tests with nosetests.


Copyright 2015, Big Switch Networks, Inc. Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0>.