|
libnetfilter_acct
1.0.3
|
Macros | |
| #define | BUFFER_SIZE(ret, size, rem, offset) |
Functions | |
| struct nfacct * | nfacct_alloc (void) |
| void | nfacct_free (struct nfacct *nfacct) |
| void | nfacct_attr_set (struct nfacct *nfacct, enum nfacct_attr_type type, const void *data) |
| void | nfacct_attr_set_str (struct nfacct *nfacct, enum nfacct_attr_type type, const char *name) |
| void | nfacct_attr_set_u64 (struct nfacct *nfacct, enum nfacct_attr_type type, uint64_t value) |
| void | nfacct_attr_unset (struct nfacct *nfacct, enum nfacct_attr_type type) |
| const void * | nfacct_attr_get (struct nfacct *nfacct, enum nfacct_attr_type type) |
| const char * | nfacct_attr_get_str (struct nfacct *nfacct, enum nfacct_attr_type type) |
| uint64_t | nfacct_attr_get_u64 (struct nfacct *nfacct, enum nfacct_attr_type type) |
| int | nfacct_snprintf (char *buf, size_t size, struct nfacct *nfacct, uint16_t type, uint16_t flags) |
| #define BUFFER_SIZE | ( | ret, | |
| size, | |||
| rem, | |||
| offset | |||
| ) |
Definition at line 343 of file libnetfilter_acct.c.
| struct nfacct* nfacct_alloc | ( | void | ) |
nfacct_alloc - allocate a new accounting object
In case of success, this function returns a valid pointer, otherwise NULL s returned and errno is appropriately set.
Definition at line 79 of file libnetfilter_acct.c.
| const void* nfacct_attr_get | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type | ||
| ) |
nfacct_attr_get - get one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
This function returns a valid pointer to the attribute data. If a unsupported attribute is used, this returns NULL.
Definition at line 195 of file libnetfilter_acct.c.
| const char* nfacct_attr_get_str | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type | ||
| ) |
nfacct_attr_get_str - get one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
This function returns a valid pointer to the beginning of the string. If the attribute is unsupported, this returns NULL.
Definition at line 234 of file libnetfilter_acct.c.
| uint64_t nfacct_attr_get_u64 | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type | ||
| ) |
nfacct_attr_get_u64 - get one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
This function returns a unsigned 64-bits integer. If the attribute is unsupported, this returns NULL.
Definition at line 248 of file libnetfilter_acct.c.
| void nfacct_attr_set | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type, | ||
| const void * | data | ||
| ) |
nfacct_attr_set - set one attribute of the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
| data | pointer to data that will be used to set this attribute |
Definition at line 102 of file libnetfilter_acct.c.
| void nfacct_attr_set_str | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type, | ||
| const char * | name | ||
| ) |
nfacct_attr_set_str - set one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
| name | string that will be used to set this attribute |
Definition at line 138 of file libnetfilter_acct.c.
| void nfacct_attr_set_u64 | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type, | ||
| uint64_t | value | ||
| ) |
nfacct_attr_set_u64 - set one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
| value | unsigned 64-bits integer |
Definition at line 152 of file libnetfilter_acct.c.
| void nfacct_attr_unset | ( | struct nfacct * | nfacct, |
| enum nfacct_attr_type | type | ||
| ) |
nfacct_attr_unset - unset one attribute the accounting object
| nfacct | pointer to the accounting object |
| type | attribute type you want to set |
Definition at line 165 of file libnetfilter_acct.c.
| void nfacct_free | ( | struct nfacct * | nfacct | ) |
nfacct_free - release one accounting object
| nfacct | pointer to the accounting object |
Definition at line 89 of file libnetfilter_acct.c.
| int nfacct_snprintf | ( | char * | buf, |
| size_t | size, | ||
| struct nfacct * | nfacct, | ||
| uint16_t | type, | ||
| uint16_t | flags | ||
| ) |
nfacct_snprintf - print accounting object into one buffer
| buf | pointer to buffer that is used to print the object |
| size | size of the buffer (or remaining room in it). |
| nfacct | pointer to a valid accounting object. |
| type | format output type, NFACCT_SNPRINTF_T_[PLAIN|XML] |
| flags | output flags (NFACCT_SNPRINTF_F_FULL). |
This function returns -1 in case that some mandatory attributes are missing. On sucess, it returns 0.
Definition at line 427 of file libnetfilter_acct.c.
1.8.8