#include "internal.h"
#include <time.h>
#include <endian.h>
#include <stdint.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <errno.h>
#include <libmnl/libmnl.h>
#include <linux/netfilter/nfnetlink.h>
#include <linux/netfilter/nf_tables.h>
#include <libnftnl/table.h>
#include <buffer.h>
Data Structures | |
struct | nft_table |
struct | nft_table_list |
struct | nft_table_list_iter |
EXPORT_SYMBOL | ( | nft_table_alloc | ) |
EXPORT_SYMBOL | ( | nft_table_free | ) |
EXPORT_SYMBOL | ( | nft_table_attr_is_set | ) |
EXPORT_SYMBOL | ( | nft_table_attr_unset | ) |
EXPORT_SYMBOL | ( | nft_table_attr_set_data | ) |
EXPORT_SYMBOL | ( | nft_table_attr_set | ) |
EXPORT_SYMBOL | ( | nft_table_attr_set_u32 | ) |
EXPORT_SYMBOL | ( | nft_table_attr_set_u8 | ) |
EXPORT_SYMBOL | ( | nft_table_attr_set_str | ) |
EXPORT_SYMBOL | ( | nft_table_attr_get_data | ) |
EXPORT_SYMBOL | ( | nft_table_attr_get | ) |
EXPORT_SYMBOL | ( | nft_table_attr_get_u32 | ) |
EXPORT_SYMBOL | ( | nft_table_attr_get_u8 | ) |
EXPORT_SYMBOL | ( | nft_table_attr_get_str | ) |
EXPORT_SYMBOL | ( | nft_table_nlmsg_build_payload | ) |
EXPORT_SYMBOL | ( | nft_table_nlmsg_parse | ) |
EXPORT_SYMBOL | ( | nft_table_parse | ) |
EXPORT_SYMBOL | ( | nft_table_parse_file | ) |
EXPORT_SYMBOL | ( | nft_table_snprintf | ) |
EXPORT_SYMBOL | ( | nft_table_fprintf | ) |
EXPORT_SYMBOL | ( | nft_table_list_alloc | ) |
EXPORT_SYMBOL | ( | nft_table_list_free | ) |
EXPORT_SYMBOL | ( | nft_table_list_is_empty | ) |
EXPORT_SYMBOL | ( | nft_table_list_add | ) |
EXPORT_SYMBOL | ( | nft_table_list_add_tail | ) |
EXPORT_SYMBOL | ( | nft_table_list_del | ) |
EXPORT_SYMBOL | ( | nft_table_list_foreach | ) |
EXPORT_SYMBOL | ( | nft_table_list_iter_create | ) |
EXPORT_SYMBOL | ( | nft_table_list_iter_next | ) |
EXPORT_SYMBOL | ( | nft_table_list_iter_destroy | ) |
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().