#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <libnftnl/common.h>
Macros | |
#define | NFT_CHAIN_ATTR_MAX (__NFT_CHAIN_ATTR_MAX - 1) |
#define | nft_chain_nlmsg_build_hdr nft_nlmsg_build_hdr |
#define NFT_CHAIN_ATTR_MAX (__NFT_CHAIN_ATTR_MAX - 1) |
Referenced by nft_chain_attr_set_data().
#define nft_chain_nlmsg_build_hdr nft_nlmsg_build_hdr |
anonymous enum |
Referenced by alloc_nft_chain(), nft_chain_user_add(), and nft_chain_user_rename().
References nft_chain_attr_get_data().
Referenced by nft_chain_attr_get_str(), nft_chain_zero_counters(), nft_rule_list(), and nft_xtables_config_load().
References nft_chain::bytes, nft_chain::family, nft_chain::flags, nft_chain::handle, nft_chain::hooknum, nft_chain::name, NFT_CHAIN_ATTR_BYTES, NFT_CHAIN_ATTR_FAMILY, NFT_CHAIN_ATTR_HANDLE, NFT_CHAIN_ATTR_HOOKNUM, NFT_CHAIN_ATTR_NAME, NFT_CHAIN_ATTR_PACKETS, NFT_CHAIN_ATTR_POLICY, NFT_CHAIN_ATTR_PRIO, NFT_CHAIN_ATTR_TABLE, NFT_CHAIN_ATTR_TYPE, NFT_CHAIN_ATTR_USE, NULL, nft_chain::packets, nft_chain::policy, nft_chain::prio, nft_chain::table, nft_chain::type, and nft_chain::use.
Referenced by nft_chain_attr_get(), nft_chain_attr_get_s32(), nft_chain_attr_get_u32(), nft_chain_attr_get_u64(), and nft_chain_attr_get_u8().
References nft_chain_attr_get().
Referenced by nft_chain_list_find(), nft_chain_save(), nft_chain_user_del(), nft_rule_flush(), nft_rule_list(), nft_rule_list_save(), and nft_table_purge_chains().
References nft_assert, and nft_chain_attr_get_data().
Referenced by mnl_nft_chain_add(), mnl_nft_chain_batch_add(), mnl_nft_chain_batch_del(), mnl_nft_chain_delete(), mnl_nft_chain_get(), nft_rule_list(), and nft_xtables_config_load().
References nft_assert, and nft_chain_attr_get_data().
Referenced by nft_chain_user_rename(), and nft_rule_list().
References nft_chain::flags.
References nft_chain_attr_set_data().
Referenced by nft_chain_user_add(), and nft_chain_user_rename().
void nft_chain_attr_set_data | ( | struct nft_chain * | t, |
uint16_t | attr, | ||
const void * | data, | ||
uint32_t | data_len | ||
) |
References nft_chain::bytes, nft_chain::family, nft_chain::flags, nft_chain::handle, nft_chain::hooknum, nft_chain::name, nft_assert_validate, NFT_CHAIN_ATTR_BYTES, NFT_CHAIN_ATTR_FAMILY, NFT_CHAIN_ATTR_HANDLE, NFT_CHAIN_ATTR_HOOKNUM, NFT_CHAIN_ATTR_MAX, NFT_CHAIN_ATTR_NAME, NFT_CHAIN_ATTR_PACKETS, NFT_CHAIN_ATTR_POLICY, NFT_CHAIN_ATTR_PRIO, NFT_CHAIN_ATTR_TABLE, NFT_CHAIN_ATTR_TYPE, NFT_CHAIN_ATTR_USE, NFT_CHAIN_MAXNAMELEN, nft_chain::packets, nft_chain::policy, nft_chain::prio, nft_chain::table, nft_chain::type, nft_chain::use, and xfree.
Referenced by nft_chain_attr_set(), nft_chain_attr_set_s32(), nft_chain_attr_set_str(), nft_chain_attr_set_u32(), nft_chain_attr_set_u64(), and nft_chain_attr_set_u8().
References nft_chain_attr_set_data().
Referenced by alloc_nft_chain().
References nft_chain_attr_set_data().
Referenced by alloc_nft_chain().
References nft_chain_attr_set_data().
Referenced by alloc_nft_chain(), nft_chain_user_rename(), and nft_chain_zero_counters().
References nft_chain::flags, NFT_CHAIN_ATTR_BYTES, NFT_CHAIN_ATTR_FAMILY, NFT_CHAIN_ATTR_HANDLE, NFT_CHAIN_ATTR_HOOKNUM, NFT_CHAIN_ATTR_NAME, NFT_CHAIN_ATTR_PACKETS, NFT_CHAIN_ATTR_POLICY, NFT_CHAIN_ATTR_PRIO, NFT_CHAIN_ATTR_TABLE, NFT_CHAIN_ATTR_TYPE, NFT_CHAIN_ATTR_USE, NULL, nft_chain::table, nft_chain::type, and xfree.
Referenced by nft_chain_zero_counters().
References NULL, nft_chain::table, nft_chain::type, and xfree.
Referenced by netlink_get_chain(), nft_chain_add(), nft_chain_list_free(), nft_chain_user_add(), and nft_chain_user_rename().
void nft_chain_list_add | ( | struct nft_chain * | r, |
struct nft_chain_list * | list | ||
) |
References nft_chain::head, and nft_chain_list::list.
void nft_chain_list_add_tail | ( | struct nft_chain * | r, |
struct nft_chain_list * | list | ||
) |
References nft_chain::head, and nft_chain_list::list.
struct nft_chain_list* nft_chain_list_alloc | ( | void | ) |
References INIT_LIST_HEAD, nft_chain_list::list, and NULL.
Referenced by mnl_chain_dump(), mnl_nft_chain_dump(), and nft_xtables_config_load().
References nft_chain::head.
int nft_chain_list_foreach | ( | struct nft_chain_list * | chain_list, |
int(*)(struct nft_chain *t, void *data) | cb, | ||
void * | data | ||
) |
void nft_chain_list_free | ( | struct nft_chain_list * | list | ) |
References nft_chain::head, nft_chain_list::list, list_for_each_entry_safe, nft_chain_free(), and xfree.
Referenced by mnl_chain_dump(), mnl_nft_chain_dump(), netlink_list_chains(), nft_chain_save(), nft_chain_user_del(), nft_chain_zero_counters(), nft_rule_flush(), nft_rule_list(), nft_rule_list_save(), nft_ruleset_attr_unset(), nft_ruleset_free(), and nft_xtables_config_load().
int nft_chain_list_is_empty | ( | struct nft_chain_list * | list | ) |
References nft_chain_list::list.
Referenced by nft_ruleset_fprintf().
struct nft_chain_list_iter* nft_chain_list_iter_create | ( | struct nft_chain_list * | l | ) |
References nft_chain_list_iter::cur, nft_chain_list::list, nft_chain_list_iter::list, list_entry, list_head::next, and NULL.
Referenced by nft_chain_list_find(), nft_chain_save(), nft_chain_user_del(), nft_chain_zero_counters(), nft_rule_flush(), nft_rule_list(), nft_rule_list_save(), nft_table_purge_chains(), and nft_xtables_config_load().
void nft_chain_list_iter_destroy | ( | struct nft_chain_list_iter * | iter | ) |
References xfree.
Referenced by nft_chain_list_find(), nft_chain_save(), nft_chain_user_del(), nft_chain_zero_counters(), nft_rule_flush(), nft_rule_list(), nft_rule_list_save(), nft_table_purge_chains(), and nft_xtables_config_load().
struct nft_chain* nft_chain_list_iter_next | ( | struct nft_chain_list_iter * | iter | ) |
References nft_chain_list_iter::cur, nft_chain::head, nft_chain_list::list, nft_chain_list_iter::list, list_entry, list_head::next, and NULL.
Referenced by nft_chain_list_find(), nft_chain_save(), nft_chain_user_del(), nft_chain_zero_counters(), nft_rule_flush(), nft_rule_list(), nft_rule_list_save(), nft_table_purge_chains(), and nft_xtables_config_load().
References be64toh, nft_chain::bytes, nft_chain::flags, nft_chain::handle, nft_chain::hooknum, mnl_attr_nest_end(), mnl_attr_nest_start(), mnl_attr_put_strz(), mnl_attr_put_u32(), mnl_attr_put_u64(), nft_chain::name, NFT_CHAIN_ATTR_BYTES, NFT_CHAIN_ATTR_HANDLE, NFT_CHAIN_ATTR_HOOKNUM, NFT_CHAIN_ATTR_NAME, NFT_CHAIN_ATTR_PACKETS, NFT_CHAIN_ATTR_POLICY, NFT_CHAIN_ATTR_PRIO, NFT_CHAIN_ATTR_TABLE, NFT_CHAIN_ATTR_TYPE, NFT_CHAIN_ATTR_USE, NFTA_CHAIN_COUNTERS, NFTA_CHAIN_HANDLE, NFTA_CHAIN_HOOK, NFTA_CHAIN_NAME, NFTA_CHAIN_POLICY, NFTA_CHAIN_TABLE, NFTA_CHAIN_TYPE, NFTA_CHAIN_USE, NFTA_COUNTER_BYTES, NFTA_COUNTER_PACKETS, NFTA_HOOK_HOOKNUM, NFTA_HOOK_PRIORITY, nft_chain::packets, nft_chain::policy, nft_chain::prio, nft_chain::table, nft_chain::type, and nft_chain::use.
Referenced by mnl_nft_chain_add(), mnl_nft_chain_batch_add(), mnl_nft_chain_batch_del(), mnl_nft_chain_delete(), mnl_nft_chain_get(), nft_chain_add(), nft_chain_user_add(), nft_chain_user_rename(), and nft_chain_zero_counters().
References be64toh, nft_chain::family, nft_chain::flags, nft_chain::handle, mnl_attr_get_str(), mnl_attr_get_u32(), mnl_attr_get_u64(), mnl_attr_parse(), mnl_nlmsg_get_payload(), nft_chain::name, nfgenmsg::nfgen_family, NFT_CHAIN_ATTR_FAMILY, NFT_CHAIN_ATTR_HANDLE, NFT_CHAIN_ATTR_NAME, NFT_CHAIN_ATTR_POLICY, NFT_CHAIN_ATTR_TABLE, NFT_CHAIN_ATTR_TYPE, NFT_CHAIN_ATTR_USE, NFT_CHAIN_MAXNAMELEN, NFTA_CHAIN_COUNTERS, NFTA_CHAIN_HANDLE, NFTA_CHAIN_HOOK, NFTA_CHAIN_MAX, NFTA_CHAIN_NAME, NFTA_CHAIN_POLICY, NFTA_CHAIN_TABLE, NFTA_CHAIN_TYPE, NFTA_CHAIN_USE, nft_chain::policy, nft_chain::table, nft_chain::type, and nft_chain::use.
int nft_chain_parse | ( | struct nft_chain * | c, |
enum nft_parse_type | type, | ||
const char * | data, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_BUFFER.
int nft_chain_parse_file | ( | struct nft_chain * | c, |
enum nft_parse_type | type, | ||
FILE * | fp, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_FILE.
int nft_chain_snprintf | ( | char * | buf, |
size_t | size, | ||
struct nft_chain * | t, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References nft_event_footer_snprintf(), nft_event_header_snprintf(), NFT_OUTPUT_DEFAULT, NFT_OUTPUT_JSON, NFT_OUTPUT_XML, size, and SNPRINTF_BUFFER_SIZE.
Referenced by netlink_dump_chain(), and nft_chain_add().