diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-10-26 20:48:55 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-10-26 20:48:55 +0100 |
commit | c9fc2e7843e56eec84d92b5baa208afdb5b81d3c (patch) | |
tree | cbb815e7d2d3a715eaeb81d10866c5049df757f7 /src/main.c | |
parent | 367bd830bb88393a639f6f41c3f390f6dd3e120f (diff) | |
download | conntrack-tools-c9fc2e7843e56eec84d92b5baa208afdb5b81d3c.tar.gz conntrack-tools-c9fc2e7843e56eec84d92b5baa208afdb5b81d3c.zip |
ftfw: add option `-v' to output debugging information (if any)
This patch introduces the option `-v' to show useful debugging
information, if any. As for now, only sync-ftfw.c make use of it to
display the content and the length of the resent list/queue. This
is useful to check for message leaks. Other working modes or
synchronization approaches may use it to display debugging
information in the future.
This patch removes _SIGNAL_DEBUG in sync-ftfw.c that was used for
for the same purpose. However, it could only be enabled at compilation
time and it uses signalling instead of the standard UNIX socket
interface that conntrackd provides.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -47,7 +47,8 @@ static const char usage_client_commands[] = " -R, resync with kernel conntrack table\n" " -n, request resync with other node (only FT-FW and NOTRACK modes)\n" " -x, dump cache in XML format (requires -i or -e)" - " -t, reset the kernel timeout (see PurgeTimeout clause)"; + " -t, reset the kernel timeout (see PurgeTimeout clause)" + " -v, show internal debugging information (if any)"; static const char usage_options[] = "Options:\n" @@ -180,6 +181,10 @@ int main(int argc, char *argv[]) } break; + case 'v': + set_operation_mode(&type, REQUEST, argv); + action = DEBUG_INFO; + break; default: show_usage(argv[0]); fprintf(stderr, "Unknown option: %s\n", argv[i]); |