Linux::NFTables - Perl interface to libnftables
my $nft = Linux::NFTables->new()->set_output_options('json');
my $json = $nft->run_cmd("list tables");
This module provides a Perl interface to nftables.
Strings into & out of this module are byte strings.
Instantiates CLASS.
Returns a boolean that indicates whether OBJ is set to dry-run mode.
Sets or unsets dry-run mode in OBJ. If the parameter is not given, this defaults to ON.
Passes an arbitrary command string to nftables and returns its output.
Returns a list of names, e.g., json
or guid
. Must be called
in list context.
Possible values are libnftables’s various NFT_CTX_OUTPUT_*
constants
(minus that prefix).
A setter complement to get_output_options()
.
Like get_output_options()
but for debug options.
Possible values are libnftables’s various NFT_DEBUG_*
constants
(minux that prefix).
A setter complement to get_debug_options()
.