Crate nftables

Source
Expand description

nftables-rs is a Rust library designed to provide a safe and easy-to-use abstraction over the nftables JSON API, known as libnftables-json.

This library is engineered for developers who need to interact with nftables, the Linux kernel’s next-generation firewalling tool, directly from Rust applications.

By abstracting the underlying JSON API, nftables-rs facilitates the creation, manipulation, and application of firewall rulesets without requiring deep knowledge of nftables’ internal workings.

Modules§

batch
Contains Batch object to be used to prepare Nftables payloads.
cli
Contains handling and parsing of command line arguments.
expr
Contains expressions. Expressions are the building blocks of (most) statements.
helper
Contains methods to communicate with nftables JSON API.
schema
Contains the global structure of an Nftables document.
stmt
Contains Statements. Statements are the building blocks for rules.
types
Contains common type definitions referred to in the schema.
visitor
Contains node visitors for serde.