Timeout policy object handling

## Functions

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

## Detailed Description

## Function Documentation

## nfct_timeout_alloc()

struct nfct_timeout* nfct_timeout_alloc | ( | void |  | ) |

nfct_timeout_alloc - allocate a new conntrack timeout object

Parameters

  protonum | layer 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 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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set
  data | pointer to data that will be used to set this attribute

Definition at line 221 of file libnetfilter_cttimeout.c.

## nfct_timeout_attr_set_u16()

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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set
  data | pointer to data that will be used to set this attribute

Definition at line 261 of file libnetfilter_cttimeout.c.

## nfct_timeout_attr_set_u8()

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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set
  data | pointer to data that will be used to set this attribute

Definition at line 248 of file libnetfilter_cttimeout.c.

## nfct_timeout_attr_unset()

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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set

Definition at line 272 of file libnetfilter_cttimeout.c.

## nfct_timeout_free()

void nfct_timeout_free | ( | struct nfct_timeout * | t | ) |

nfct_timeout_free - release one conntrack timeout object

Parameters

  t | pointer to the conntrack timeout object

Definition at line 206 of file libnetfilter_cttimeout.c.

## nfct_timeout_policy_attr_set_u32()

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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set
  data | data that will be used to set this attribute

Definition at line 285 of file libnetfilter_cttimeout.c.

## nfct_timeout_policy_attr_to_name()

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

  l4proto | protocol, ie. IPPROTO_*
  state | state 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 343 of file libnetfilter_cttimeout.c.

## nfct_timeout_policy_attr_unset()

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

  t | pointer to the conntrack timeout object
  type | attribute type you want to set

Definition at line 329 of file libnetfilter_cttimeout.c.