netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
nft_set_obj.c File Reference
#include <sys/types.h>
#include <linux/netfilter/nf_tables.h>
#include <netlink-local.h>
#include <netlink/attr.h>
#include <netlink/netfilter/nfnl.h>
#include <netlink/netfilter/nft_table.h>
#include <netlink/netfilter/nft_set.h>
Include dependency graph for nft_set_obj.c:

Functions

Allocation/Freeing
struct nfnl_nft_setnfnl_nft_set_alloc (void)
 
void nfnl_nft_set_get (struct nfnl_nft_set *set)
 
void nfnl_nft_set_put (struct nfnl_nft_set *set)
 

Variables

struct nl_object_ops nft_set_obj_ops
 

Attributes

void nfnl_nft_set_set_family (struct nfnl_nft_set *set, uint8_t family)
 
int nfnl_nft_set_test_family (const struct nfnl_nft_set *set)
 
uint8_t nfnl_nft_set_get_family (const struct nfnl_nft_set *set)
 
int nfnl_nft_set_set_table (struct nfnl_nft_set *set, const char *table, int len)
 
int nfnl_nft_set_test_table (const struct nfnl_nft_set *set)
 
const char * nfnl_nft_set_get_table (const struct nfnl_nft_set *set)
 
int nfnl_nft_set_set_name (struct nfnl_nft_set *set, const char *name, int len)
 
int nfnl_nft_set_test_name (const struct nfnl_nft_set *set)
 
const char * nfnl_nft_set_get_name (const struct nfnl_nft_set *set)
 
void nfnl_nft_set_set_flags (struct nfnl_nft_set *set, uint32_t flags)
 
int nfnl_nft_set_test_flags (const struct nfnl_nft_set *set)
 
uint32_t nfnl_nft_set_get_flags (const struct nfnl_nft_set *set)
 
void nfnl_nft_set_set_keytype (struct nfnl_nft_set *set, enum nft_data_types type)
 
int nfnl_nft_set_test_keytype (const struct nfnl_nft_set *set)
 
enum nft_data_types nfnl_nft_set_get_keytype (const struct nfnl_nft_set *set)
 
void nfnl_nft_set_set_keylen (struct nfnl_nft_set *set, unsigned int len)
 
int nfnl_nft_set_test_keylen (const struct nfnl_nft_set *set)
 
unsigned int nfnl_nft_set_get_keylen (const struct nfnl_nft_set *set)
 
void nfnl_nft_set_set_datatype (struct nfnl_nft_set *set, enum nft_data_types type)
 
int nfnl_nft_set_test_datatype (const struct nfnl_nft_set *set)
 
enum nft_data_types nfnl_nft_set_get_datatype (const struct nfnl_nft_set *set)
 
void nfnl_nft_set_set_datalen (struct nfnl_nft_set *set, unsigned int len)
 
int nfnl_nft_set_test_datalen (const struct nfnl_nft_set *set)
 
unsigned int nfnl_nft_set_get_datalen (const struct nfnl_nft_set *set)
 
char * nfnl_nft_set_flags2str (uint32_t flags, char *buf, size_t len)
 
uint32_t nfnl_nft_set_str2flags (const char *name)
 

Function Documentation

struct nfnl_nft_set* nfnl_nft_set_alloc ( void  )

References nft_set_obj_ops, and nl_object_alloc().

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

char* nfnl_nft_set_flags2str ( uint32_t  flags,
char *  buf,
size_t  len 
)

References __flags2str(), and ARRAY_SIZE.

Here is the call graph for this function:

void nfnl_nft_set_get ( struct nfnl_nft_set set)

References nl_object_get().

Here is the call graph for this function:

