From c9fc2e7843e56eec84d92b5baa208afdb5b81d3c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 26 Oct 2008 20:48:55 +0100 Subject: 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 --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.c') 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[] = "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]); -- cgit v1.2.3