netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Accounting object handling

Functions

struct nfct_helpernfct_helper_alloc (void)
 nfct_helper_alloc - allocate a new helper object More...
 
 EXPORT_SYMBOL (nfct_helper_alloc)
 
void nfct_helper_free (struct nfct_helper *h)
 nfct_helper_free - release one helper object More...
 
 EXPORT_SYMBOL (nfct_helper_free)
 
struct nfct_helper_policynfct_helper_policy_alloc (void)
 nfct_helper_policy_alloc - allocate a new helper policy object More...
 
 EXPORT_SYMBOL (nfct_helper_policy_alloc)
 
void nfct_helper_policy_free (struct nfct_helper_policy *p)
 nfct_helper_free - release one helper policy object More...
 
 EXPORT_SYMBOL (nfct_helper_policy_free)
 
void 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 More...
 
 EXPORT_SYMBOL (nfct_helper_policy_attr_set)
 
void 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 More...
 
 EXPORT_SYMBOL (nfct_helper_policy_attr_set_str)
 
void nfct_helper_policy_attr_set_u32 (struct nfct_helper_policy *p, enum nfct_helper_policy_attr_type type, uint32_t value)
 
 EXPORT_SYMBOL (nfct_helper_policy_attr_set_u32)
 
void 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_set)
 
void 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_set_str)
 
void nfct_helper_attr_set_u8 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint8_t value)
 
 EXPORT_SYMBOL (nfct_helper_attr_set_u8)
 
void nfct_helper_attr_set_u16 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint16_t value)
 
 EXPORT_SYMBOL (nfct_helper_attr_set_u16)
 
void nfct_helper_attr_set_u32 (struct nfct_helper *nfct_helper, enum nfct_helper_attr_type type, uint32_t value)
 
 EXPORT_SYMBOL (nfct_helper_attr_set_u32)
 
void 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_unset)
 
const void * nfct_helper_attr_get (struct nfct_helper *helper, enum nfct_helper_attr_type type)
 nfct_helper_attr_get - get one attribute the helper object More...
 
 EXPORT_SYMBOL (nfct_helper_attr_get)
 
const char * 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_get_str)
 
uint8_t 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_get_u8)
 
uint16_t 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_get_u16)
 
uint32_t 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 More...
 
 EXPORT_SYMBOL (nfct_helper_attr_get_u32)
 
int 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 More...
 
 EXPORT_SYMBOL (nfct_helper_snprintf)
 

Detailed Description

Function Documentation

EXPORT_SYMBOL ( nfct_helper_alloc  )
EXPORT_SYMBOL ( nfct_helper_free  )
EXPORT_SYMBOL ( nfct_helper_policy_alloc  )
EXPORT_SYMBOL ( nfct_helper_policy_free  )
EXPORT_SYMBOL ( nfct_helper_policy_attr_set  )
EXPORT_SYMBOL ( nfct_helper_policy_attr_set_str  )
EXPORT_SYMBOL ( nfct_helper_policy_attr_set_u32  )
EXPORT_SYMBOL ( nfct_helper_attr_set  )
EXPORT_SYMBOL ( nfct_helper_attr_set_str  )
EXPORT_SYMBOL ( nfct_helper_attr_set_u8  )
EXPORT_SYMBOL ( nfct_helper_attr_set_u16  )
EXPORT_SYMBOL ( nfct_helper_attr_set_u32  )
EXPORT_SYMBOL ( nfct_helper_attr_unset  )
EXPORT_SYMBOL ( nfct_helper_attr_get  )
EXPORT_SYMBOL ( nfct_helper_attr_get_str  )
EXPORT_SYMBOL ( nfct_helper_attr_get_u8  )
EXPORT_SYMBOL ( nfct_helper_attr_get_u16  )
EXPORT_SYMBOL ( nfct_helper_attr_get_u32  )
EXPORT_SYMBOL ( nfct_helper_snprintf  )
struct nfct_helper* 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.

const void* 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.

