Git Product home page Git Product logo

filter2xdp's Introduction

filter2xdp

filter2xdp will take a pcap/tcpdump filter expression, compile it to classical BPF (cBPF) using libpcap, convert it to extended BPF (eBPF) and load it as an XDP BPF program. By default, the XDP program will only pass packets to the Linux network stack which match the filter expression. If the XDP program is loaded using the --invert option, the filter is reversed and the program will drop all packets matching the filter expression.

Note: This is work in progress and not working yet as intended (i.e. no valid XDP eBPF programs are generated). However, Feedback, suggestions and patches are already welcome!

Usage

Usage: filter2xdp [OPTIONS...] -i <dev> FILTER
Options:
  -i/--interface <dev>  Network device (required)
  -n/--invert           Invert filter, drop matching packets
  -v/--verbose          Verbose mode
  -h/--help             Show this help message

Prerequisites

  • Linux Kernel 4.8+
  • libpcap (development library and headers)

License

filter2xdp is subject to the GPL, version 2.

Please see the COPYING file for the full license text.

Resources

filter2xdp's People

Contributors

tklauser avatar

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.