summaryrefslogtreecommitdiff
path: root/include/conntrack.h
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 20:34:13 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-01-17 20:34:13 +0100
commit4fb9c22f6e4ec2fadd22c0863137f211d9b392c4 (patch)
tree2f3cc691720551bc3f230651ee6b69c1b8c093e2 /include/conntrack.h
parentd05f05e21be0cca59ca67ac19ef2b73c467b8250 (diff)
downloadconntrack-tools-4fb9c22f6e4ec2fadd22c0863137f211d9b392c4.tar.gz
conntrack-tools-4fb9c22f6e4ec2fadd22c0863137f211d9b392c4.zip
conntrack: add -C command to display the counter
This patch adds the -C command, to display the table counter. In the case of `-C conntrack' the tool reads the proc interface. For expectation, it loops on the table to count the number of entries (as there is not proc interface to display the number of expectations). Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/conntrack.h')
-rw-r--r--include/conntrack.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/conntrack.h b/include/conntrack.h
index 4787809..87a262d 100644
--- a/include/conntrack.h
+++ b/include/conntrack.h
@@ -59,8 +59,14 @@ enum action {
EXP_EVENT_BIT = 14,
EXP_EVENT = (1 << EXP_EVENT_BIT),
+
+ CT_COUNT_BIT = 15,
+ CT_COUNT = (1 << CT_COUNT_BIT),
+
+ EXP_COUNT_BIT = 16,
+ EXP_COUNT = (1 << EXP_COUNT_BIT),
};
-#define NUMBER_OF_CMD 15
+#define NUMBER_OF_CMD 17
enum options {
CT_OPT_ORIG_SRC_BIT = 0,