netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gen.c File Reference
#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/gen.h>
Include dependency graph for gen.c:

Data Structures

struct  nft_gen
 

Functions

struct nft_gennft_gen_alloc (void)
 
 EXPORT_SYMBOL (nft_gen_alloc)
 
void nft_gen_free (struct nft_gen *gen)
 
 EXPORT_SYMBOL (nft_gen_free)
 
bool nft_gen_attr_is_set (const struct nft_gen *gen, uint16_t attr)
 
 EXPORT_SYMBOL (nft_gen_attr_is_set)
 
void nft_gen_attr_unset (struct nft_gen *gen, uint16_t attr)
 
 EXPORT_SYMBOL (nft_gen_attr_unset)
 
void nft_gen_attr_set_data (struct nft_gen *gen, uint16_t attr, const void *data, uint32_t data_len)
 
 EXPORT_SYMBOL (nft_gen_attr_set_data)
 
void nft_gen_attr_set (struct nft_gen *gen, uint16_t attr, const void *data)
 
 EXPORT_SYMBOL (nft_gen_attr_set)
 
void nft_gen_attr_set_u32 (struct nft_gen *gen, uint16_t attr, uint32_t val)
 
 EXPORT_SYMBOL (nft_gen_attr_set_u32)
 
const void * nft_gen_attr_get_data (struct nft_gen *gen, uint16_t attr, uint32_t *data_len)
 
 EXPORT_SYMBOL (nft_gen_attr_get_data)
 
const void * nft_gen_attr_get (struct nft_gen *gen, uint16_t attr)
 
 EXPORT_SYMBOL (nft_gen_attr_get)
 
uint32_t nft_gen_attr_get_u32 (struct nft_gen *gen, uint16_t attr)
 
 EXPORT_SYMBOL (nft_gen_attr_get_u32)
 
int nft_gen_nlmsg_parse (const struct nlmsghdr *nlh, struct nft_gen *gen)
 
 EXPORT_SYMBOL (nft_gen_nlmsg_parse)
 
int nft_gen_snprintf (char *buf, size_t size, struct nft_gen *gen, uint32_t type, uint32_t flags)
 
 EXPORT_SYMBOL (nft_gen_snprintf)
 
int nft_gen_fprintf (FILE *fp, struct nft_gen *gen, uint32_t type, uint32_t flags)
 
 EXPORT_SYMBOL (nft_gen_fprintf)
 

Function Documentation

EXPORT_SYMBOL ( nft_gen_alloc  )
EXPORT_SYMBOL ( nft_gen_free  )
EXPORT_SYMBOL ( nft_gen_attr_is_set  )
EXPORT_SYMBOL ( nft_gen_attr_unset  )
EXPORT_SYMBOL ( nft_gen_attr_set_data  )
EXPORT_SYMBOL ( nft_gen_attr_set  )
EXPORT_SYMBOL ( nft_gen_attr_set_u32  )
EXPORT_SYMBOL ( nft_gen_attr_get_data  )
EXPORT_SYMBOL ( nft_gen_attr_get  )
EXPORT_SYMBOL ( nft_gen_attr_get_u32  )
EXPORT_SYMBOL ( nft_gen_nlmsg_parse  )
EXPORT_SYMBOL ( nft_gen_snprintf  )
EXPORT_SYMBOL ( nft_gen_fprintf  )
struct nft_gen* nft_gen_alloc ( void  )
const void* nft_gen_attr_get ( struct nft_gen gen,
uint16_t  attr 
)

References nft_gen_attr_get_data().

Referenced by nft_gen_attr_get_u32().

Here is the call graph for this function:

Here is the caller graph for this function:

const void* nft_gen_attr_get_data ( struct nft_gen gen,
uint16_t  attr,
uint32_t *  data_len 
)

References nft_gen::flags, nft_gen::id, NFT_GEN_ID, and NULL.

Referenced by nft_gen_attr_get().

Here is the caller graph for this function:

uint32_t nft_gen_attr_get_u32 ( struct nft_gen gen,
uint16_t  attr 
)

References nft_gen_attr_get(), and NULL.

Here is the call graph for this function:

bool nft_gen_attr_is_set ( const struct nft_gen gen,
uint16_t  attr 
)

References nft_gen::flags.

void nft_gen_attr_set ( struct nft_gen gen,
uint16_t  attr,
const void *  data 
)

References nft_gen_attr_set_data().

Here is the call graph for this function:

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().

Here is the caller graph for this function:

void nft_gen_attr_set_u32 ( struct nft_gen gen,
uint16_t  attr,
uint32_t  val 
)

References nft_gen_attr_set_data().

Here is the call graph for this function:

void nft_gen_attr_unset ( struct nft_gen gen,
uint16_t  attr 
)

References nft_gen::flags, and NFT_GEN_ID.

int nft_gen_fprintf ( FILE *  fp,
struct nft_gen gen,
uint32_t  type,
uint32_t  flags 
)

References nft_fprintf().

Here is the call graph for this function:

void nft_gen_free ( struct nft_gen gen)

References xfree.

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 
)

References len, nft_event_footer_snprintf(), nft_event_header_snprintf(), NFT_OUTPUT_DEFAULT, size, and SNPRINTF_BUFFER_SIZE.

Here is the call graph for this function: