aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-03-15 00:59:09 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-03-25 13:21:13 +0100
commitd2e40bb8d98763e33c3eeac4f5f1b7c53465009f (patch)
treef2eb7812c96b418bbfe93dfc238afd466b78a946 /tap.c
parent14c4c0253c51506caddb380c65fd56e0cf1060ab (diff)
downloadpasst-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.gz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.bz2
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.lz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.xz
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.tar.zst
passt-d2e40bb8d98763e33c3eeac4f5f1b7c53465009f.zip
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 <sbrivio@redhat.com>
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c4
1 files changed, 2 insertions, 2 deletions
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");
}