summaryrefslogtreecommitdiffstats
path: root/include/libnetfilter_acct
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2011-10-16 17:50:55 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2011-10-16 21:28:13 +0200
commit1cfe3cf24db29bd9274c2e59587cc0960e9db47c (patch)
tree4e71628daab46e7197d15960cbfd7618a5976db2 /include/libnetfilter_acct
intial import of libnetfilter_acct
Diffstat (limited to 'include/libnetfilter_acct')
-rw-r--r--include/libnetfilter_acct/libnetfilter_acct.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/libnetfilter_acct/libnetfilter_acct.h b/include/libnetfilter_acct/libnetfilter_acct.h
new file mode 100644
index 0000000..5a162b3
--- /dev/null
+++ b/include/libnetfilter_acct/libnetfilter_acct.h
@@ -0,0 +1,19 @@
+#ifndef _LIBNETFILTER_ACCT_H_
+#define _LIBNETFILTER_ACCT_H_
+
+#include <sys/types.h>
+#include <linux/netfilter/nfnetlink_acct.h>
+
+struct nfacct {
+ char name[NFACCT_NAME_MAX];
+ uint64_t pkts;
+ uint64_t bytes;
+};
+
+struct nlmsghdr *nfacct_add(char *buf, struct nfacct *nfacct);
+struct nlmsghdr *nfacct_list(char *buf);
+int nfacct_list_cb(const struct nlmsghdr *nlh, void *data);
+struct nlmsghdr *nfacct_flush(char *buf);
+struct nlmsghdr *nfacct_delete(char *buf, const char *filter_name);
+
+#endif