Giter VIP home page Giter VIP logo

bpfjit's Introduction

Just-in-Time Compilation for Berkeley Packet Filter

Build Status

Prerequisites

You need sljit (http://sljit.sourceforge.net/) and mk-configure (http://sourceforge.net/projects/mk-configure/) to build bpfjit.

It is recommended to use pkgsrc and install devel/mk-configure. The pkgsrc guide is available at http://www.netbsd.org/docs/pkgsrc/.

The sljit code must be at revision around 8d536bf7c334f9e31a5cc366e5d5d8cd1cd431b1 or newer, try getting the latest version and checking whether it works:

$ git clone [email protected]:/zherczeg/sljit.git

$ tar cf sljit-latest.tar sljit/

Building

Extract sljit tarball to sljit/ subdirectory. Make sure you pass --keep-old-files (-k) option to tar to keep Makefiles from bpfjit.

$ cd sljit/

$ tar kxf /path/to/sljit-latest.tar

Then you can build bpfjit with this command

$ mkcmake

and install:

$ export DESTDIR=/path/of/your/choice

$ env PREFIX=/ mkcmake install

Testing

$ export LD_LIBRARY_PATH=${DESTDIR}/lib

$ cd ${DESTDIR}

$ ./bin/bpfjit_test

$ echo $?

You should see zero exit status.

Packages

Just build the package, install it and link the library using the -lbpfjit flag.

  • RPM (tested on RHEL/CentOS 7): make rpm
  • DEB (tested on Debian 9): make deb

bpfjit's People

Contributors

alnsn avatar rmind avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bpfjit's Issues

bpfjit-test fail

The latest code on 'master' appears to fail the test.
[email protected]: (master) :/bpfjit
848$ /usr/local/bin/bpfjit_test
bpfjit_test: test_copx.c:139 (in test_copx_ret_A): code(&ctx, &args) == 13
bpfjit_test: test_copx_extmem.c:96 (in test_copx_ret_mem): code(&ctx, &args) == 13
bpfjit_test: test_copx_extmem.c:138 (in test_copx_ret_preinited_mem): code(&ctx, &args) == 3
[email protected]: (master) :
/bpfjit
849$ echo $?
1
[email protected]: (master) :~/bpfjit
850$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.