struct nft_xt_restore_cb {
void (*table_new)(struct nft_handle *h, const char *table);
- struct nftnl_chain_list *(*chain_list)(struct nft_handle *h,
- const char *table);
int (*chain_set)(struct nft_handle *h, const char *table,
const char *chain, const char *policy,
const struct xt_counters *counters);
" [ --ipv6 ]\n", name);
}
-static struct nftnl_chain_list *get_chain_list(struct nft_handle *h,
- const char *table)
-{
- struct nftnl_chain_list *chain_list;
-
- chain_list = nft_chain_list_get(h, table, NULL);
- if (chain_list == NULL)
- xtables_error(OTHER_PROBLEM, "cannot retrieve chain list\n");
-
- return chain_list;
-}
-
static const struct nft_xt_restore_cb restore_cb = {
- .chain_list = get_chain_list,
.commit = nft_commit,
.abort = nft_abort,
.table_new = nft_table_new,
}
static const struct nft_xt_restore_cb ebt_restore_cb = {
- .chain_list = get_chain_list,
.commit = nft_bridge_commit,
.table_new = nft_table_new,
.table_flush = ebt_table_flush,
}
static const struct nft_xt_restore_cb arp_restore_cb = {
- .chain_list = get_chain_list,
.commit = nft_commit,
.table_new = nft_table_new,
.table_flush = nft_table_flush,