summaryrefslogtreecommitdiffstats
path: root/include/libnetfilter_acct/libnetfilter_acct.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libnetfilter_acct/libnetfilter_acct.h')
-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