path: root/src/main.c
diff options
authorPablo Neira Ayuso <>2008-10-26 20:48:55 +0100
committerPablo Neira Ayuso <>2008-10-26 20:48:55 +0100
commitc9fc2e7843e56eec84d92b5baa208afdb5b81d3c (patch)
treecbb815e7d2d3a715eaeb81d10866c5049df757f7 /src/main.c
parent367bd830bb88393a639f6f41c3f390f6dd3e120f (diff)
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 <>
Diffstat (limited to 'src/main.c')
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index b535c40..d6aa938 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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[] =
@@ -180,6 +181,10 @@ int main(int argc, char *argv[])
+ case 'v':
+ set_operation_mode(&type, REQUEST, argv);
+ action = DEBUG_INFO;
+ break;
fprintf(stderr, "Unknown option: %s\n", argv[i]);