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

Functions

struct nfct_timeoutnfct_timeout_alloc (void)
 nfct_timeout_alloc - allocate a new conntrack timeout object More...
 
 EXPORT_SYMBOL (nfct_timeout_alloc)
 
void nfct_timeout_free (struct nfct_timeout *t)
 nfct_timeout_free - release one conntrack timeout object More...
 
 EXPORT_SYMBOL (nfct_timeout_free)
 
int 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 More...
 
 EXPORT_SYMBOL (nfct_timeout_attr_set)
 
int 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 More...
 
 EXPORT_SYMBOL (nfct_timeout_attr_set_u8)
 
int 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 More...
 
 EXPORT_SYMBOL (nfct_timeout_attr_set_u16)
 
void nfct_timeout_attr_unset (struct nfct_timeout *t, uint32_t type)
 nfct_timeout_attr_unset - unset one attribute of the conntrack timeout object More...
 
 EXPORT_SYMBOL (nfct_timeout_attr_unset)
 
int 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 More...
 
 EXPORT_SYMBOL (nfct_timeout_policy_attr_set_u32)
 
void nfct_timeout_policy_attr_unset (struct nfct_timeout *t, uint32_t type)
 nfct_timeout_policy_attr_unset - unset one attribute of the policy More...
 
 EXPORT_SYMBOL (nfct_timeout_policy_attr_unset)
 
const char * 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 More...
 
 EXPORT_SYMBOL (nfct_timeout_policy_attr_to_name)
 

Detailed Description

Function Documentation

EXPORT_SYMBOL ( nfct_timeout_alloc  )
EXPORT_SYMBOL ( nfct_timeout_free  )
EXPORT_SYMBOL ( nfct_timeout_attr_set  )
EXPORT_SYMBOL ( nfct_timeout_attr_set_u8  )
EXPORT_SYMBOL ( nfct_timeout_attr_set_u16  )
EXPORT_SYMBOL ( nfct_timeout_attr_unset  )
EXPORT_SYMBOL ( nfct_timeout_policy_attr_set_u32  )
EXPORT_SYMBOL ( nfct_timeout_policy_attr_unset  )
EXPORT_SYMBOL ( nfct_timeout_policy_attr_to_name  )
struct nfct_timeout* 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.

References NULL.

int 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

References nfct_timeout::attrset, nfct_timeout::l3num, nfct_timeout::l4num, nfct_timeout::name, NFCT_TIMEOUT_ATTR_L3PROTO, NFCT_TIMEOUT_ATTR_L4PROTO, NFCT_TIMEOUT_ATTR_NAME, and type.

Referenced by nfct_timeout_attr_set_u16(), nfct_timeout_attr_set_u8(), and nfct_timeout_nlmsg_parse_payload().

Here is the caller graph for this function:

int 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

References nfct_timeout_attr_set().

Referenced by nfct_timeout_nlmsg_parse_payload().

Here is the call graph for this function:

Here is the caller graph for this function:

int 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

References nfct_timeout_attr_set().

Referenced by nfct_timeout_nlmsg_parse_payload().

Here is the call graph for this function:

Here is the caller graph for this function:

void 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

References nfct_timeout::attrset, and type.

void nfct_timeout_free ( struct nfct_timeout t)

nfct_timeout_free - release one conntrack timeout object

Parameters
tpointer to the conntrack timeout object

References nfct_timeout::timeout.

int 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

References attr_max, nfct_timeout::attrset, data, nfct_timeout::l4num, NFCT_TIMEOUT_ATTR_L4PROTO, NFCT_TIMEOUT_ATTR_POLICY, NULL, nfct_timeout::polset, nfct_timeout::timeout, and type.

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

References NULL, state, and state_to_name.

void 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

References nfct_timeout::attrset, and type.