diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-04-30 14:30:39 +0200 |
---|---|---|
committer | Tobias Klauser <tklauser@distanz.ch> | 2014-04-30 14:30:39 +0200 |
commit | 1b5611fafbed8d0e04a17b2a53ff78b003165598 (patch) | |
tree | 6050444fa685ef852a9b77fa776dd3f6e5dd7588 | |
parent | 47bdd9425177dd5f80b43ba10372ca1750df4ac2 (diff) |
netsniff-ng/ring: Make verbose flag bool
Change type of verbose flag from int to bool.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r-- | netsniff-ng.c | 6 | ||||
-rw-r--r-- | ring_rx.c | 2 | ||||
-rw-r--r-- | ring_rx.h | 2 | ||||
-rw-r--r-- | ring_tx.c | 2 | ||||
-rw-r--r-- | ring_tx.h | 2 |
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; @@ -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; @@ -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); @@ -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: @@ -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); |