Skip to content

Commit

Permalink
Print both lib and kernel module version in pfcount
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Oct 23, 2023
1 parent 2a416a2 commit 395d711
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions userland/examples/pfcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1332,11 +1332,16 @@ int main(int argc, char* argv[]) {
pfring_set_application_name(pd, "pfcount");
pfring_version(pd, &version);

if (!quiet)
printf("Using PF_RING v.%d.%d.%d\n",
if (!quiet) {
printf("Using PF_RING ");
#ifdef HAVE_PF_RING_ZC
printf("v.%s ", pfring_zc_version());
#endif
printf("kernel module v.%d.%d.%d\n",
(version & 0xFFFF0000) >> 16,
(version & 0x0000FF00) >> 8,
version & 0x000000FF);
}
}

if (enable_hw_timestamp) {
Expand Down
2 changes: 1 addition & 1 deletion userland/examples_zc/zcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void sigproc(int sig) {

void printHelp(void) {
printf("zcount - (C) 2014-23 ntop\n");
printf("Using PFRING_ZC v.%s\n", pfring_zc_version());
printf("Using PF_RING v.%s\n", pfring_zc_version());
printf("A simple packet counter application.\n\n");
printf("Usage: zcount -i <device> -c <cluster id>\n"
" [-h] [-g <core id>] [-R] [-H] [-S <core id>] [-v] [-a] [-t]\n\n");
Expand Down

0 comments on commit 395d711

Please sign in to comment.