netfilter: nfnetlink_acct: Adding quota support to accounting framework
nfacct objects already support accounting at the byte and packet level. As such it is a natural extension to add the possiblity to define a ceiling limit for both metrics. All the support for quotas itself is added to nfnetlink acctounting framework to stay coherent with current accounting object management. Quota limit checks are implemented in xt_nfacct filter where statistic collection is already done. Pablo Neira Ayuso has also contributed to this feature. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
committed by
Pablo Neira Ayuso
parent
1404c3ab98
commit
683399eddb
@@ -3,11 +3,17 @@
|
||||
|
||||
#include <uapi/linux/netfilter/nfnetlink_acct.h>
|
||||
|
||||
enum {
|
||||
NFACCT_NO_QUOTA = -1,
|
||||
NFACCT_UNDERQUOTA,
|
||||
NFACCT_OVERQUOTA,
|
||||
};
|
||||
|
||||
struct nf_acct;
|
||||
|
||||
struct nf_acct *nfnl_acct_find_get(const char *filter_name);
|
||||
void nfnl_acct_put(struct nf_acct *acct);
|
||||
void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct *nfacct);
|
||||
|
||||
extern int nfnl_acct_overquota(const struct sk_buff *skb,
|
||||
struct nf_acct *nfacct);
|
||||
#endif /* _NFNL_ACCT_H */
|
||||
|
||||
Reference in New Issue
Block a user