Skip to content

Commit

Permalink
Using Autoconf config.h to get package version
Browse files Browse the repository at this point in the history
  • Loading branch information
lpefferkorn committed Nov 17, 2013
1 parent 3c011af commit fa28ea9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/ipdecap.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,11 @@ along with ipdecap. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#include <inttypes.h>

#include "config.h"
#include "ipdecap.h"
#include "gre.h"
#include "esp.h"

#define IPDECAP_VERSION 0.5

// Command line parameters
static const char *args_str = "vi:o:c:f:Vl";

Expand Down Expand Up @@ -77,7 +76,7 @@ pcap_dumper_t *pcap_dumper;
int ignore_esp;

void usage(void) {
printf("Ipdecap %0.1f, decapsulate ESP, GRE, IPIP packets - Loic Pefferkorn\n", IPDECAP_VERSION);
printf("Ipdecap %s, decapsulate ESP, GRE, IPIP packets - Loic Pefferkorn\n", PACKAGE_VERSION);
printf(
"Usage\n"
" ipdecap [-v] [-l] [-V] -i input.cap -o output.cap [-c esp.conf] [-f <bpf filter>] \n"
Expand All @@ -94,7 +93,7 @@ void usage(void) {
}

void print_version() {
printf("Ipdecap %0.1f\n", IPDECAP_VERSION);
printf("Ipdecap %s\n", PACKAGE_VERSION);
}

void verbose(const char *format, ...) {
Expand Down

0 comments on commit fa28ea9

Please sign in to comment.