unsigned int nfnl_nft_set_get_datalen ( const struct nfnl_nft_set set)
enum nft_data_types nfnl_nft_set_get_datatype ( const struct nfnl_nft_set set)
uint8_t nfnl_nft_set_get_family ( const struct nfnl_nft_set set)
uint32_t nfnl_nft_set_get_flags ( const struct nfnl_nft_set set)
unsigned int nfnl_nft_set_get_keylen ( const struct nfnl_nft_set set)
enum nft_data_types nfnl_nft_set_get_keytype ( const struct nfnl_nft_set set)
const char* nfnl_nft_set_get_name ( const struct nfnl_nft_set set)

References nl_data_get(), and nfnl_nft_set::set_name.

Referenced by nfnl_nft_setelem_dump_request().

Here is the call graph for this function:

Here is the caller graph for this function:

const char* nfnl_nft_set_get_table ( const struct nfnl_nft_set set)

References nl_data_get(), and nfnl_nft_set::set_table.

Referenced by nfnl_nft_setelem_dump_request().

Here is the call graph for this function:

Here is the caller graph for this function:

void nfnl_nft_set_put ( struct nfnl_nft_set set)

References nl_object_put().

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

void nfnl_nft_set_set_datalen ( struct nfnl_nft_set set,
unsigned int  len 
)

References len, and nfnl_nft_set::set_datalen.

void nfnl_nft_set_set_datatype ( struct nfnl_nft_set set,
enum nft_data_types  type 
)

References nfnl_nft_set::set_datatype, and type.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the caller graph for this function:

void nfnl_nft_set_set_family ( struct nfnl_nft_set set,
uint8_t  family 
)

References nfnl_nft_set::set_family.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the caller graph for this function:

void nfnl_nft_set_set_flags ( struct nfnl_nft_set set,
uint32_t  flags 
)

References flags, and nfnl_nft_set::set_flags.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the caller graph for this function:

void nfnl_nft_set_set_keylen ( struct nfnl_nft_set set,
unsigned int  len 
)

References len, and nfnl_nft_set::set_keylen.

void nfnl_nft_set_set_keytype ( struct nfnl_nft_set set,
enum nft_data_types  type 
)

References nfnl_nft_set::set_keytype, and type.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the caller graph for this function:

int nfnl_nft_set_set_name ( struct nfnl_nft_set set,
const char *  name,
int  len 
)

References data, nl_data_alloc(), nl_data_free(), NLE_NOMEM, NULL, and nfnl_nft_set::set_name.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_nft_set_set_table ( struct nfnl_nft_set set,
const char *  table,
int  len 
)

References data, nl_data_alloc(), nl_data_free(), NLE_NOMEM, NULL, and nfnl_nft_set::set_table.

Referenced by main(), and nfnlmsg_nft_set_parse().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t nfnl_nft_set_str2flags ( const char *  name)

References __str2flags(), and ARRAY_SIZE.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int nfnl_nft_set_test_datalen ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_datatype ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_family ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_flags ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_keylen ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_keytype ( const struct nfnl_nft_set set)
int nfnl_nft_set_test_name ( const struct nfnl_nft_set set)

Referenced by nfnl_nft_setelem_dump_request().

Here is the caller graph for this function:

int nfnl_nft_set_test_table ( const struct nfnl_nft_set set)

Referenced by nfnl_nft_setelem_dump_request().

Here is the caller graph for this function:

Variable Documentation

struct nl_object_ops nft_set_obj_ops
Initial value:
= {
.oo_name = "netfilter/nft_set",
.oo_size = sizeof(struct nfnl_nft_set),
.oo_free_data = nft_set_free_data,
.oo_clone = nft_set_clone,
.oo_dump = {
[NL_DUMP_LINE] = nft_set_dump,
[NL_DUMP_DETAILS] = nft_set_dump,
[NL_DUMP_STATS] = nft_set_dump,
},
.oo_compare = nft_set_compare,
.oo_attrs2str = nft_set_attrs2str,
}
Dump object briefly on one line.
Definition: types.h:22
Definition: netlink-types.h:865
Dump all attributes but no statistics.
Definition: types.h:23
Dump all attributes including statistics.
Definition: types.h:24

Referenced by nfnl_nft_set_alloc().