From d2e40bb8d98763e33c3eeac4f5f1b7c53465009f Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 15 Mar 2022 00:59:09 +0100 Subject: conf, util, tap: Implement --trace option for extra verbose logging --debug can be a bit too noisy, especially as single packets or socket messages are logged: implement a new option, --trace, implying --debug, that enables all debug messages. Signed-off-by: Stefano Brivio --- tap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tap.c') diff --git a/tap.c b/tap.c index 29fcd51..e1854fb 100644 --- a/tap.c +++ b/tap.c @@ -283,14 +283,14 @@ static void tap_packet_debug(struct iphdr *iph, struct ipv6hdr *ip6h, } if (proto == IPPROTO_TCP || proto == IPPROTO_UDP) { - debug("protocol %i from tap: %s:%i -> %s:%i (%i packet%s)", + trace("protocol %i from tap: %s:%i -> %s:%i (%i packet%s)", proto, seq4 ? buf4s : buf6s, ntohs(seq4 ? seq4->source : seq6->source), seq4 ? buf4d : buf6d, ntohs(seq4 ? seq4->dest : seq6->dest), count, count == 1 ? "" : "s"); } else { - debug("protocol %i from tap: %s -> %s (%i packet%s)", + trace("protocol %i from tap: %s -> %s (%i packet%s)", proto, iph ? buf4s : buf6s, iph ? buf4d : buf6d, count, count == 1 ? "" : "s"); } -- cgit v1.2.3