Skip to main content

Prerequisites

BPF Compiler Collection (BCC)

eBPF Event Interceptor requires the BCC framework to compile and run eBPF programs. The CMake build system can automatically set up BCC on Ubuntu, or you can install it manually.
The included CMake configuration will automatically install BCC if not found:
If you prefer to install BCC manually:

Build Dependencies

Install the required build tools:
Minimum versions:
  • CMake 3.10 or later
  • GCC with C++11 support

Build and Install

1

Clone the repository

Download the eBPF Event Interceptor source code:
2

Create build directory

Set up a dedicated build directory:
3

Configure with CMake

Generate build files. Add -DSETUP_TESTS=ON to build test executables:
Expected output:
If BCC is not found, the build system will automatically run installation scripts for Ubuntu. This requires an internet connection and may take several minutes.
4

Compile the libraries

Build using all available CPU cores:
This compiles:
  • libtcpEvent.so - TCP event interceptor library
  • libudpEvent.so - UDP event interceptor library
  • Test executables (if SETUP_TESTS=ON)
Build output:
5

Install the libraries

Install the compiled libraries to the system:
Installation paths:
  • Libraries: /opt/RealTimeKql/lib/
    • libtcpEvent.so
    • libudpEvent.so
  • Test binaries: /tmp/
    • tcpEventTest
    • udpEventTest
The libraries are installed to /opt/RealTimeKql/lib/ by default. Ensure this path is in your library search path or use LD_LIBRARY_PATH when running applications.

Build Options

Customize the build with CMake options:

Example: Full Build with Tests

Verify Installation

1

Check library files

Verify the libraries were installed:
You should see:
2

Run test programs (optional)

If you built with tests, run the test executables:
You should see TCP events from active connections on your system:
For UDP monitoring:
Test programs run indefinitely and print events in real-time. Press Ctrl+C to exit.
3

Check for errors

If you encounter errors, verify:
  • BCC is properly installed: dpkg -l | grep bcc
  • Kernel headers are available: ls /lib/modules/$(uname -r)/build
  • You’re running with root privileges: sudo -v

Troubleshooting

BCC Not Found

Error: BCC not found Solution: The build system will attempt automatic installation on Ubuntu. For other distributions, install BCC manually following the official guide.

Missing Kernel Headers

Error: fatal error: linux/bpf.h: No such file or directory Solution: Install kernel headers:

Permission Denied

Error: Operation not permitted when running test programs Solution: eBPF operations require root privileges. Run with sudo:

Library Not Found at Runtime

Error: error while loading shared libraries: libtcpEvent.so Solution: Add the installation path to your library search path:
Or add it permanently by creating /etc/ld.so.conf.d/realtimekql.conf:

Next Steps

Quick Start Guide

Learn how to use the libraries in your own applications