#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <libnftnl/common.h>
Macros | |
#define | NFT_GEN_MAX (__NFT_GEN_MAX - 1) |
#define | nft_gen_nlmsg_build_hdr nft_nlmsg_build_hdr |
Enumerations | |
enum | { NFT_GEN_ID = 0, __NFT_GEN_MAX } |
Functions | |
struct nft_gen * | nft_gen_alloc (void) |
void | nft_gen_free (struct nft_gen *) |
bool | nft_gen_attr_is_set (const struct nft_gen *gen, uint16_t attr) |
void | nft_gen_attr_unset (struct nft_gen *gen, uint16_t attr) |
void | nft_gen_attr_set (struct nft_gen *gen, uint16_t attr, const void *data) |
void | nft_gen_attr_set_data (struct nft_gen *gen, uint16_t attr, const void *data, uint32_t data_len) |
const void * | nft_gen_attr_get (struct nft_gen *gen, uint16_t attr) |
const void * | nft_gen_attr_get_data (struct nft_gen *gen, uint16_t attr, uint32_t *data_len) |
void | nft_gen_attr_set_u32 (struct nft_gen *gen, uint16_t attr, uint32_t data) |
uint32_t | nft_gen_attr_get_u32 (struct nft_gen *gen, uint16_t attr) |
int | nft_gen_nlmsg_parse (const struct nlmsghdr *nlh, struct nft_gen *gen) |
int | nft_gen_snprintf (char *buf, size_t size, struct nft_gen *gen, uint32_t type, uint32_t flags) |
int | nft_gen_fprintf (FILE *fp, struct nft_gen *gen, uint32_t type, uint32_t flags) |
#define NFT_GEN_MAX (__NFT_GEN_MAX - 1) |
Referenced by nft_gen_attr_set_data().
#define nft_gen_nlmsg_build_hdr nft_nlmsg_build_hdr |
References nft_gen_attr_get_data().
Referenced by nft_gen_attr_get_u32().
References nft_gen::flags, nft_gen::id, NFT_GEN_ID, and NULL.
Referenced by nft_gen_attr_get().
References nft_gen::flags.
void nft_gen_attr_set_data | ( | struct nft_gen * | gen, |
uint16_t | attr, | ||
const void * | data, | ||
uint32_t | data_len | ||
) |
References nft_gen::flags, nft_gen::id, nft_assert_validate, NFT_GEN_ID, and NFT_GEN_MAX.
Referenced by nft_gen_attr_set(), and nft_gen_attr_set_u32().
References nft_gen::flags, and NFT_GEN_ID.
References nft_gen::flags, nft_gen::id, mnl_attr_get_u32(), mnl_attr_parse(), mnl_nlmsg_get_payload(), NFT_GEN_ID, NFTA_GEN_ID, and NFTA_GEN_MAX.
int nft_gen_snprintf | ( | char * | buf, |
size_t | size, | ||
struct nft_gen * | gen, | ||
uint32_t | type, | ||
uint32_t | flags | ||
) |
References len, nft_event_footer_snprintf(), nft_event_header_snprintf(), NFT_OUTPUT_DEFAULT, size, and SNPRINTF_BUFFER_SIZE.