References expect_policy, l3num, l4num, name, NFCTH_ATTR_NAME, NFCTH_ATTR_POLICY1, NFCTH_ATTR_POLICY2, NFCTH_ATTR_POLICY3, NFCTH_ATTR_POLICY4, NFCTH_ATTR_PRIV_DATA_LEN, NFCTH_ATTR_PROTO_L3NUM, NFCTH_ATTR_PROTO_L4NUM, NFCTH_ATTR_QUEUE_NUM, NFCTH_ATTR_STATUS, NULL, priv_data_len, queue_num, status, and tuple.

Referenced by nfct_helper_attr_get_str(), nfct_helper_attr_get_u16(), nfct_helper_attr_get_u32(), and nfct_helper_attr_get_u8().

Here is the caller graph for this function:

const char* 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.

References nfct_helper_attr_get().

Referenced by nfct_helper_snprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

uint16_t 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.

References nfct_helper_attr_get().

Referenced by nfct_helper_snprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

uint32_t 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.

References nfct_helper_attr_get().

Referenced by nfct_helper_snprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

uint8_t 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.

References nfct_helper_attr_get().

Referenced by nfct_helper_snprintf().

Here is the call graph for this function:

Here is the caller graph for this function:

void 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

References bitset, expect_policy, l3num, l4num, name, NF_CT_HELPER_NAME_MAX, NFCTH_ATTR_NAME, NFCTH_ATTR_POLICY1, NFCTH_ATTR_POLICY2, NFCTH_ATTR_POLICY3, NFCTH_ATTR_POLICY4, NFCTH_ATTR_PRIV_DATA_LEN, NFCTH_ATTR_PROTO_L3NUM, NFCTH_ATTR_PROTO_L4NUM, NFCTH_ATTR_QUEUE_NUM, NFCTH_ATTR_STATUS, priv_data_len, queue_num, status, and tuple.

Referenced by nfct_helper_attr_set_str(), nfct_helper_attr_set_u16(), nfct_helper_attr_set_u32(), and nfct_helper_attr_set_u8().

Here is the caller graph for this function:

void 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

References nfct_helper_attr_set().

Referenced by nfct_helper_nlmsg_parse_payload().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References nfct_helper_attr_set().

Here is the call graph for this function:

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

References nfct_helper_attr_set().

Referenced by nfct_helper_nlmsg_parse_payload().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References nfct_helper_attr_set().

Here is the call graph for this function:

void 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

References bitset, and NFCTH_ATTR_NAME.

void nfct_helper_free ( struct nfct_helper h)

nfct_helper_free - release one helper object

Parameters
nfct_helperpointer to the helper object

References expect_policy, and NF_CT_HELPER_CLASS_MAX.

struct nfct_helper_policy* 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.

void 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

References nfct_helper_policy::bitset, nfct_helper_policy::expect_max, nfct_helper_policy::expect_timeout, nfct_helper_policy::name, NF_CT_HELPER_NAME_MAX, NFCTH_ATTR_POLICY_MAX, NFCTH_ATTR_POLICY_NAME, and NFCTH_ATTR_POLICY_TIMEOUT.

Referenced by nfct_helper_policy_attr_set_str(), and nfct_helper_policy_attr_set_u32().

Here is the caller graph for this function:

void 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

References nfct_helper_policy_attr_set().

Here is the call graph for this function:

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

References nfct_helper_policy_attr_set().

Here is the call graph for this function:

void nfct_helper_policy_free ( struct nfct_helper_policy p)

nfct_helper_free - release one helper policy object

Parameters
nfct_helperpointer to the helper object
int 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.

References nfct_helper_attr_get_str(), nfct_helper_attr_get_u16(), nfct_helper_attr_get_u32(), nfct_helper_attr_get_u8(), NFCTH_ATTR_NAME, NFCTH_ATTR_PRIV_DATA_LEN, NFCTH_ATTR_PROTO_L3NUM, NFCTH_ATTR_PROTO_L4NUM, NFCTH_ATTR_QUEUE_NUM, and NFCTH_ATTR_STATUS.

Here is the call graph for this function: