libnetfilter_cthelper 1.0.1
Functions
Accounting object handling

Functions

struct nfct_helper __EXPORTED * nfct_helper_alloc (void)
 
void __EXPORTED nfct_helper_free (struct nfct_helper *h)
 
struct nfct_helper_policy __EXPORTED * nfct_helper_policy_alloc (void)
 
void __EXPORTED nfct_helper_policy_free (struct nfct_helper_policy *p)
 
void __EXPORTED nfct_helper_policy_attr_set (struct nfct_helper_policy *p, enum nfct_helper_policy_attr_type type, const void *data)
 
void __EXPORTED nfct_helper_policy_attr_set_str (struct nfct_helper_policy *p, enum nfct_helper_policy_attr_type type, const char *name)
 
void __EXPORTED nfct_helper_policy_attr_set_u32 (struct nfct_helper_policy *p, enum nfct_helper_policy_attr_type type, uint32_t value)
 
void __EXPORTED nfct_helper_attr_set (struct nfct_helper *h, enum nfct_helper_attr_type type, const void *data)
 
void __EXPORTED nfct_helper_attr_set_str (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, const char *name)
 
void __EXPORTED nfct_helper_attr_set_u8 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint8_t value)
 
void __EXPORTED nfct_helper_attr_set_u16 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint16_t value)
 
void __EXPORTED nfct_helper_attr_set_u32 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint32_t value)
 
void __EXPORTED nfct_helper_attr_unset (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
 
const void __EXPORTED * nfct_helper_attr_get (struct nfct_helper *helper, enum nfct_helper_attr_type type)
 
const char __EXPORTED * nfct_helper_attr_get_str (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
 
uint8_t __EXPORTED nfct_helper_attr_get_u8 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
 
uint16_t __EXPORTED nfct_helper_attr_get_u16 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
 
uint32_t __EXPORTED nfct_helper_attr_get_u32 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type)
 
int __EXPORTED nfct_helper_snprintf (char *buf, size_t size, struct nfct_helper *helper, unsigned int type, unsigned int flags)
 

Detailed Description

Function Documentation

◆ nfct_helper_alloc()

struct nfct_helper __EXPORTED * nfct_helper_alloc ( void  )

nfct_helper_alloc - allocate a new helper object

In case of success, this function returns a valid pointer, otherwise NULL s returned and errno is appropriately set.

Definition at line 102 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_get()

const void __EXPORTED * nfct_helper_attr_get ( struct nfct_helper helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_get - get one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

This function returns a valid pointer to the attribute data. If a unsupported attribute is used, this returns NULL.

Definition at line 308 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_get_str()

const char __EXPORTED * nfct_helper_attr_get_str ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_get_str - get one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

This function returns a valid pointer to the beginning of the string. If the attribute is unsupported, this returns NULL.

Definition at line 359 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_get_u16()

uint16_t __EXPORTED nfct_helper_attr_get_u16 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_get_u16 - get one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

This function returns a unsigned 16-bits integer. If the attribute is unsupported, this returns NULL.

Definition at line 389 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_get_u32()

uint32_t __EXPORTED nfct_helper_attr_get_u32 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_get_u32 - get one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

This function returns a unsigned 32-bits integer. If the attribute is unsupported, this returns NULL.

Definition at line 404 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_get_u8()

uint8_t __EXPORTED nfct_helper_attr_get_u8 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_get_u8 - get one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

This function returns a unsigned 8-bits integer. If the attribute is unsupported, this returns NULL.

Definition at line 374 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_set()

void __EXPORTED nfct_helper_attr_set ( struct nfct_helper h,
enum nfct_helper_attr_type  type,
const void *  data 
)

nfct_helper_attr_set - set one attribute of the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set
datapointer to data that will be used to set this attribute

Definition at line 199 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_set_str()

void __EXPORTED nfct_helper_attr_set_str ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type,
const char *  name 
)

nfct_helper_attr_set_str - set one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set
namestring that will be used to set this attribute

Definition at line 254 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_set_u16()

void __EXPORTED nfct_helper_attr_set_u16 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type,
uint16_t  value 
)

Definition at line 268 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_set_u32()

void __EXPORTED nfct_helper_attr_set_u32 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type,
uint32_t  value 
)

Definition at line 275 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_set_u8()

void __EXPORTED nfct_helper_attr_set_u8 ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type,
uint8_t  value 
)

Definition at line 261 of file libnetfilter_cthelper.c.

◆ nfct_helper_attr_unset()

void __EXPORTED nfct_helper_attr_unset ( struct nfct_helper nfct_helper,
enum nfct_helper_attr_type  type 
)

nfct_helper_attr_unset - unset one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set

Definition at line 287 of file libnetfilter_cthelper.c.

◆ nfct_helper_free()

void __EXPORTED nfct_helper_free ( struct nfct_helper h)

nfct_helper_free - release one helper object

Parameters
nfct_helperpointer to the helper object

Definition at line 111 of file libnetfilter_cthelper.c.

◆ nfct_helper_policy_alloc()

struct nfct_helper_policy __EXPORTED * nfct_helper_policy_alloc ( void  )

nfct_helper_policy_alloc - allocate a new helper policy object

In case of success, this function returns a valid pointer, otherwise NULL s returned and errno is appropriately set.

Definition at line 128 of file libnetfilter_cthelper.c.

◆ nfct_helper_policy_attr_set()

void __EXPORTED nfct_helper_policy_attr_set ( struct nfct_helper_policy p,
enum nfct_helper_policy_attr_type  type,
const void *  data 
)

nfct_helper_policy_attr_set - set one attribute of the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set
datapointer to data that will be used to set this attribute

Definition at line 149 of file libnetfilter_cthelper.c.

◆ nfct_helper_policy_attr_set_str()

void __EXPORTED nfct_helper_policy_attr_set_str ( struct nfct_helper_policy p,
enum nfct_helper_policy_attr_type  type,
const char *  name 
)

nfct_helper_attr_set_str - set one attribute the helper object

Parameters
nfct_helperpointer to the helper object
typeattribute type you want to set
namestring that will be used to set this attribute

Definition at line 177 of file libnetfilter_cthelper.c.

◆ nfct_helper_policy_attr_set_u32()

void __EXPORTED nfct_helper_policy_attr_set_u32 ( struct nfct_helper_policy p,
enum nfct_helper_policy_attr_type  type,
uint32_t  value 
)

Definition at line 185 of file libnetfilter_cthelper.c.

◆ nfct_helper_policy_free()

void __EXPORTED nfct_helper_policy_free ( struct nfct_helper_policy p)

nfct_helper_free - release one helper policy object

Parameters
nfct_helperpointer to the helper object

Definition at line 137 of file libnetfilter_cthelper.c.

◆ nfct_helper_snprintf()

int __EXPORTED nfct_helper_snprintf ( char *  buf,
size_t  size,
struct nfct_helper helper,
unsigned int  type,
unsigned int  flags 
)

nfct_helper_snprintf - print helper object into one buffer

Parameters
bufpointer to buffer that is used to print the object
sizesize of the buffer (or remaining room in it).
nfct_helperpointer to a valid helper object.
flagsoutput flags (NFCTH_SNPRINTF_F_FULL).

This function returns -1 in case that some mandatory attributes are missing. On sucess, it returns 0.

Definition at line 421 of file libnetfilter_cthelper.c.