summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* src: NFACCT_SNPRINTF_T_XML flag for nfacct_snprintf to output timePablo Neira Ayuso2012-06-221-21/+99
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: change prototype of nfacct_snprintf() to support output in XMLPablo Neira Ayuso2012-03-272-16/+37
| | | | | | | | | | | | | | | | This patch adds supports for XML output for nfacct_snprintf(). This also bumps the library current version number and it adds a new version in the symbol map. I decided to do so because, although no official release has happened so far. Many distributors have already decided to provide packages for this. We don't provide the old symbol version for nfacct_snprintf, I think that's too much (given the lifetime of it). But we make sure that we break the binary gracefully in case of version mismatches (not silently, with unexpectable side effects). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: check if attribute is set in nfacct_attr_get*Pablo Neira Ayuso2012-02-011-4/+8
| | | | | | | Instead of returning the data even if unset. Reported-by: Alejandro Castaño del Castillo <alex@wadobo.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: use NFACCT_ATTR_* flags in nfacct_nlmsg_build_payloadPablo Neira Ayuso2012-02-011-3/+3
| | | | | | | Instead of checking is name, packets and bytes are set. Reported-by: Alejandro Castaño del Castillo <alex@wadobo.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: modify nfacct_snprint outputPablo Neira Ayuso2012-01-011-3/+3
| | | | | | | | | Now it looks like: { pkts = 00000000000000000000, bytes = 00000000000000000000 } = test1; { pkts = 00000000000000000000, bytes = 00000000000000000000 } = test2; Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* add COPYING file and other licensing stuffPablo Neira Ayuso2011-12-291-1/+1
| | | | | | | | | License is LGPLv2.1+, fix header of libnetfilter_acct.c which tells LGPLv2 or any later (mind the missing .1 after v2). Examples of this library are in the public domain. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: add library documentation in doxygenPablo Neira Ayuso2011-12-291-24/+157
| | | | | | This patch adds the library documentation in doxygen format. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: major API redesignPablo Neira Ayuso2011-12-292-84/+192
| | | | | | | | | | | | | | | This patch reworks the initial API. Now it provides functions to: - allocate/release accounting objects. - set/unset/get attributes of accounting objects. - build one netlink message from one accounting object. - parse one netlink message to one accounting object. - print one accounting object into a buffer. Binary layout of nfacct objects are opaque. This is good for extensibility without breaking backward compatibility. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* extend nfacct_list to allow to zero countersPablo Neira Ayuso2011-12-141-2/+6
|
* examples: add nfacct-del to delete accounting objectsPablo Neira Ayuso2011-12-141-1/+1
| | | | This also fixes one wrong flag in nfacct_delete(...)
* fix endianness in 64-bits packet and bytes countersPablo Neira Ayuso2011-12-021-4/+7
| | | | | In nfnetlink, the policy is that attributes are in network byte order.
* fix crash if no data pointer is passed to nfacct_list_cbPablo Neira Ayuso2011-10-161-1/+1
|
* intial import of libnetfilter_acctPablo Neira Ayuso2011-10-164-0/+189