Conntrack labels

## Functions

const char * | nfct_labels_get_path (void)
const char * | nfct_labelmap_get_name (struct nfct_labelmap *m, unsigned int bit)
int | nfct_labelmap_get_bit (struct nfct_labelmap *m, const char *name)
struct nfct_labelmap * | nfct_labelmap_new (const char *mapfile)
void | nfct_labelmap_destroy (struct nfct_labelmap *map)

## Detailed Description

## Function Documentation

## nfct_labelmap_destroy()

void nfct_labelmap_destroy | ( | struct nfct_labelmap * | map | ) |

nfct_labelmap_destroy - destroy nfct_labelmap object

Parameters

  map | the label object to destroy.

This function releases the memory that is used by the labelmap object.

Definition at line 1638 of file conntrack/api.c.

## nfct_labelmap_get_bit()

int nfct_labelmap_get_bit | ( | struct nfct_labelmap * | m,
|  | const char * | name )

nfct_labelmap_get_bit - get bit associated with the name

Parameters

  h | label handle obtained from nfct_labelmap_new
  name | name of the label

returns the bit associated with the name, or negative value on error.

Definition at line 1613 of file conntrack/api.c.

## nfct_labelmap_get_name()

const char * nfct_labelmap_get_name | ( | struct nfct_labelmap * | m,
|  | unsigned int | bit )

nfct_labelmap_get_name - get name of the label bit

Parameters

  m | label map obtained from nfct_label_open
  bit | whose name should be returned

returns a pointer to the name associated with the label. If no name has been configured, the empty string is returned. If bit is out of range, NULL is returned.

Definition at line 1600 of file conntrack/api.c.

## nfct_labelmap_new()

struct nfct_labelmap * nfct_labelmap_new | ( | const char * | mapfile | ) |

nfct_labelmap_new - create a new label map

Parameters

  mapfile | the file containing the bit <-> name mapping

If mapfile is NULL, the default mapping file is used. returns a new label map, or NULL on error.

Definition at line 1626 of file conntrack/api.c.

## nfct_labels_get_path()

const char * nfct_labels_get_path | ( | void |  | ) |

nfct_labels_get_path - get name of default config path

returns a pointer to a immutable (static) string containing the default connlabel.conf file location.

Definition at line 1585 of file conntrack/api.c.