8000 GitHub - microsoft/jbpf-protobuf: Sample integration of jbpf project with protobuf
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

microsoft/jbpf-protobuf

Repository files navigation

jbpf-protobuf

jbpf-protobuf build

NOTE: This project uses an experimental feature from jbpf. It is not meant to be used in production environments.

This repository is a extension for jbpf demonstrating how to utilize protobuf serialization as part of jbpf.

Prerequisites:

  • C compiler
  • Go v1.23.2+
  • Make
  • Pip
  • Python3
  • Protocol Buffer Compiler (protoc)

To see how to install these dependencies in various environments, check the relevant Dockerfiles in the deploy folder.

The project utilizes Nanopb to generate C structures for given protobuf specs that use contiguous memory. It also generates serializer libraries that can be provided to jbpf, to encode output and decode input data to seamlessly integrate external data processing systems.

Getting started

# Clone submodules:
./init_submodules.sh

# Install nanopb pip packages:
python3 -m pip install -r 3p/nanopb/requirements.txt

# source environment variables
source ./setup_jbpfp_env.sh

# build cli and dependencies
mkdir build
cd build
cmake .. && make -j

Alternatively, build using a container:

# Clone submodules:
./init_submodules.sh

# Create builder image with all dependencies loaded
OS=azurelinux # see ./deploy directory for currently supported OS versions
docker build -t jbpfp-$OS:latest -f deploy/$OS.Dockerfile .

# Build the cli and dependencies
docker run --rm -it \
  -v $(pwd):/jbpf-protobuf \
  -w /jbpf-protobuf/build \
  jbpfp-$OS:latest \
  cmake -DINITIALIZE_SUBMODULES=off ..

docker run --rm -it \
  -v $(pwd):/jbpf-protobuf \
  -w /jbpf-protobuf/build \
  jbpfp-$OS:latest make -j

Running the examples

Once the project is built you can run the sample apps. Follow these steps to run a simple example.

Related projects

  • jbpf: Userspace eBPF instrumentation and control framework for deploying control and monitoring functions in a secure manner.
  • jrt-controller: a real-time controller for network functions instrumented with the jbpf framework.

License

The jbpf framework is licensed under the MIT license.

About

Sample integration of jbpf project with protobuf

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

0