summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: bump version to 1.0.2HEADnfacct-1.0.2masterPablo Neira Ayuso2016-08-221-2/+2
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Add JSON output formatting to nfacct utilityHarald Welte2016-02-292-23/+68
| | | | | | This is based on the JSON support patch of libnetfilter_acct. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* include: Sync with kernel headersFelix Janda2015-05-292-56/+15
| | | | | Signed-off-by: Felix Janda <felix.janda@posteo.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: add filter in to the list operationAlexey Perevalov2014-09-152-0/+37
| | | | | | | | | | | | | | | | | | | Filter feature is working through NFACCT_FILTER netlink attribute. If kernel doesn't support it, client will not get an error and silently will work as before. This patch adds following command line arguments: counters, overquota, bytes-quota, pkts-quota. Which could be used with list operation. Combination of these command line options isn't allowed. For example. user@root:/#nfacct list counters will show counters without byte/packet based quota user@root:/#nfacct list reset overquota will reset value for overquoted counters only Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: check cmd line argument for singlenessAlexey Perevalov2014-09-151-0/+11
| | | | | | | It was possible to specify several equal options for list operation. Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* src: remove unnecessary end of line checkMathieu Poirier2014-05-071-4/+0
| | | | | | | | The EOF character alone should determine the end of input during restore operations. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: simplify nfacct_cmd_monitorPablo Neira Ayuso2014-04-281-6/+5
| | | | | | | Simplify the code that was added in ba16753 ("nfacct: adding quota capabilities"). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: adding quota capabilitiesMathieu Poirier2014-04-243-16/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The accounting framework now supports quota at the packet and byte level. The tool is simply enhanced with two optional arguments to specify the whether accounting for byte of packet and the limit associated with each. Also adding a monitor mode that listens for quota attainment notification. Examples: /* create an accounting object that isn't associated to a quota */ $ nfacct add first_no_quota /* create a quota object with byte count limited to 50 byte */ $ nfacct add second_quota byte 50 /* create a quota object with packet count limited to 5 */ $ nfacct add third_quota packet 5 From there the accounting objects can be used in iptables the same way as they did before: /* limit the number of icmp packets allowed through the OUTPUT chain */ $ iptables -I OUTPUT -p icmp -m nfacct --nfacct-name third_quota -j REJECT /* listening for quota attainment notification */ $ nfacct monitor Everything else works the same way. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* configure: uclinux is also linuxGustavo Zacarias2013-09-171-1/+1
| | | | | Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: Improve 'flush' man page entryThomas Jarosch2013-05-091-1/+1
| | | | | Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: fix packet and bytes counters length in restore operationPablo Neira Ayuso2013-03-051-2/+5
| | | | | | | | | They are 64 bits long, not 32 bits long. Based on patch from Mr Dash Four. Reported-by: Mr Dash Four <mr.dash.four@googlemail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: bump version to 1.0.1nfacct-1.0.1Pablo Neira Ayuso2013-03-031-2/+2
| | | | | | And update library dependencies. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* Add restore commandEric Leblond2012-12-272-10/+58
| | | | | | | | | | | This patch adds a 'restore' command to nfacct commands. It takes the output of 'list' command and use it to restore the counters. Basically, the user can save the counter with: nfacct list >nfacct.dump And restore them with: nfacct restore <nfacct.dump Signed-off-by: Eric Leblond <eric@regit.org>
* nfacct: fix parsing of `xml' `reset' together.Eric Leblond2012-07-161-4/+4
| | | | | | | This patch fixes a small typo in the command line parsing. Signed-off-by: Eric Leblond <eric@regit.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: nfacct release 1.0.0nfacct-1.0.0Pablo Neira Ayuso2012-03-271-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: update manpage to include xml and reset optionsPablo Neira Ayuso2012-03-271-2/+13
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: add XML output supportPablo Neira Ayuso2012-03-271-19/+36
| | | | | | | | | | This patch allows you to make: nfacct get http-traffic xml to obtain the statistics in XML format. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: fix licensing terms, this is GPLv2 softwarePablo Neira Ayuso2012-03-131-1/+1
| | | | | | | SuSE (via Jan Engelhardt) reported that nfacct.c header was not consistent with the COPYING file. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* doc: minor fixes for nfacct.8Pablo Neira Ayuso2012-02-291-2/+2
| | | | | | fix several mistakes in manpage. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: replace one leftover perror by nfacct_perrorPablo Neira Ayuso2012-01-011-1/+1
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: check for wrong argumentsPablo Neira Ayuso2012-01-011-0/+6
| | | | | | | | nfacct get example lala now gracefully fails. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: check for too many argumentsPablo Neira Ayuso2012-01-011-3/+18
| | | | | | | More robust behaviour, display error if you pass more arguments than require. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* build: remove bogus dependenciesPablo Neira Ayuso2012-01-011-2/+0
| | | | | | We don't require yacc and flex. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* nfacct: use return instead of exit(EXIT_FAILURE)Pablo Neira Ayuso2012-01-011-5/+5
| | | | Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* initial importPablo Neira Ayuso2011-12-3014-0/+1056
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>