Macros | |
| #define | BUFFER_SIZE(ret, size, rem, offset) |
Functions | |
| struct nfacct * | nfacct_alloc (void) |
| nfacct_alloc - allocate a new accounting object More... | |
| EXPORT_SYMBOL (nfacct_alloc) | |
| void | nfacct_free (struct nfacct *nfacct) |
| nfacct_free - release one accounting object More... | |
| EXPORT_SYMBOL (nfacct_free) | |
| 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 More... | |
| EXPORT_SYMBOL (nfacct_attr_set) | |
| 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 More... | |
| EXPORT_SYMBOL (nfacct_attr_set_str) | |
| 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 More... | |
| EXPORT_SYMBOL (nfacct_attr_set_u64) | |
| void | nfacct_attr_unset (struct nfacct *nfacct, enum nfacct_attr_type type) |
| nfacct_attr_unset - unset one attribute the accounting object More... | |
| EXPORT_SYMBOL (nfacct_attr_unset) | |
| const void * | nfacct_attr_get (struct nfacct *nfacct, enum nfacct_attr_type type) |
| nfacct_attr_get - get one attribute the accounting object More... | |
| EXPORT_SYMBOL (nfacct_attr_get) | |
| const char * | nfacct_attr_get_str (struct nfacct *nfacct, enum nfacct_attr_type type) |
| nfacct_attr_get_str - get one attribute the accounting object More... | |
| EXPORT_SYMBOL (nfacct_attr_get_str) | |
| uint64_t | nfacct_attr_get_u64 (struct nfacct *nfacct, enum nfacct_attr_type type) |
| nfacct_attr_get_u64 - get one attribute the accounting object More... | |
| EXPORT_SYMBOL (nfacct_attr_get_u64) | |
| 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 More... | |
| EXPORT_SYMBOL (nfacct_snprintf) | |
| #define BUFFER_SIZE | ( | ret, | |
| size, | |||
| rem, | |||
| offset | |||
| ) |
Referenced by __snprintf_addr_xml(), __snprintf_connlabels(), __snprintf_conntrack_default(), __snprintf_conntrack_xml(), __snprintf_expect_default(), __snprintf_expect_xml(), __snprintf_localtime_xml(), and __snprintf_proto_xml().
| EXPORT_SYMBOL | ( | nfacct_alloc | ) |
| EXPORT_SYMBOL | ( | nfacct_free | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_set | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_set_str | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_set_u64 | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_unset | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_get | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_get_str | ) |
| EXPORT_SYMBOL | ( | nfacct_attr_get_u64 | ) |
| EXPORT_SYMBOL | ( | nfacct_snprintf | ) |
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.
| 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.
References bitset, bytes, flags, name, NFACCT_ATTR_BYTES, NFACCT_ATTR_FLAGS, NFACCT_ATTR_NAME, NFACCT_ATTR_PKTS, NFACCT_ATTR_QUOTA, NULL, pkts, and quota.
Referenced by nfacct_attr_get_str(), and nfacct_attr_get_u64().

| 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.
References nfacct_attr_get().

| 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.
References nfacct_attr_get().

| 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 |
References bitset, bytes, flags, name, NFACCT_ATTR_BYTES, NFACCT_ATTR_FLAGS, NFACCT_ATTR_NAME, NFACCT_ATTR_PKTS, NFACCT_ATTR_QUOTA, NFACCT_NAME_MAX, pkts, and quota.
Referenced by nfacct_attr_set_str(), nfacct_attr_set_u64(), and nfacct_nlmsg_parse_payload().

| 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 |
References nfacct_attr_set().
Referenced by nfacct_nlmsg_parse_payload().


| 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 |
References nfacct_attr_set().
Referenced by nfacct_nlmsg_parse_payload().


| 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 |
References bitset, NFACCT_ATTR_BYTES, NFACCT_ATTR_FLAGS, NFACCT_ATTR_NAME, NFACCT_ATTR_PKTS, and NFACCT_ATTR_QUOTA.
nfacct_free - release one accounting object
| nfacct | pointer to the accounting object |
| 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.
References NFACCT_SNPRINTF_T_PLAIN, and NFACCT_SNPRINTF_T_XML.