netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
log_obj.c File Reference
Include dependency graph for log_obj.c:

Macros

#define NFNL_LOG_DIFF(ATTR, EXPR)   ATTR_DIFF(attrs, LOG_ATTR_##ATTR, a, b, EXPR)
 
#define NFNL_LOG_DIFF_VAL(ATTR, FIELD)   NFNL_LOG_DIFF(ATTR, a->FIELD != b->FIELD)
 

Functions

char * nfnl_log_copy_mode2str (enum nfnl_log_copy_mode copy_mode, char *buf, size_t len)
 
enum nfnl_log_copy_mode nfnl_log_str2copy_mode (const char *name)
 
Allocation/Freeing
struct nfnl_lognfnl_log_alloc (void)
 
void nfnl_log_get (struct nfnl_log *log)
 
void nfnl_log_put (struct nfnl_log *log)
 

Variables

struct nl_object_ops log_obj_ops
 

Attributes

void nfnl_log_set_group (struct nfnl_log *log, uint16_t group)
 
int nfnl_log_test_group (const struct nfnl_log *log)
 
uint16_t nfnl_log_get_group (const struct nfnl_log *log)
 
void nfnl_log_set_copy_mode (struct nfnl_log *log, enum nfnl_log_copy_mode mode)
 
int nfnl_log_test_copy_mode (const struct nfnl_log *log)
 
enum nfnl_log_copy_mode nfnl_log_get_copy_mode (const struct nfnl_log *log)
 
void nfnl_log_set_copy_range (struct nfnl_log *log, uint32_t copy_range)
 
int nfnl_log_test_copy_range (const struct nfnl_log *log)
 
uint32_t nfnl_log_get_copy_range (const struct nfnl_log *log)
 
void nfnl_log_set_flush_timeout (struct nfnl_log *log, uint32_t timeout)
 
int nfnl_log_test_flush_timeout (const struct nfnl_log *log)
 
uint32_t nfnl_log_get_flush_timeout (const struct nfnl_log *log)
 
void nfnl_log_set_alloc_size (struct nfnl_log *log, uint32_t alloc_size)
 
int nfnl_log_test_alloc_size (const struct nfnl_log *log)
 
uint32_t nfnl_log_get_alloc_size (const struct nfnl_log *log)
 
void nfnl_log_set_queue_threshold (struct nfnl_log *log, uint32_t threshold)
 
int nfnl_log_test_queue_threshold (const struct nfnl_log *log)
 
uint32_t nfnl_log_get_queue_threshold (const struct nfnl_log *log)
 
void nfnl_log_set_flags (struct nfnl_log *log, unsigned int flags)
 
void nfnl_log_unset_flags (struct nfnl_log *log, unsigned int flags)
 
char * nfnl_log_flags2str (unsigned int flags, char *buf, size_t len)
 
unsigned int nfnl_log_str2flags (const char *name)
 

Macro Definition Documentation

#define NFNL_LOG_DIFF (   ATTR,
  EXPR 
)    ATTR_DIFF(attrs, LOG_ATTR_##ATTR, a, b, EXPR)
#define NFNL_LOG_DIFF_VAL (   ATTR,
  FIELD 
)    NFNL_LOG_DIFF(ATTR, a->FIELD != b->FIELD)

Function Documentation

struct nfnl_log* nfnl_log_alloc ( void  )

References log_obj_ops, and nl_object_alloc().

Here is the call graph for this function:

char* nfnl_log_copy_mode2str ( enum nfnl_log_copy_mode  copy_mode,
char *  buf,
size_t  len 
)

References __type2str(), and ARRAY_SIZE.

Here is the call graph for this function:

char* nfnl_log_flags2str ( unsigned int  flags,
char *  buf,
size_t  len 
)

References __flags2str(), and ARRAY_SIZE.

Here is the call graph for this function:

void nfnl_log_get ( struct nfnl_log log)

References nl_object_get().

Here is the call graph for this function:

uint32_t nfnl_log_get_alloc_size ( const struct nfnl_log log)
enum nfnl_log_copy_mode nfnl_log_get_copy_mode ( const struct nfnl_log log)
uint32_t nfnl_log_get_copy_range ( const struct nfnl_log log)
uint32_t nfnl_log_get_flush_timeout ( const struct nfnl_log log)
uint16_t nfnl_log_get_group ( const struct nfnl_log log)

References nfnl_log::log_group.

Referenced by nfnl_log_build_delete_request().

Here is the caller graph for this function:

uint32_t nfnl_log_get_queue_threshold ( const struct nfnl_log log)
void nfnl_log_put ( struct nfnl_log log)

References nl_object_put().

Here is the call graph for this function:

void nfnl_log_set_alloc_size ( struct nfnl_log log,
uint32_t  alloc_size 
)
void nfnl_log_set_copy_mode ( struct nfnl_log log,
enum nfnl_log_copy_mode  mode 
)

References nfnl_log::log_copy_mode.

Referenced by main().

Here is the caller graph for this function:

void nfnl_log_set_copy_range ( struct nfnl_log log,
uint32_t  copy_range 
)

References copy_range, and nfnl_log::log_copy_range.

Referenced by main().

Here is the caller graph for this function:

void nfnl_log_set_flags ( struct nfnl_log log,
unsigned int  flags 
)
void nfnl_log_set_flush_timeout ( struct nfnl_log log,
uint32_t  timeout 
)
void nfnl_log_set_group ( struct nfnl_log log,
uint16_t  group 
)

References nfnl_log::log_group.

Referenced by main().

Here is the caller graph for this function:

void nfnl_log_set_queue_threshold ( struct nfnl_log log,
uint32_t  threshold 
)
enum nfnl_log_copy_mode nfnl_log_str2copy_mode ( const char *  name)

References __str2type(), and ARRAY_SIZE.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int nfnl_log_str2flags ( const char *  name)

References __str2flags(), and ARRAY_SIZE.

Here is the call graph for this function:

int nfnl_log_test_alloc_size ( const struct nfnl_log log)
int nfnl_log_test_copy_mode ( const struct nfnl_log log)
int nfnl_log_test_copy_range ( const struct nfnl_log log)
int nfnl_log_test_flush_timeout ( const struct nfnl_log log)
int nfnl_log_test_group ( const struct nfnl_log log)

Referenced by nfnl_log_build_delete_request().

Here is the caller graph for this function:

int nfnl_log_test_queue_threshold ( const struct nfnl_log log)
void nfnl_log_unset_flags ( struct nfnl_log log,
unsigned int  flags 
)

Variable Documentation

struct nl_object_ops log_obj_ops
Initial value:
= {
.oo_name = "netfilter/log",
.oo_size = sizeof(struct nfnl_log),
.oo_dump = {
[NL_DUMP_LINE] = nfnl_log_dump,
[NL_DUMP_DETAILS] = nfnl_log_dump,
[NL_DUMP_STATS] = nfnl_log_dump,
},
.oo_compare = nfnl_log_compare,
.oo_attrs2str = nfnl_log_attrs2str,
.oo_id_attrs = LOG_ATTR_GROUP,
}
Dump object briefly on one line.
Definition: types.h:22
Dump all attributes but no statistics.
Definition: types.h:23
Definition: netlink-types.h:763
Dump all attributes including statistics.
Definition: types.h:24

Referenced by nfnl_log_alloc().