#include <stdlib.h>
#include <sys/socket.h>
#include <time.h>
#include <linux/netlink.h>
#include <linux/netfilter/nfnetlink.h>
#include <libmnl/libmnl.h>
#include <libnftnl/common.h>
#include <libnftnl/set.h>
#include <errno.h>
#include "internal.h"
Functions | |
struct nlmsghdr * | nft_nlmsg_build_hdr (char *buf, uint16_t cmd, uint16_t family, uint16_t type, uint32_t seq) |
EXPORT_SYMBOL (nft_nlmsg_build_hdr) | |
struct nft_parse_err * | nft_parse_err_alloc (void) |
EXPORT_SYMBOL (nft_parse_err_alloc) | |
void | nft_parse_err_free (struct nft_parse_err *err) |
EXPORT_SYMBOL (nft_parse_err_free) | |
int | nft_parse_perror (const char *msg, struct nft_parse_err *err) |
EXPORT_SYMBOL (nft_parse_perror) | |
int | nft_event_header_snprintf (char *buf, size_t size, uint32_t type, uint32_t flags) |
int | nft_event_header_fprintf (FILE *fp, uint32_t type, uint32_t flags) |
int | nft_event_footer_snprintf (char *buf, size_t size, uint32_t type, uint32_t flags) |
int | nft_event_footer_fprintf (FILE *fp, uint32_t type, uint32_t flags) |
void | nft_batch_begin (char *buf, uint32_t seq) |
EXPORT_SYMBOL (nft_batch_begin) | |
void | nft_batch_end (char *buf, uint32_t seq) |
EXPORT_SYMBOL (nft_batch_end) | |
int | nft_batch_is_supported (void) |
EXPORT_SYMBOL (nft_batch_is_supported) | |
EXPORT_SYMBOL | ( | nft_nlmsg_build_hdr | ) |
EXPORT_SYMBOL | ( | nft_parse_err_alloc | ) |
EXPORT_SYMBOL | ( | nft_parse_err_free | ) |
EXPORT_SYMBOL | ( | nft_parse_perror | ) |
EXPORT_SYMBOL | ( | nft_batch_begin | ) |
EXPORT_SYMBOL | ( | nft_batch_end | ) |
EXPORT_SYMBOL | ( | nft_batch_is_supported | ) |
void nft_batch_begin | ( | char * | buf, |
uint32_t | seq | ||
) |
References NFNL_MSG_BATCH_BEGIN.
Referenced by mnl_batch_begin(), and nft_batch_is_supported().
void nft_batch_end | ( | char * | buf, |
uint32_t | seq | ||
) |
References NFNL_MSG_BATCH_END.
Referenced by mnl_batch_end(), and nft_batch_is_supported().
int nft_batch_is_supported | ( | void | ) |
References mnl_cb_run(), mnl_nlmsg_batch_current(), mnl_nlmsg_batch_head(), mnl_nlmsg_batch_next(), mnl_nlmsg_batch_size(), mnl_nlmsg_batch_start(), mnl_nlmsg_batch_stop(), MNL_SOCKET_AUTOPID, mnl_socket_bind(), MNL_SOCKET_BUFFER_SIZE, mnl_socket_close(), mnl_socket_get_portid(), mnl_socket_open(), mnl_socket_recvfrom(), mnl_socket_sendto(), NETLINK_NETFILTER, nft_batch_begin(), nft_batch_end(), NFT_MSG_NEWSET, nft_set_nlmsg_build_hdr, NLM_F_ACK, and NULL.
int nft_event_footer_fprintf | ( | FILE * | fp, |
uint32_t | type, | ||
uint32_t | flags | ||
) |
References nft_fprintf(), and NULL.
Referenced by nft_ruleset_fprintf().
int nft_event_footer_snprintf | ( | char * | buf, |
size_t | size, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References NFT_OF_EVENT_ANY, NFT_OUTPUT_JSON, and NFT_OUTPUT_XML.
Referenced by nft_chain_snprintf(), nft_gen_snprintf(), nft_rule_snprintf(), nft_set_elem_snprintf(), nft_set_snprintf(), and nft_table_snprintf().
int nft_event_header_fprintf | ( | FILE * | fp, |
uint32_t | type, | ||
uint32_t | flags | ||
) |
References nft_fprintf(), and NULL.
Referenced by nft_ruleset_fprintf().
int nft_event_header_snprintf | ( | char * | buf, |
size_t | size, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References NFT_OF_EVENT_ANY, NFT_OF_EVENT_DEL, NFT_OF_EVENT_NEW, NFT_OUTPUT_JSON, and NFT_OUTPUT_XML.
Referenced by nft_chain_snprintf(), nft_gen_snprintf(), nft_rule_snprintf(), nft_set_elem_snprintf(), nft_set_snprintf(), and nft_table_snprintf().
struct nlmsghdr* nft_nlmsg_build_hdr | ( | char * | buf, |
uint16_t | cmd, | ||
uint16_t | family, | ||
uint16_t | type, | ||
uint32_t | seq | ||
) |
References mnl_nlmsg_put_extra_header(), mnl_nlmsg_put_header(), nfgenmsg::nfgen_family, NFNETLINK_V0, NFNL_SUBSYS_NFTABLES, nlh, NLM_F_REQUEST, nlmsghdr::nlmsg_flags, nlmsghdr::nlmsg_seq, nlmsghdr::nlmsg_type, nfgenmsg::res_id, type, and nfgenmsg::version.
Referenced by mnl_genid_get().
struct nft_parse_err* nft_parse_err_alloc | ( | void | ) |
void nft_parse_err_free | ( | struct nft_parse_err * | err | ) |
References xfree.
int nft_parse_perror | ( | const char * | msg, |
struct nft_parse_err * | err | ||
) |