Code

iptables plugin: Adds a plugin to collect iptables'-counters.
authorSjoerd van der Berg <harekiet@gmail.com>
Sat, 3 Mar 2007 09:35:35 +0000 (10:35 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sat, 3 Mar 2007 09:35:35 +0000 (10:35 +0100)
commit863dfcdf274509e4e1836c2c8f1f10f09e1d13be
treefcce43cb3faca35d40962bf7d00d4de3b821913e
parentd51a3768cc3302215ecf1f125a6f6d85ac246760
iptables plugin: Adds a plugin to collect iptables'-counters.

My first attempt at a module for this is an iptables modules This will try to
read out the rules from iptables for a specific table and chain.
It will go through the rules looking for ones with "comment" matches and will
use the comment as a base for the generated filename.

So basically looking for lines like
 $ iptables -t mangle -A incoming -p tcp -m comment --comment "tcp"
will generate a iptables-incoming/tcp.rrd file from the byte counters

There used to also be an account iptables module but that seems to have been
neglected, which would generate /proc entries for specific rules, don't know
what would work better. Either way, this seems to work somewhat.
12 files changed:
configure.in
contrib/iptables/accounting.sh [new file with mode: 0755]
src/Makefile.am
src/iptables.c [new file with mode: 0644]
src/libiptc/Makefile.am [new file with mode: 0644]
src/libiptc/ipt_kernel_headers.h [new file with mode: 0644]
src/libiptc/libip4tc.c [new file with mode: 0644]
src/libiptc/libip6tc.c [new file with mode: 0644]
src/libiptc/libiptc.c [new file with mode: 0644]
src/libiptc/libiptc.h [new file with mode: 0644]
src/libiptc/linux_list.h [new file with mode: 0644]
src/libiptc/linux_stddef.h [new file with mode: 0644]