libnetfilter_conntrack  1.0.6
Conntrack labels


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_labelmapnfct_labelmap_new (const char *mapfile)
void nfct_labelmap_destroy (struct nfct_labelmap *map)

Detailed Description

Function Documentation

void nfct_labelmap_destroy ( struct nfct_labelmap map)

nfct_labelmap_destroy - destroy nfct_labelmap object

mapthe label object to destroy.

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

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

int nfct_labelmap_get_bit ( struct nfct_labelmap m,
const char *  name 

nfct_labelmap_get_bit - get bit associated with the name

hlabel handle obtained from nfct_labelmap_new
namename of the label

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

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

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

nfct_labelmap_get_name - get name of the label bit

mlabel map obtained from nfct_label_open
bitwhose 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 1550 of file conntrack/api.c.

struct nfct_labelmap* nfct_labelmap_new ( const char *  mapfile)

nfct_labelmap_new - create a new label map

mapfilethe 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 1576 of file conntrack/api.c.

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 1535 of file conntrack/api.c.