From cc3d516df386f727d29efa6c599e433a8971ffcc Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 13 Mar 2020 16:58:29 +0100 Subject: [PATCH] sdig: Document Proxy Protocol options --- docs/manpages/sdig.1.rst | 2 +- pdns/sdig.cc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/manpages/sdig.1.rst b/docs/manpages/sdig.1.rst index d355c71b5d..a2a89d0a15 100644 --- a/docs/manpages/sdig.1.rst +++ b/docs/manpages/sdig.1.rst @@ -32,7 +32,7 @@ hidesoadetails hidettl Replace TTLs with `[ttl]` in the response. proxy *TCP?* *SRC* *DST* - Wrap query in PROXYv2 protocol with these parameters. + Wrap query in PROXYv2 protocol with these parameters. The first parameter accepts 0 for UDP and 1 for TCP. The second and third take IP addresses and port. recurse Set the RD bit in the question. showflags diff --git a/pdns/sdig.cc b/pdns/sdig.cc index 1ef4520c11..c1baff02d6 100644 --- a/pdns/sdig.cc +++ b/pdns/sdig.cc @@ -18,9 +18,9 @@ StatBag S; -bool hidettl = false; +static bool hidettl = false; -string ttl(uint32_t ttl) +static string ttl(uint32_t ttl) { if (hidettl) return "[ttl]"; @@ -28,13 +28,13 @@ string ttl(uint32_t ttl) return std::to_string(ttl); } -void usage() +static void usage() { cerr << "sdig" << endl; cerr << "Syntax: sdig IP-ADDRESS-OR-DOH-URL PORT QNAME QTYPE " "[dnssec] [ednssubnet SUBNET/MASK] [hidesoadetails] [hidettl] " "[recurse] [showflags] [tcp] [xpf XPFDATA] [class CLASSNUM] " - "[proxy PROXYDATA]" + "[proxy UDP(0)/TCP(1) SOURCE-IP-ADDRESS-AND-PORT DESTINATION-IP-ADDRESS-AND-PORT]" << endl; } -- 2.47.2