bpfilter icon indicating copy to clipboard operation
bpfilter copied to clipboard

Introduce `bfcli`: a generic command line interface to communicate with the daemon

Open qdeslandes opened this issue 1 year ago • 0 comments

bpfilter is configurable through nftables and iptables. However, both command line tools only support a limited subset of feature of bpfilter. For example, it's not possible to choose the exact hook the BPF programs will be attached to with nftables. This lead to a situation where none of the front-ends allow for TC programs creation, meaning the TC generation logic has evolved over time but couldn't be properly tested.

To resolve this issue and have a solution to more thoroughly test bpfilter's features, a new command line interface has been added. Its purpose is to allow any combination of feature to be tested with bpfilter.

The new command line interface (bfcli) uses Flex and Bison to parse a simple grammar (see tests/rules.bpfilter).

qdeslandes avatar Aug 14 '24 16:08 qdeslandes