diff options
Diffstat (limited to 'nftnl')
-rw-r--r-- | nftnl/examples/add-rules.rs | 4 | ||||
-rw-r--r-- | nftnl/src/lib.rs | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/nftnl/examples/add-rules.rs b/nftnl/examples/add-rules.rs index 2d6eba5..496d321 100644 --- a/nftnl/examples/add-rules.rs +++ b/nftnl/examples/add-rules.rs @@ -17,14 +17,14 @@ //! type filter hook output priority 0; policy accept; //! ip daddr 10.1.0.0/24 counter packets 0 bytes 0 accept //! } -//! +//! //! chain chain-for-incoming-packets { //! type filter hook input priority 0; policy accept; //! iif "lo" accept //! } //! } //! ``` -//! +//! //! Try pinging any IP in the network range denoted by the outgoing rule and see the counter //! increment: //! ```bash diff --git a/nftnl/src/lib.rs b/nftnl/src/lib.rs index f1450af..6364289 100644 --- a/nftnl/src/lib.rs +++ b/nftnl/src/lib.rs @@ -19,12 +19,19 @@ //! One can also look at how the original project this crate was developed to support uses it: //! [Mullvad VPN app](https://github.com/mullvad/mullvadvpn-app) //! +//! Understanding how to use [`libnftnl`] and implementing this crate has mostly been done by +//! reading the source code for the [`nftables`] program and attaching debuggers to the `nft` +//! binary. Since the implementation is mostly based on trial and error, there might of course be +//! a number of places where the underlying library is used in an invalid or not intended way. +//! Large portions of [`libnftnl`] are also not covered yet. Contributions are welcome! +//! //! # Selecting version of `libnftnl` //! //! See the documentation for the corresponding sys crate for details: [`nftnl-sys`] //! This crate has the same features as the sys crate, and selecting version works the same. //! //! [`libnftnl`]: https://netfilter.org/projects/libnftnl/ +//! [`nftables`]: https://netfilter.org/projects/nftables/ //! [`nftnl-sys`]: https://crates.io/crates/nftnl-sys pub extern crate nftnl_sys; |