diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-01-17 20:34:13 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-01-17 20:34:13 +0100 |
commit | 4fb9c22f6e4ec2fadd22c0863137f211d9b392c4 (patch) | |
tree | 2f3cc691720551bc3f230651ee6b69c1b8c093e2 /include/conntrack.h | |
parent | d05f05e21be0cca59ca67ac19ef2b73c467b8250 (diff) | |
download | conntrack-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.h | 8 |
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, |