From c1aee513247783489c45507808b5a4589f6fb43a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 30 May 2013 16:31:21 +0200 Subject: netsniff-ng: Add __maybe_unused attribute to timer functions The two functions timer_elapsed() and timer_next_dump() both take an argument which they don't use. Annotate them appropriately using the __maybe_unused attribute. Signed-off-by: Tobias Klauser --- netsniff-ng.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netsniff-ng.c b/netsniff-ng.c index fe09c82..7070873 100644 --- a/netsniff-ng.c +++ b/netsniff-ng.c @@ -115,7 +115,7 @@ static void signal_handler(int number) } } -static void timer_elapsed(int unused) +static void timer_elapsed(int unused __maybe_unused) { int ret; @@ -147,8 +147,7 @@ static void timer_purge(void) setitimer(ITIMER_REAL, &itimer, NULL); } - -static void timer_next_dump(int unused) +static void timer_next_dump(int unused __maybe_unused) { set_itimer_interval_value(&itimer, interval, 0); next_dump = true; -- cgit v1.2.3-54-g00ecf From c2e6ac191eb0a721570bf4bcb747c08f6487c7aa Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 30 May 2013 16:34:56 +0200 Subject: ifpps: Allow to select number of top hitter CPUs by command line option Instead of hard-coding the maximum number of top hitter CPUs, allow the user to set it manually using a command line option. The default value (if no command line parameter is specified) remains at 10. Also update the manpage accordingly. Signed-off-by: Tobias Klauser --- ifpps.8 | 4 ++++ ifpps.c | 39 ++++++++++++++++++++++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ifpps.8 b/ifpps.8 index 97a3760..26827b2 100644 --- a/ifpps.8 +++ b/ifpps.8 @@ -47,6 +47,10 @@ Networking device to fetch statistics from, for example, eth0, wlan0. .SS -t