summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-07-09 11:15:14 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-07-09 11:15:14 +0200
commitc07bdeb7419baf7f66e8de386744be9ec4891bb3 (patch)
tree881904b2400c801f9803f388861b93264a6ee992
parent65c34d8fec7707e93cecd0378d06fa9b184565e8 (diff)
all: show git id in --version information
In order to be able to better track regressions or to give support, let us track the Git id as well in version information. This makes the ``--version'' switch actually useful. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r--astraceroute.c6
-rw-r--r--bpfc.c6
-rw-r--r--curvetun.c8
-rw-r--r--flowtop.c9
-rw-r--r--ifpps.c7
-rw-r--r--netsniff-ng.c6
-rw-r--r--staging/mausezahn.c6
-rw-r--r--trafgen.c6
8 files changed, 34 insertions, 20 deletions
diff --git a/astraceroute.c b/astraceroute.c
index 1bcb9a4..ddf352b 100644
--- a/astraceroute.c
+++ b/astraceroute.c
@@ -35,6 +35,7 @@
#include "die.h"
#include "dev.h"
#include "sig.h"
+#include "config.h"
#include "tprintf.h"
#include "pkt_buff.h"
#include "proto.h"
@@ -233,8 +234,9 @@ static void __noreturn help(void)
static void __noreturn version(void)
{
- printf("\nastraceroute %s, autonomous system trace route utility\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nastraceroute %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("autonomous system trace route utility\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2011-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>\n"
"Swiss federal institute of technology (ETH Zurich)\n"
diff --git a/bpfc.c b/bpfc.c
index 4ba0563..5063d02 100644
--- a/bpfc.c
+++ b/bpfc.c
@@ -16,6 +16,7 @@
#include "xmalloc.h"
#include "die.h"
#include "bpf.h"
+#include "config.h"
static const char *short_options = "vhi:Vdbf:p";
static const struct option long_options[] = {
@@ -67,8 +68,9 @@ static void __noreturn help(void)
static void __noreturn version(void)
{
- printf("\nbpfc %s, a tiny BPF compiler\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nbpfc %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("a tiny BPF compiler\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2011-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,\n"
"Swiss federal institute of technology (ETH Zurich)\n"
diff --git a/curvetun.c b/curvetun.c
index ffb6314..6d93ec9 100644
--- a/curvetun.c
+++ b/curvetun.c
@@ -34,6 +34,7 @@
#include "xmalloc.h"
#include "curvetun.h"
#include "curve.h"
+#include "config.h"
#include "ct_usermgmt.h"
#include "ct_servmgmt.h"
#include "ioops.h"
@@ -87,7 +88,7 @@ static void signal_handler(int number)
static void __noreturn help(void)
{
- printf("\ncurvetun %s, lightweight curve25519-based VPN/IP tunnel\n", VERSION_STRING);
+ printf("\ncurvetun %s, lightweight curve25519-based IP tunnel\n", VERSION_STRING);
puts("http://www.netsniff-ng.org\n\n"
"Usage: curvetun [options]\n"
"Options, general:\n"
@@ -129,8 +130,9 @@ static void __noreturn help(void)
static void __noreturn version(void)
{
- printf("\ncurvetun %s, lightweight curve25519-based VPN/IP tunnel\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\ncurvetun %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("lightweight curve25519-based IP tunnel\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2011-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,\n"
"Swiss federal institute of technology (ETH Zurich)\n"
diff --git a/flowtop.c b/flowtop.c
index ef691aa..b9d32cc 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -27,6 +27,7 @@
#include "xmalloc.h"
#include "conntrack.h"
#include "ioops.h"
+#include "config.h"
#include "str.h"
#include "sig.h"
#include "geoip.h"
@@ -223,7 +224,7 @@ static void flow_entry_get_extended(struct flow_entry *n);
static void help(void)
{
- printf("\nflowtop %s, top-like netfilter TCP/UDP flow tracking\n",
+ printf("\nflowtop %s, top-like netfilter TCP/UDP/SCTP/.. flow tracking\n",
VERSION_STRING);
puts("http://www.netsniff-ng.org\n\n"
"Usage: flowtop [options]\n"
@@ -258,9 +259,9 @@ static void help(void)
static void version(void)
{
- printf("\nflowtop %s, top-like netfilter TCP/UDP flow tracking\n",
- VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nflowtop %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("top-like netfilter TCP/UDP/SCTP/.. flow tracking\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2011-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>\n"
"Copyright (C) 2011-2012 Emmanuel Roullit <emmanuel.roullit@gmail.com>\n"
diff --git a/ifpps.c b/ifpps.c
index 0ae77cb..3a59c10 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -27,6 +27,7 @@
#include "ioops.h"
#include "promisc.h"
#include "cpus.h"
+#include "config.h"
#include "built_in.h"
#include "screen.h"
@@ -130,9 +131,9 @@ static void __noreturn help(void)
static void __noreturn version(void)
{
- printf("\nifpps %s, top-like kernel networking and system statistics\n",
- VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nifpps %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("top-like kernel networking and system statistics\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2009-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>\n"
"Swiss federal institute of technology (ETH Zurich)\n"
diff --git a/netsniff-ng.c b/netsniff-ng.c
index 8c89f76..09dbf41 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -37,6 +37,7 @@
#include "irq.h"
#include "str.h"
#include "sig.h"
+#include "config.h"
#include "sock.h"
#include "geoip.h"
#include "lockme.h"
@@ -1111,8 +1112,9 @@ static void __noreturn help(void)
static void __noreturn version(void)
{
- printf("\nnetsniff-ng %s, the packet sniffing beast\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nnetsniff-ng %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("the packet sniffing beast\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2009-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>\n"
"Copyright (C) 2009-2012 Emmanuel Roullit <emmanuel.roullit@gmail.com>\n"
diff --git a/staging/mausezahn.c b/staging/mausezahn.c
index 7831b90..759ac28 100644
--- a/staging/mausezahn.c
+++ b/staging/mausezahn.c
@@ -27,6 +27,7 @@
#include "mz.h"
#include "cli.h"
#include "mops.h"
+#include "config.h"
#include "llist.h"
#include "die.h"
@@ -170,8 +171,9 @@ static void help(void)
static void version(void)
{
- printf("\nmausezahn %s, a fast versatile traffic generator\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\nmausezahn %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("a fast versatile traffic generator\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2008-2010 Herbert Haas <herbert@perihel.at>,\n"
"Copyright (C) 2011 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,\n"
diff --git a/trafgen.c b/trafgen.c
index 762d0f9..3457bfd 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -46,6 +46,7 @@
#include "mac80211.h"
#include "ioops.h"
#include "irq.h"
+#include "config.h"
#include "built_in.h"
#include "trafgen_conf.h"
#include "tprintf.h"
@@ -281,8 +282,9 @@ static void __noreturn example(void)
static void __noreturn version(void)
{
- printf("\ntrafgen %s, multithreaded zero-copy network packet generator\n", VERSION_LONG);
- puts("http://www.netsniff-ng.org\n\n"
+ printf("\ntrafgen %s, Git id: %s\n", VERSION_LONG, GITVERSION);
+ puts("multithreaded zero-copy network packet generator\n"
+ "http://www.netsniff-ng.org\n\n"
"Please report bugs to <bugs@netsniff-ng.org>\n"
"Copyright (C) 2011-2013 Daniel Borkmann <dborkma@tik.ee.ethz.ch>,\n"
"Swiss federal institute of technology (ETH Zurich)\n"