summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--netsniff-ng.c6
-rw-r--r--ring_rx.c2
-rw-r--r--ring_rx.h2
-rw-r--r--ring_tx.c2
-rw-r--r--ring_tx.h2
5 files changed, 7 insertions, 7 deletions
diff --git a/netsniff-ng.c b/netsniff-ng.c
index b345b22..52ec00f 100644
--- a/netsniff-ng.c
+++ b/netsniff-ng.c
@@ -54,10 +54,10 @@ enum dump_mode {
struct ctx {
char *device_in, *device_out, *device_trans, *filter, *prefix;
- int cpu, rfraw, dump, print_mode, dump_dir, packet_type, verbose;
+ int cpu, rfraw, dump, print_mode, dump_dir, packet_type;
unsigned long kpull, dump_interval, tx_bytes, tx_packets;
size_t reserve_size;
- bool randomize, promiscuous, enforce, jumbo, dump_bpf;
+ bool randomize, promiscuous, enforce, jumbo, dump_bpf, verbose;
enum pcap_ops_groups pcap; enum dump_mode dump_mode;
uid_t uid; gid_t gid; uint32_t link_type, magic;
};
@@ -1300,7 +1300,7 @@ int main(int argc, char **argv)
ctx.dump_interval *= strtoul(optarg, NULL, 0);
break;
case 'V':
- ctx.verbose = 1;
+ ctx.verbose = true;
break;
case 'B':
ctx.dump_bpf = true;
diff --git a/ring_rx.c b/ring_rx.c
index c42c353..97c485e 100644
--- a/ring_rx.c
+++ b/ring_rx.c
@@ -76,7 +76,7 @@ void setup_rx_ring_layout(int sock, struct ring *ring, size_t size,
ring_verify_layout(ring);
}
-void create_rx_ring(int sock, struct ring *ring, int verbose)
+void create_rx_ring(int sock, struct ring *ring, bool verbose)
{
int ret;
bool v3 = get_sockopt_tpacket(sock) == TPACKET_V3;
diff --git a/ring_rx.h b/ring_rx.h
index 1a60453..24bd806 100644
--- a/ring_rx.h
+++ b/ring_rx.h
@@ -12,7 +12,7 @@
#include "ring.h"
extern void destroy_rx_ring(int sock, struct ring *ring);
-extern void create_rx_ring(int sock, struct ring *ring, int verbose);
+extern void create_rx_ring(int sock, struct ring *ring, bool verbose);
extern void mmap_rx_ring(int sock, struct ring *ring);
extern void alloc_rx_ring_frames(int sock, struct ring *ring);
extern void bind_rx_ring(int sock, struct ring *ring, int ifindex);
diff --git a/ring_tx.c b/ring_tx.c
index ee47f3f..3d69752 100644
--- a/ring_tx.c
+++ b/ring_tx.c
@@ -68,7 +68,7 @@ void setup_tx_ring_layout(int sock, struct ring *ring, size_t size,
ring_verify_layout(ring);
}
-void create_tx_ring(int sock, struct ring *ring, int verbose)
+void create_tx_ring(int sock, struct ring *ring, bool verbose)
{
int ret;
retry:
diff --git a/ring_tx.h b/ring_tx.h
index 70dd401..ba8407a 100644
--- a/ring_tx.h
+++ b/ring_tx.h
@@ -15,7 +15,7 @@
#define TX_KERNEL_PULL_INT 10
extern void destroy_tx_ring(int sock, struct ring *ring);
-extern void create_tx_ring(int sock, struct ring *ring, int verbose);
+extern void create_tx_ring(int sock, struct ring *ring, bool verbose);
extern void mmap_tx_ring(int sock, struct ring *ring);
extern void alloc_tx_ring_frames(int sock, struct ring *ring);
extern void bind_tx_ring(int sock, struct ring *ring, int ifindex);