netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gen.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <sys/types.h>
#include <libnftnl/common.h>
Include dependency graph for gen.h:
This graph shows which files directly or indirectly include this file:

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_gennft_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)
 

Macro Definition Documentation

#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

Enumeration Type Documentation

anonymous enum
Enumerator
NFT_GEN_ID 
__NFT_GEN_MAX 

Function Documentation

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  data 
)

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 )

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: