summaryrefslogtreecommitdiffstats
path: root/debian/examples/README.examples
diff options
context:
space:
mode:
Diffstat (limited to 'debian/examples/README.examples')
-rw-r--r--debian/examples/README.examples15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/examples/README.examples b/debian/examples/README.examples
new file mode 100644
index 0000000..403ef5d
--- /dev/null
+++ b/debian/examples/README.examples
@@ -0,0 +1,15 @@
+These are examples C codes of what you can achieve with libnftnl.
+Basic functions are:
+ * fetch the ruleset from the kernel.
+ * update (add/delete) the ruleset.
+ * Set-up an event listener environment.
+ * Play with nftables sets infraestructure
+
+To compile the examples, run:
+ $ gcc -lmnl -lnftnl nft-rule-add.c -o nft-rule-add
+
+You will need the Linux kernel nf_tables.h header:
+ * linux/netfilter/nf_tables.h
+
+Then you can run:
+ $ sudo ./nft-rule-add ip filter input