#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <libnftnl/common.h>
Macros | |
#define | NFT_TABLE_ATTR_MAX (__NFT_TABLE_ATTR_MAX - 1) |
#define | nft_table_nlmsg_build_hdr nft_nlmsg_build_hdr |
Enumerations | |
enum | { NFT_TABLE_ATTR_NAME = 0, NFT_TABLE_ATTR_FAMILY, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_USE, __NFT_TABLE_ATTR_MAX } |
#define NFT_TABLE_ATTR_MAX (__NFT_TABLE_ATTR_MAX - 1) |
Referenced by nft_table_attr_set_data().
#define nft_table_nlmsg_build_hdr nft_nlmsg_build_hdr |
anonymous enum |
References nft_table_attr_get_data().
Referenced by nft_for_each_table(), nft_table_attr_get_str(), nft_table_attr_get_u32(), nft_table_attr_get_u8(), nft_table_find(), and nft_xtables_config_load().
References nft_table::family, nft_table::flags, nft_table::name, NFT_TABLE_ATTR_FAMILY, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_NAME, NFT_TABLE_ATTR_USE, NULL, nft_table::table_flags, and nft_table::use.
Referenced by nft_table_attr_get().
References nft_table_attr_get().
Referenced by mnl_ruleset_dump().
References nft_table_attr_get(), and NULL.
Referenced by mnl_nft_table_add(), mnl_nft_table_batch_add(), mnl_nft_table_batch_del(), mnl_nft_table_delete(), mnl_nft_table_get(), mnl_ruleset_dump(), and nft_xtables_config_load().
References nft_table::flags.
References nft_table_attr_set_data().
Referenced by alloc_nft_table().
void nft_table_attr_set_data | ( | struct nft_table * | t, |
uint16_t | attr, | ||
const void * | data, | ||
uint32_t | data_len | ||
) |
References nft_table::family, nft_table::flags, nft_table::name, nft_assert_validate, NFT_TABLE_ATTR_FAMILY, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_MAX, NFT_TABLE_ATTR_NAME, NFT_TABLE_ATTR_USE, nft_table::table_flags, nft_table::use, and xfree.
Referenced by nft_table_attr_set(), nft_table_attr_set_str(), nft_table_attr_set_u32(), and nft_table_attr_set_u8().
References nft_table_attr_set_data().
Referenced by alloc_nft_table().
References nft_table::flags, nft_table::name, NFT_TABLE_ATTR_FAMILY, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_NAME, NFT_TABLE_ATTR_USE, NULL, and xfree.
References nft_table::flags, nft_table::name, NFT_TABLE_ATTR_NAME, and xfree.
Referenced by netlink_flush_ruleset(), netlink_get_table(), nft_table_add(), and nft_table_list_free().
void nft_table_list_add | ( | struct nft_table * | r, |
struct nft_table_list * | list | ||
) |
References nft_table::head, and nft_table_list::list.
void nft_table_list_add_tail | ( | struct nft_table * | r, |
struct nft_table_list * | list | ||
) |
References nft_table::head, and nft_table_list::list.
struct nft_table_list* nft_table_list_alloc | ( | void | ) |
References INIT_LIST_HEAD, nft_table_list::list, and NULL.
Referenced by mnl_nft_table_dump(), mnl_table_dump(), and nft_xtables_config_load().
References nft_table::head.
int nft_table_list_foreach | ( | struct nft_table_list * | table_list, |
int(*)(struct nft_table *t, void *data) | cb, | ||
void * | data | ||
) |
References nft_table::head, nft_table_list::list, and list_for_each_entry_safe.
Referenced by netlink_list_tables().
void nft_table_list_free | ( | struct nft_table_list * | list | ) |
References nft_table::head, nft_table_list::list, list_for_each_entry_safe, nft_table_free(), and xfree.
Referenced by mnl_nft_table_dump(), mnl_table_dump(), netlink_list_tables(), nft_for_each_table(), nft_ruleset_attr_unset(), nft_ruleset_free(), nft_table_find(), and nft_xtables_config_load().
int nft_table_list_is_empty | ( | struct nft_table_list * | list | ) |
References nft_table_list::list.
Referenced by nft_ruleset_fprintf().
struct nft_table_list_iter* nft_table_list_iter_create | ( | struct nft_table_list * | l | ) |
References nft_table_list_iter::cur, nft_table_list::list, nft_table_list_iter::list, list_entry, list_head::next, and NULL.
Referenced by mnl_ruleset_dump(), nft_for_each_table(), nft_table_find(), and nft_xtables_config_load().
void nft_table_list_iter_destroy | ( | struct nft_table_list_iter * | iter | ) |
References xfree.
Referenced by mnl_ruleset_dump(), and nft_xtables_config_load().
struct nft_table* nft_table_list_iter_next | ( | struct nft_table_list_iter * | iter | ) |
References nft_table_list_iter::cur, nft_table::head, nft_table_list::list, nft_table_list_iter::list, list_entry, list_head::next, and NULL.
Referenced by mnl_ruleset_dump(), nft_for_each_table(), nft_table_find(), and nft_xtables_config_load().
References nft_table::flags, mnl_attr_put_strz(), mnl_attr_put_u32(), nft_table::name, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_NAME, NFTA_TABLE_FLAGS, NFTA_TABLE_NAME, and nft_table::table_flags.
Referenced by mnl_nft_table_add(), mnl_nft_table_batch_add(), mnl_nft_table_batch_del(), mnl_nft_table_delete(), and nft_table_add().
References nft_table::family, nft_table::flags, mnl_attr_get_str(), mnl_attr_get_u32(), mnl_attr_parse(), mnl_nlmsg_get_payload(), nft_table::name, nfgenmsg::nfgen_family, NFT_TABLE_ATTR_FAMILY, NFT_TABLE_ATTR_FLAGS, NFT_TABLE_ATTR_NAME, NFT_TABLE_ATTR_USE, NFTA_TABLE_FLAGS, NFTA_TABLE_MAX, NFTA_TABLE_NAME, NFTA_TABLE_USE, nft_table::table_flags, and nft_table::use.
int nft_table_parse | ( | struct nft_table * | t, |
enum nft_parse_type | type, | ||
const char * | data, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_BUFFER.
int nft_table_parse_file | ( | struct nft_table * | t, |
enum nft_parse_type | type, | ||
FILE * | fp, | ||
struct nft_parse_err * | err | ||
) |
References NFT_PARSE_FILE.
int nft_table_snprintf | ( | char * | buf, |
size_t | size, | ||
struct nft_table * | t, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References len, 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_table(), and nft_table_add().