struct mnl_nlmsg_batch *batch;
};
+static void *nft_nlmsg_batch_current(void)
+{
+ return mnl_nlmsg_batch_current(batch);
+}
+
static void mnl_batch_page_add(void)
{
struct batch_page *batch_page;
struct nlmsghdr *last_nlh;
/* Get the last message not fitting in the batch */
- last_nlh = mnl_nlmsg_batch_current(batch);
+ last_nlh = nft_nlmsg_batch_current();
batch_page = xmalloc(sizeof(struct batch_page));
batch_page->batch = batch;
batch = mnl_batch_alloc();
/* Copy the last message not fitting to the new batch page */
- memcpy(mnl_nlmsg_batch_current(batch), last_nlh, last_nlh->nlmsg_len);
+ memcpy(nft_nlmsg_batch_current(), last_nlh, last_nlh->nlmsg_len);
/* No overflow may happen as this is a new empty batch page */
mnl_nlmsg_batch_next(batch);
}
struct nlmsghdr *nlh;
struct nfgenmsg *nfg;
- nlh = mnl_nlmsg_put_header(mnl_nlmsg_batch_current(batch));
+ nlh = mnl_nlmsg_put_header(nft_nlmsg_batch_current());
nlh->nlmsg_type = type;
nlh->nlmsg_flags = NLM_F_REQUEST;
nlh->nlmsg_seq = mnl_seqnum_alloc();
{
struct nlmsghdr *nlh;
- nlh = nft_rule_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_rule_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_NEWRULE,
nft_rule_attr_get_u32(nlr, NFT_RULE_ATTR_FAMILY),
NLM_F_CREATE | flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_rule_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_rule_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_DELRULE,
nft_rule_attr_get_u32(nlr, NFT_RULE_ATTR_FAMILY),
0, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_chain_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_chain_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_NEWCHAIN,
nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_FAMILY),
NLM_F_CREATE | flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_chain_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_chain_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_DELCHAIN,
nft_chain_attr_get_u32(nlc, NFT_CHAIN_ATTR_FAMILY),
NLM_F_ACK, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_table_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_table_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_NEWTABLE,
nft_table_attr_get_u32(nlt, NFT_TABLE_ATTR_FAMILY),
flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_table_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_table_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_DELTABLE,
nft_table_attr_get_u32(nlt, NFT_TABLE_ATTR_FAMILY),
NLM_F_ACK, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_set_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_set_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_NEWSET,
nft_set_attr_get_u32(nls, NFT_SET_ATTR_FAMILY),
NLM_F_CREATE | flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_set_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_set_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_DELSET,
nft_set_attr_get_u32(nls, NFT_SET_ATTR_FAMILY),
flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_set_elem_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_set_elem_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_NEWSETELEM,
nft_set_attr_get_u32(nls, NFT_SET_ATTR_FAMILY),
NLM_F_CREATE | flags, seqnum);
{
struct nlmsghdr *nlh;
- nlh = nft_set_elem_nlmsg_build_hdr(mnl_nlmsg_batch_current(batch),
+ nlh = nft_set_elem_nlmsg_build_hdr(nft_nlmsg_batch_current(),
NFT_MSG_DELSETELEM,
nft_set_attr_get_u32(nls, NFT_SET_ATTR_FAMILY),
0, seqnum);