libnetfilter_cttimeout  1.0.1
Functions
Timeout policy object handling

Functions

struct nfct_timeout __EXPORTED * nfct_timeout_alloc (void)
 
void __EXPORTED nfct_timeout_free (struct nfct_timeout *t)
 
int __EXPORTED nfct_timeout_attr_set (struct nfct_timeout *t, uint32_t type, const void *data)
 
int __EXPORTED nfct_timeout_attr_set_u8 (struct nfct_timeout *t, uint32_t type, uint8_t data)
 
int __EXPORTED nfct_timeout_attr_set_u16 (struct nfct_timeout *t, uint32_t type, uint16_t data)
 
void __EXPORTED nfct_timeout_attr_unset (struct nfct_timeout *t, uint32_t type)
 
int __EXPORTED nfct_timeout_policy_attr_set_u32 (struct nfct_timeout *t, uint32_t type, uint32_t data)
 
void __EXPORTED nfct_timeout_policy_attr_unset (struct nfct_timeout *t, uint32_t type)
 
const char __EXPORTED * nfct_timeout_policy_attr_to_name (uint8_t l4proto, uint32_t state)
 

Detailed Description

Function Documentation

◆ nfct_timeout_alloc()

struct nfct_timeout __EXPORTED* nfct_timeout_alloc ( void  )

nfct_timeout_alloc - allocate a new conntrack timeout object

Parameters
protonumlayer 4 protocol number (use IPPROTO_* constants)

You can use IPPROTO_MAX to set the timeout for the generic protocol tracker.

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

Definition at line 190 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_attr_set()

int __EXPORTED nfct_timeout_attr_set ( struct nfct_timeout *  t,
uint32_t  type,
const void *  data 
)

nfct_timeout_attr_set - set one attribute of the conntrack timeout object

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set
datapointer to data that will be used to set this attribute

Definition at line 219 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_attr_set_u16()

int __EXPORTED nfct_timeout_attr_set_u16 ( struct nfct_timeout *  t,
uint32_t  type,
uint16_t  data 
)

nfct_timeout_attr_set_u16 - set one attribute of the conntrack timeout object

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set
datapointer to data that will be used to set this attribute

Definition at line 257 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_attr_set_u8()

int __EXPORTED nfct_timeout_attr_set_u8 ( struct nfct_timeout *  t,
uint32_t  type,
uint8_t  data 
)

nfct_timeout_attr_set_u8 - set one attribute of the conntrack timeout object

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set
datapointer to data that will be used to set this attribute

Definition at line 245 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_attr_unset()

void __EXPORTED nfct_timeout_attr_unset ( struct nfct_timeout *  t,
uint32_t  type 
)

nfct_timeout_attr_unset - unset one attribute of the conntrack timeout object

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set

Definition at line 267 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_free()

void __EXPORTED nfct_timeout_free ( struct nfct_timeout *  t)

nfct_timeout_free - release one conntrack timeout object

Parameters
tpointer to the conntrack timeout object

Definition at line 205 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_policy_attr_set_u32()

int __EXPORTED nfct_timeout_policy_attr_set_u32 ( struct nfct_timeout *  t,
uint32_t  type,
uint32_t  data 
)

nfct_timeout_policy_attr_set_u32 - set one attribute of the policy

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set
datadata that will be used to set this attribute

Definition at line 279 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_policy_attr_to_name()

const char __EXPORTED* nfct_timeout_policy_attr_to_name ( uint8_t  l4proto,
uint32_t  state 
)

nfct_timeout_policy_attr_to_name - get state name from protocol state number

Parameters
l4protoprotocol, ie. IPPROTO_*
statestate number that you want to get the state name

This function returns NULL if unsupported protocol or state number is passed. Otherwise, a pointer to valid string is returned.

Definition at line 337 of file libnetfilter_cttimeout.c.

◆ nfct_timeout_policy_attr_unset()

void __EXPORTED nfct_timeout_policy_attr_unset ( struct nfct_timeout *  t,
uint32_t  type 
)

nfct_timeout_policy_attr_unset - unset one attribute of the policy

Parameters
tpointer to the conntrack timeout object
typeattribute type you want to set

Definition at line 323 of file libnetfilter_cttimeout.c.