#include <errno.h>
#include "internal.h"
#include <stdlib.h>
#include <libmnl/libmnl.h>
#include <libnftnl/ruleset.h>
#include <libnftnl/table.h>
#include <libnftnl/chain.h>
#include <libnftnl/set.h>
#include <libnftnl/rule.h>
Data Structures | |
struct | nft_ruleset |
Macros | |
#define | NFT_FPRINTF_RETURN_OR_FIXLEN(ret, len) |
#define NFT_FPRINTF_RETURN_OR_FIXLEN | ( | ret, | |
len | |||
) |
Referenced by nft_ruleset_fprintf().
EXPORT_SYMBOL | ( | nft_ruleset_alloc | ) |
EXPORT_SYMBOL | ( | nft_ruleset_free | ) |
EXPORT_SYMBOL | ( | nft_ruleset_attr_is_set | ) |
EXPORT_SYMBOL | ( | nft_ruleset_attr_unset | ) |
EXPORT_SYMBOL | ( | nft_ruleset_attr_set | ) |
EXPORT_SYMBOL | ( | nft_ruleset_attr_get | ) |
EXPORT_SYMBOL | ( | nft_ruleset_parse | ) |
EXPORT_SYMBOL | ( | nft_ruleset_parse_file | ) |
EXPORT_SYMBOL | ( | nft_ruleset_snprintf | ) |
EXPORT_SYMBOL | ( | nft_ruleset_fprintf | ) |
struct nft_ruleset* nft_ruleset_alloc | ( | void | ) |
Referenced by mnl_nft_ruleset_dump(), and mnl_ruleset_dump().
void* nft_ruleset_attr_get | ( | const struct nft_ruleset * | r, |
uint16_t | attr | ||
) |
bool nft_ruleset_attr_is_set | ( | const struct nft_ruleset * | r, |
uint16_t | attr | ||
) |
References nft_ruleset::flags.
Referenced by nft_ruleset_fprintf().
void nft_ruleset_attr_set | ( | struct nft_ruleset * | r, |
uint16_t | attr, | ||
void * | data | ||
) |
References nft_ruleset::chain_list, data, nft_ruleset::flags, NFT_RULESET_ATTR_CHAINLIST, NFT_RULESET_ATTR_RULELIST, NFT_RULESET_ATTR_SETLIST, NFT_RULESET_ATTR_TABLELIST, nft_ruleset_attr_unset(), nft_ruleset::rule_list, nft_ruleset::set_list, and nft_ruleset::table_list.
Referenced by mnl_nft_ruleset_dump(), and mnl_ruleset_dump().
void nft_ruleset_attr_unset | ( | struct nft_ruleset * | r, |
uint16_t | attr | ||
) |
References nft_ruleset::chain_list, nft_ruleset::flags, nft_chain_list_free(), nft_rule_list_free(), NFT_RULESET_ATTR_CHAINLIST, NFT_RULESET_ATTR_RULELIST, NFT_RULESET_ATTR_SETLIST, NFT_RULESET_ATTR_TABLELIST, nft_set_list_free(), nft_table_list_free(), NULL, nft_ruleset::rule_list, nft_ruleset::set_list, and nft_ruleset::table_list.
Referenced by nft_ruleset_attr_set().
int nft_ruleset_fprintf | ( | FILE * | fp, |
const struct nft_ruleset * | rs, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References nft_ruleset::chain_list, flags, len, nft_chain_list_is_empty(), nft_event_footer_fprintf(), nft_event_header_fprintf(), NFT_FPRINTF_RETURN_OR_FIXLEN, NFT_OF_EVENT_ANY, nft_rule_list_is_empty(), NFT_RULESET_ATTR_CHAINLIST, nft_ruleset_attr_is_set(), NFT_RULESET_ATTR_RULELIST, NFT_RULESET_ATTR_SETLIST, NFT_RULESET_ATTR_TABLELIST, nft_set_list_is_empty(), nft_table_list_is_empty(), NULL, nft_ruleset::rule_list, nft_ruleset::set_list, and nft_ruleset::table_list.
void nft_ruleset_free | ( | struct nft_ruleset * | r | ) |
References nft_ruleset::chain_list, nft_ruleset::flags, nft_chain_list_free(), nft_rule_list_free(), NFT_RULESET_ATTR_CHAINLIST, NFT_RULESET_ATTR_RULELIST, NFT_RULESET_ATTR_SETLIST, NFT_RULESET_ATTR_TABLELIST, nft_set_list_free(), nft_table_list_free(), nft_ruleset::rule_list, nft_ruleset::set_list, nft_ruleset::table_list, and xfree.
Referenced by mnl_nft_ruleset_dump(), and netlink_dump_ruleset().
int nft_ruleset_parse | ( | struct nft_ruleset * | r, |
enum nft_parse_type | type, | ||
const char * | data, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_BUFFER.
int nft_ruleset_parse_file | ( | struct nft_ruleset * | rs, |
enum nft_parse_type | type, | ||
FILE * | fp, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_FILE.
int nft_ruleset_snprintf | ( | char * | buf, |
size_t | size, | ||
const struct nft_ruleset * | r, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References NFT_OUTPUT_DEFAULT, NFT_OUTPUT_JSON, and NFT_OUTPUT_XML.
Referenced by netlink_dump_ruleset().