From 626a77167b78f9703fbc6d1719040a12487de5b0 Mon Sep 17 00:00:00 2001 From: Tom Canich Date: Thu, 15 Jun 2017 14:38:12 -0400 Subject: [PATCH 1/3] Correct version number output in help message (0.2 -> 1.0) --- ipv6mon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ipv6mon.c b/ipv6mon.c index ea1f834..f255b16 100644 --- a/ipv6mon.c +++ b/ipv6mon.c @@ -884,7 +884,7 @@ void usage(void){ * Prints help information for the na-attack tool */ void print_help(void){ - puts( "ipv6mon version 0.2\nAn IPv6 Address Monitoring tool\n"); + puts( "ipv6mon version 1.0\nAn IPv6 Address Monitoring tool\n"); usage(); puts("\nOPTIONS:\n" From 05cc933b5a571b1e3014fd7777708246d9da8ec5 Mon Sep 17 00:00:00 2001 From: Tom Canich Date: Thu, 15 Jun 2017 14:51:59 -0400 Subject: [PATCH 2/3] Define IP6MON_VERSION to store the version number of the program. Modify print_help() to use IP6MON_VERSION when printing the help message. --- ipv6mon.c | 2 +- ipv6mon.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ipv6mon.c b/ipv6mon.c index f255b16..e389624 100644 --- a/ipv6mon.c +++ b/ipv6mon.c @@ -884,7 +884,7 @@ void usage(void){ * Prints help information for the na-attack tool */ void print_help(void){ - puts( "ipv6mon version 1.0\nAn IPv6 Address Monitoring tool\n"); + printf( "ipv6mon version %.1f\nAn IPv6 Address Monitoring tool\n",IP6MON_VERSION); usage(); puts("\nOPTIONS:\n" diff --git a/ipv6mon.h b/ipv6mon.h index 2392abc..4b4f33f 100644 --- a/ipv6mon.h +++ b/ipv6mon.h @@ -3,6 +3,8 @@ * */ +#define IP6MON_VERSION 1.0 + #define LUI long unsigned int #define BUFFER_SIZE 65556 From 53c8c4fd00fbc514befae4d0496fa3b9194181b5 Mon Sep 17 00:00:00 2001 From: Tom Canich Date: Thu, 15 Jun 2017 15:08:04 -0400 Subject: [PATCH 3/3] Change course...switch back to puts() for version number output to avoid floating point. Define IP6MON_VERSION as a string constant. --- ipv6mon.c | 2 +- ipv6mon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ipv6mon.c b/ipv6mon.c index e389624..fd977a2 100644 --- a/ipv6mon.c +++ b/ipv6mon.c @@ -884,7 +884,7 @@ void usage(void){ * Prints help information for the na-attack tool */ void print_help(void){ - printf( "ipv6mon version %.1f\nAn IPv6 Address Monitoring tool\n",IP6MON_VERSION); + puts( "ipv6mon version " IP6MON_VERSION "\nAn IPv6 Address Monitoring tool\n"); usage(); puts("\nOPTIONS:\n" diff --git a/ipv6mon.h b/ipv6mon.h index 4b4f33f..bfd7709 100644 --- a/ipv6mon.h +++ b/ipv6mon.h @@ -3,7 +3,7 @@ * */ -#define IP6MON_VERSION 1.0 +#define IP6MON_VERSION "1.0" #define LUI long unsigned int