Debian Codegraph @

debian/examples/README.examples

raw
1 These are examples C codes of what you can achieve with libnftnl.
2 Basic functions are:
3 * fetch the ruleset from the kernel.
4 * update (add/delete) the ruleset.
5 * Set-up an event listener environment.
6 * Play with nftables sets infraestructure
7
8 To compile the examples, run:
9 $ gcc -lmnl -lnftnl nft-rule-add.c -o nft-rule-add
10
11 You will need the Linux kernel nf_tables.h header:
12 * linux/netfilter/nf_tables.h
13
14 Then you can run:
15 $ sudo ./nft-rule-add ip filter input